org.apache.ibatis.abator.api
Class FullyQualifiedTable

java.lang.Object
  extended byorg.apache.ibatis.abator.api.FullyQualifiedTable

public class FullyQualifiedTable
extends java.lang.Object

Author:
Jeff Butler

Constructor Summary
FullyQualifiedTable(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String domainObjectName, java.lang.String alias, boolean ignoreQualifiersAtRuntime, java.lang.String runtimeTableName, boolean delimitIdentifiers, AbatorContext abatorContext)
          This object is used to hold information related to the table itself, not the columns in the table.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAlias()
           
 java.lang.String getAliasedFullyQualifiedTableNameAtRuntime()
           
 java.lang.String getCatalog()
           
 java.lang.String getDomainObjectName()
           
 java.lang.String getFullyQualifiedTableNameAtRuntime()
           
 java.lang.String getSchema()
           
 java.lang.String getSqlMapNamespace()
          This method returns a string that is the fully qualified table name, with underscores as the seperator.
 java.lang.String getSubPackage()
          Calculates a Java package fragment based on the table catalog and schema.
 java.lang.String getTableName()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FullyQualifiedTable

public FullyQualifiedTable(java.lang.String catalog,
                           java.lang.String schema,
                           java.lang.String tableName,
                           java.lang.String domainObjectName,
                           java.lang.String alias,
                           boolean ignoreQualifiersAtRuntime,
                           java.lang.String runtimeTableName,
                           boolean delimitIdentifiers,
                           AbatorContext abatorContext)
This object is used to hold information related to the table itself, not the columns in the table.

Parameters:
catalog - the actual catalog of the table as returned from DatabaseMetaData. This value should only be set if the user configured a catalog. Otherwise the DatabaseMetaData is reporting some database default that we don't want in the generated code.
schema - the actual schema of the table as returned from DatabaseMetaData. This value should only be set if the user configured a schema. Otherwise the DatabaseMetaData is reporting some database default that we don't want in the generated code.
tableName - the actual table name as returned from DatabaseMetaData
domainObjectName - the configred domain object name for this table. If nothing is configured, we'll build the domain object named based on the tableName or runtimeTableName.
alias - a configured alias for the table. This alias will be added to the table name in the SQL
ignoreQualifiersAtRuntime - if true, then the catalog and schema qualifiers will be ignored when composing fully qualified names in the generated SQL. This is used, for example, when the user needs to specify a specific schema for generating code but does not want the schema in the generated SQL
runtimeTableName - this is used to "rename" the table in the generated SQL. This is usefule, for example, when generating code to run with an Oracle synonym. The user would have to specify the actual table name and schema for generation, but would want to use the synonym name in the generated SQL
delimitIdentifiers - if true, then the table identifiers will be delimited at runtime. The delimiter characters are obtained from the AbatorContext.
Method Detail

getCatalog

public java.lang.String getCatalog()

getSchema

public java.lang.String getSchema()

getTableName

public java.lang.String getTableName()

getFullyQualifiedTableNameAtRuntime

public java.lang.String getFullyQualifiedTableNameAtRuntime()

getAliasedFullyQualifiedTableNameAtRuntime

public java.lang.String getAliasedFullyQualifiedTableNameAtRuntime()

getSqlMapNamespace

public java.lang.String getSqlMapNamespace()
This method returns a string that is the fully qualified table name, with underscores as the seperator. This String should be

Returns:

getDomainObjectName

public java.lang.String getDomainObjectName()

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getAlias

public java.lang.String getAlias()

getSubPackage

public java.lang.String getSubPackage()
Calculates a Java package fragment based on the table catalog and schema. If qualifiers are ignored, then this method will return an empty string

Returns: