Class FullyQualifiedTable

java.lang.Object
org.mybatis.generator.api.FullyQualifiedTable

public class FullyQualifiedTable extends Object
  • Constructor Details

    • FullyQualifiedTable

      public FullyQualifiedTable(String introspectedCatalog, String introspectedSchema, String introspectedTableName, String domainObjectName, String alias, boolean ignoreQualifiersAtRuntime, String runtimeCatalog, String runtimeSchema, String runtimeTableName, boolean delimitIdentifiers, DomainObjectRenamingRule domainObjectRenamingRule, Context context)
      This object is used to hold information related to the table itself, not the columns in the table.
      Parameters:
      introspectedCatalog - 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.
      introspectedSchema - 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.
      introspectedTableName - the actual table name as returned from DatabaseMetaData
      domainObjectName - the configured 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
      runtimeCatalog - this is used to "rename" the catalog in the generated SQL. This is useful, for example, when generating code against one catalog that should run with a different catalog.
      runtimeSchema - this is used to "rename" the schema in the generated SQL. This is useful, for example, when generating code against one schema that should run with a different schema.
      runtimeTableName - this is used to "rename" the table in the generated SQL. This is useful, 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 Context.
      domainObjectRenamingRule - If domainObjectName is not configured, we'll build the domain object named based on the tableName or runtimeTableName. And then we use the domain object renaming rule to generate the final domain object name.
      context - the context
  • Method Details

    • getIntrospectedCatalog

      public String getIntrospectedCatalog()
    • getIntrospectedSchema

      public String getIntrospectedSchema()
    • getIntrospectedTableName

      public String getIntrospectedTableName()
    • getFullyQualifiedTableNameAtRuntime

      public String getFullyQualifiedTableNameAtRuntime()
    • getAliasedFullyQualifiedTableNameAtRuntime

      public String getAliasedFullyQualifiedTableNameAtRuntime()
    • getDomainObjectName

      public String getDomainObjectName()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAlias

      public String getAlias()
    • getSubPackageForClientOrSqlMap

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

      This method is used for determining the sub package for Java client and SQL map (XML) objects. It ignores any sub-package added to the domain object name in the table configuration.

      Parameters:
      isSubPackagesEnabled - the is sub packages enabled
      Returns:
      the subpackage for this table
    • getSubPackageForModel

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

      This method is used for determining the sub package for Java model objects only. It takes into account the possibility that a sub-package was added to the domain object name in the table configuration.

      Parameters:
      isSubPackagesEnabled - the is sub packages enabled
      Returns:
      the subpackage for this table
    • getDomainObjectSubPackage

      public String getDomainObjectSubPackage()