public abstract class IntrospectedTable extends Object
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
IntrospectedTable.InternalAttribute
The Enum InternalAttribute.
|
static class |
IntrospectedTable.TargetRuntime
The Enum TargetRuntime.
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,Object> |
attributes
Attributes may be used by plugins to capture table related state between
the different plugin calls.
|
protected List<IntrospectedColumn> |
baseColumns
The base columns.
|
protected List<IntrospectedColumn> |
blobColumns
The blob columns.
|
protected Context |
context
The context.
|
protected FullyQualifiedTable |
fullyQualifiedTable
The fully qualified table.
|
protected Map<IntrospectedTable.InternalAttribute,String> |
internalAttributes
Internal attributes are used to store commonly accessed items by all code generators.
|
protected List<IntrospectedColumn> |
primaryKeyColumns
The primary key columns.
|
protected String |
remarks
Table remarks retrieved from database metadata
|
protected Rules |
rules
The rules.
|
protected TableConfiguration |
tableConfiguration
The table configuration.
|
protected String |
tableType
Table type retrieved from database metadata
|
protected IntrospectedTable.TargetRuntime |
targetRuntime
The target runtime.
|
| 构造器和说明 |
|---|
IntrospectedTable(IntrospectedTable.TargetRuntime targetRuntime)
Instantiates a new introspected table.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addColumn(IntrospectedColumn introspectedColumn)
Adds the column.
|
void |
addPrimaryKeyColumn(String columnName)
Adds the primary key column.
|
abstract void |
calculateGenerators(List<String> warnings,
ProgressCallback progressCallback)
This method can be used to initialize the generators before they will be called.
|
protected String |
calculateIbatis2SqlMapFileName()
Calculate ibatis2 sql map file name.
|
protected String |
calculateIbatis2SqlMapNamespace()
Calculate ibatis2 sql map namespace.
|
protected void |
calculateJavaClientAttributes()
Calculate java client attributes.
|
protected String |
calculateJavaClientImplementationPackage()
Calculate java client implementation package.
|
protected String |
calculateJavaClientInterfacePackage()
Calculate java client interface package.
|
protected String |
calculateJavaModelPackage()
Calculate java model package.
|
protected void |
calculateModelAttributes()
Calculate model attributes.
|
protected String |
calculateMyBatis3FallbackSqlMapNamespace()
Calculate my batis3 fallback sql map namespace.
|
protected String |
calculateMyBatis3XmlMapperFileName()
Calculate my batis3 xml mapper file name.
|
protected String |
calculateSqlMapAliasedFullyQualifiedRuntimeTableName()
Calculate sql map aliased fully qualified runtime table name.
|
protected String |
calculateSqlMapFullyQualifiedRuntimeTableName()
Calculate sql map fully qualified runtime table name.
|
protected String |
calculateSqlMapPackage()
Calculate sql map package.
|
protected void |
calculateXmlAttributes()
Calculate xml attributes.
|
String |
getAliasedFullyQualifiedTableNameAtRuntime()
Gets the aliased fully qualified table name at runtime.
|
List<IntrospectedColumn> |
getAllColumns()
Returns all columns in the table (for use by the select by primary key and select by example with BLOBs methods).
|
Object |
getAttribute(String name)
Gets the attribute.
|
String |
getBaseColumnListId()
Gets the base column list id.
|
List<IntrospectedColumn> |
getBaseColumns()
Gets the base columns.
|
String |
getBaseRecordType()
Gets the base record type.
|
String |
getBaseResultMapId()
Gets the base result map id.
|
String |
getBlobColumnListId()
Gets the blob column list id.
|
List<IntrospectedColumn> |
getBLOBColumns()
Gets the BLOB columns.
|
IntrospectedColumn |
getColumn(String columnName)
Gets the column.
|
Context |
getContext()
Gets the context.
|
String |
getCountByExampleStatementId()
Gets the count by example statement id.
|
String |
getDAOImplementationType()
Gets the DAO implementation type.
|
String |
getDAOInterfaceType()
Gets the DAO interface type.
|
String |
getDeleteByExampleStatementId()
Gets the delete by example statement id.
|
String |
getDeleteByPrimaryKeyStatementId()
Gets the delete by primary key statement id.
|
String |
getExampleType()
Gets the example type.
|
String |
getExampleWhereClauseId()
Gets the example where clause id.
|
FullyQualifiedTable |
getFullyQualifiedTable()
Gets the fully qualified table.
|
String |
getFullyQualifiedTableNameAtRuntime()
Gets the fully qualified table name at runtime.
|
abstract List<GeneratedJavaFile> |
getGeneratedJavaFiles()
This method should return a list of generated Java files related to this
table.
|
GeneratedKey |
getGeneratedKey()
Gets the generated key.
|
abstract List<GeneratedXmlFile> |
getGeneratedXmlFiles()
This method should return a list of generated XML files related to this
table.
|
abstract int |
getGenerationSteps()
This method should return the number of progress messages that will be
send during the generation phase.
|
String |
getIbatis2SqlMapFileName()
Calculates an SQL Map file name for the table.
|
String |
getIbatis2SqlMapNamespace()
Gets the ibatis2 sql map namespace.
|
String |
getIbatis2SqlMapPackage()
Calculates the package for the current table.
|
String |
getInsertSelectiveStatementId()
Gets the insert selective statement id.
|
String |
getInsertStatementId()
Gets the insert statement id.
|
String |
getMyBatis3FallbackSqlMapNamespace()
Gets the my batis3 fallback sql map namespace.
|
String |
getMyBatis3JavaMapperType()
Gets the my batis3 java mapper type.
|
String |
getMyBatis3SqlMapNamespace()
Gets the my batis3 sql map namespace.
|
String |
getMyBatis3SqlProviderType()
Gets the my batis3 sql provider type.
|
String |
getMyBatis3UpdateByExampleWhereClauseId()
Gets the my batis3 update by example where clause id.
|
String |
getMyBatis3XmlMapperFileName()
Gets the my batis3 xml mapper file name.
|
String |
getMyBatis3XmlMapperPackage()
Gets the my batis3 xml mapper package.
|
int |
getNonBLOBColumnCount()
Gets the non blob column count.
|
List<IntrospectedColumn> |
getNonBLOBColumns()
Returns all columns except BLOBs (for use by the select by example without BLOBs method).
|
List<IntrospectedColumn> |
getNonPrimaryKeyColumns()
Gets the non primary key columns.
|
List<IntrospectedColumn> |
getPrimaryKeyColumns()
Returns the columns in the primary key.
|
String |
getPrimaryKeyType()
Gets the primary key type.
|
String |
getRecordWithBLOBsType()
Gets the record with blo bs type.
|
String |
getRemarks() |
String |
getResultMapWithBLOBsId()
Gets the result map with blo bs id.
|
Rules |
getRules()
Gets the rules.
|
String |
getSelectAllStatementId()
Gets the select all statement id.
|
String |
getSelectByExampleQueryId()
Gets the select by example query id.
|
String |
getSelectByExampleStatementId()
Gets the select by example statement id.
|
String |
getSelectByExampleWithBLOBsStatementId()
Gets the select by example with blo bs statement id.
|
String |
getSelectByPrimaryKeyQueryId()
Gets the select by primary key query id.
|
String |
getSelectByPrimaryKeyStatementId()
Gets the select by primary key statement id.
|
TableConfiguration |
getTableConfiguration()
Gets the table configuration.
|
String |
getTableConfigurationProperty(String property)
Gets the table configuration property.
|
String |
getTableType() |
IntrospectedTable.TargetRuntime |
getTargetRuntime()
Gets the target runtime.
|
String |
getUpdateByExampleSelectiveStatementId()
Gets the update by example selective statement id.
|
String |
getUpdateByExampleStatementId()
Gets the update by example statement id.
|
String |
getUpdateByExampleWithBLOBsStatementId()
Gets the update by example with blo bs statement id.
|
String |
getUpdateByPrimaryKeySelectiveStatementId()
Gets the update by primary key selective statement id.
|
String |
getUpdateByPrimaryKeyStatementId()
Gets the update by primary key statement id.
|
String |
getUpdateByPrimaryKeyWithBLOBsStatementId()
Gets the update by primary key with blo bs statement id.
|
boolean |
hasAnyColumns()
Checks for any columns.
|
boolean |
hasBaseColumns()
Checks for base columns.
|
boolean |
hasBLOBColumns()
Checks for blob columns.
|
boolean |
hasJDBCDateColumns()
Returns true if any of the columns in the table are JDBC Dates (as
opposed to timestamps).
|
boolean |
hasJDBCTimeColumns()
Returns true if any of the columns in the table are JDBC Times (as
opposed to timestamps).
|
boolean |
hasPrimaryKeyColumns()
Checks for primary key columns.
|
void |
initialize()
Initialize.
|
boolean |
isConstructorBased()
Checks if is constructor based.
|
boolean |
isImmutable()
Checks if is immutable.
|
abstract boolean |
isJava5Targeted()
Denotes whether generated code is targeted for Java version 5.0 or
higher.
|
void |
removeAttribute(String name)
Removes the attribute.
|
abstract boolean |
requiresXMLGenerator()
Should return true if an XML generator is required for this table.
|
void |
setAttribute(String name,
Object value)
Sets the attribute.
|
void |
setBaseColumnListId(String s)
Sets the base column list id.
|
void |
setBaseRecordType(String baseRecordType)
Sets the base record type.
|
void |
setBaseResultMapId(String s)
Sets the base result map id.
|
void |
setBlobColumnListId(String s)
Sets the blob column list id.
|
void |
setContext(Context context)
Sets the context.
|
void |
setCountByExampleStatementId(String s)
Sets the count by example statement id.
|
void |
setDAOImplementationType(String DAOImplementationType)
Sets the DAO implementation type.
|
void |
setDAOInterfaceType(String DAOInterfaceType)
Sets the DAO interface type.
|
void |
setDeleteByExampleStatementId(String s)
Sets the delete by example statement id.
|
void |
setDeleteByPrimaryKeyStatementId(String s)
Sets the delete by primary key statement id.
|
void |
setExampleType(String exampleType)
Sets the example type.
|
void |
setExampleWhereClauseId(String s)
Sets the example where clause id.
|
void |
setFullyQualifiedTable(FullyQualifiedTable fullyQualifiedTable)
Sets the fully qualified table.
|
void |
setIbatis2SqlMapFileName(String sqlMapFileName)
Sets the ibatis2 sql map file name.
|
void |
setIbatis2SqlMapNamespace(String sqlMapNamespace)
Sets the ibatis2 sql map namespace.
|
void |
setIbatis2SqlMapPackage(String sqlMapPackage)
Sets the ibatis2 sql map package.
|
void |
setInsertSelectiveStatementId(String s)
Sets the insert selective statement id.
|
void |
setInsertStatementId(String s)
Sets the insert statement id.
|
void |
setMyBatis3FallbackSqlMapNamespace(String sqlMapNamespace)
Sets the my batis3 fallback sql map namespace.
|
void |
setMyBatis3JavaMapperType(String mybatis3JavaMapperType)
Sets the my batis3 java mapper type.
|
void |
setMyBatis3SqlProviderType(String mybatis3SqlProviderType)
Sets the my batis3 sql provider type.
|
void |
setMyBatis3UpdateByExampleWhereClauseId(String s)
Sets the my batis3 update by example where clause id.
|
void |
setMyBatis3XmlMapperFileName(String mybatis3XmlMapperFileName)
Sets the my batis3 xml mapper file name.
|
void |
setMyBatis3XmlMapperPackage(String mybatis3XmlMapperPackage)
Sets the my batis3 xml mapper package.
|
void |
setPrimaryKeyType(String primaryKeyType)
Sets the primary key type.
|
void |
setRecordWithBLOBsType(String recordWithBLOBsType)
Sets the record with blo bs type.
|
void |
setRemarks(String remarks) |
void |
setResultMapWithBLOBsId(String s)
Sets the result map with blo bs id.
|
void |
setRules(Rules rules)
This method exists to give plugins the opportunity to replace the calculated rules if necessary.
|
void |
setSelectAllStatementId(String s)
Sets the select all statement id.
|
void |
setSelectByExampleStatementId(String s)
Sets the select by example statement id.
|
void |
setSelectByExampleWithBLOBsStatementId(String s)
Sets the select by example with blo bs statement id.
|
void |
setSelectByPrimaryKeyStatementId(String s)
Sets the select by primary key statement id.
|
void |
setSqlMapAliasedFullyQualifiedRuntimeTableName(String aliasedFullyQualifiedRuntimeTableName)
Sets the sql map aliased fully qualified runtime table name.
|
void |
setSqlMapFullyQualifiedRuntimeTableName(String fullyQualifiedRuntimeTableName)
Sets the sql map fully qualified runtime table name.
|
void |
setTableConfiguration(TableConfiguration tableConfiguration)
Sets the table configuration.
|
void |
setTableType(String tableType) |
void |
setUpdateByExampleSelectiveStatementId(String s)
Sets the update by example selective statement id.
|
void |
setUpdateByExampleStatementId(String s)
Sets the update by example statement id.
|
void |
setUpdateByExampleWithBLOBsStatementId(String s)
Sets the update by example with blo bs statement id.
|
void |
setUpdateByPrimaryKeySelectiveStatementId(String s)
Sets the update by primary key selective statement id.
|
void |
setUpdateByPrimaryKeyStatementId(String s)
Sets the update by primary key statement id.
|
void |
setUpdateByPrimaryKeyWithBLOBsStatementId(String s)
Sets the update by primary key with blo bs statement id.
|
protected TableConfiguration tableConfiguration
protected FullyQualifiedTable fullyQualifiedTable
protected Context context
protected Rules rules
protected List<IntrospectedColumn> primaryKeyColumns
protected List<IntrospectedColumn> baseColumns
protected List<IntrospectedColumn> blobColumns
protected IntrospectedTable.TargetRuntime targetRuntime
protected Map<String,Object> attributes
protected Map<IntrospectedTable.InternalAttribute,String> internalAttributes
protected String remarks
protected String tableType
public IntrospectedTable(IntrospectedTable.TargetRuntime targetRuntime)
targetRuntime - the target runtimepublic FullyQualifiedTable getFullyQualifiedTable()
public String getSelectByExampleQueryId()
public String getSelectByPrimaryKeyQueryId()
public GeneratedKey getGeneratedKey()
public IntrospectedColumn getColumn(String columnName)
columnName - the column namepublic boolean hasJDBCDateColumns()
public boolean hasJDBCTimeColumns()
public List<IntrospectedColumn> getPrimaryKeyColumns()
public boolean hasPrimaryKeyColumns()
public List<IntrospectedColumn> getBaseColumns()
public List<IntrospectedColumn> getAllColumns()
public List<IntrospectedColumn> getNonBLOBColumns()
public int getNonBLOBColumnCount()
public List<IntrospectedColumn> getNonPrimaryKeyColumns()
public List<IntrospectedColumn> getBLOBColumns()
public boolean hasBLOBColumns()
public boolean hasBaseColumns()
public Rules getRules()
public String getTableConfigurationProperty(String property)
property - the propertypublic String getPrimaryKeyType()
public String getBaseRecordType()
public String getExampleType()
public String getRecordWithBLOBsType()
public String getIbatis2SqlMapFileName()
public String getIbatis2SqlMapNamespace()
public String getMyBatis3SqlMapNamespace()
public String getMyBatis3FallbackSqlMapNamespace()
public String getIbatis2SqlMapPackage()
public String getDAOImplementationType()
public String getDAOInterfaceType()
public boolean hasAnyColumns()
public void setTableConfiguration(TableConfiguration tableConfiguration)
tableConfiguration - the new table configurationpublic void setFullyQualifiedTable(FullyQualifiedTable fullyQualifiedTable)
fullyQualifiedTable - the new fully qualified tablepublic void setContext(Context context)
context - the new contextpublic void addColumn(IntrospectedColumn introspectedColumn)
introspectedColumn - the introspected columnpublic void addPrimaryKeyColumn(String columnName)
columnName - the column namepublic Object getAttribute(String name)
name - the namepublic void removeAttribute(String name)
name - the namepublic void setAttribute(String name, Object value)
name - the namevalue - the valuepublic void initialize()
protected void calculateXmlAttributes()
public void setBlobColumnListId(String s)
s - the new blob column list idpublic void setBaseColumnListId(String s)
s - the new base column list idpublic void setExampleWhereClauseId(String s)
s - the new example where clause idpublic void setMyBatis3UpdateByExampleWhereClauseId(String s)
s - the new my batis3 update by example where clause idpublic void setResultMapWithBLOBsId(String s)
s - the new result map with blo bs idpublic void setBaseResultMapId(String s)
s - the new base result map idpublic void setUpdateByPrimaryKeyWithBLOBsStatementId(String s)
s - the new update by primary key with blo bs statement idpublic void setUpdateByPrimaryKeySelectiveStatementId(String s)
s - the new update by primary key selective statement idpublic void setUpdateByPrimaryKeyStatementId(String s)
s - the new update by primary key statement idpublic void setUpdateByExampleWithBLOBsStatementId(String s)
s - the new update by example with blo bs statement idpublic void setUpdateByExampleSelectiveStatementId(String s)
s - the new update by example selective statement idpublic void setUpdateByExampleStatementId(String s)
s - the new update by example statement idpublic void setSelectByPrimaryKeyStatementId(String s)
s - the new select by primary key statement idpublic void setSelectByExampleWithBLOBsStatementId(String s)
s - the new select by example with blo bs statement idpublic void setSelectAllStatementId(String s)
s - the new select all statement idpublic void setSelectByExampleStatementId(String s)
s - the new select by example statement idpublic void setInsertSelectiveStatementId(String s)
s - the new insert selective statement idpublic void setInsertStatementId(String s)
s - the new insert statement idpublic void setDeleteByPrimaryKeyStatementId(String s)
s - the new delete by primary key statement idpublic void setDeleteByExampleStatementId(String s)
s - the new delete by example statement idpublic void setCountByExampleStatementId(String s)
s - the new count by example statement idpublic String getBlobColumnListId()
public String getBaseColumnListId()
public String getExampleWhereClauseId()
public String getMyBatis3UpdateByExampleWhereClauseId()
public String getResultMapWithBLOBsId()
public String getBaseResultMapId()
public String getUpdateByPrimaryKeyWithBLOBsStatementId()
public String getUpdateByPrimaryKeySelectiveStatementId()
public String getUpdateByPrimaryKeyStatementId()
public String getUpdateByExampleWithBLOBsStatementId()
public String getUpdateByExampleSelectiveStatementId()
public String getUpdateByExampleStatementId()
public String getSelectByPrimaryKeyStatementId()
public String getSelectByExampleWithBLOBsStatementId()
public String getSelectAllStatementId()
public String getSelectByExampleStatementId()
public String getInsertSelectiveStatementId()
public String getInsertStatementId()
public String getDeleteByPrimaryKeyStatementId()
public String getDeleteByExampleStatementId()
public String getCountByExampleStatementId()
protected String calculateJavaClientImplementationPackage()
protected String calculateJavaClientInterfacePackage()
protected void calculateJavaClientAttributes()
protected String calculateJavaModelPackage()
protected void calculateModelAttributes()
protected String calculateSqlMapPackage()
protected String calculateIbatis2SqlMapFileName()
protected String calculateMyBatis3XmlMapperFileName()
protected String calculateIbatis2SqlMapNamespace()
protected String calculateMyBatis3FallbackSqlMapNamespace()
protected String calculateSqlMapFullyQualifiedRuntimeTableName()
protected String calculateSqlMapAliasedFullyQualifiedRuntimeTableName()
public String getFullyQualifiedTableNameAtRuntime()
public String getAliasedFullyQualifiedTableNameAtRuntime()
public abstract void calculateGenerators(List<String> warnings, ProgressCallback progressCallback)
warnings - the warningsprogressCallback - the progress callbackpublic abstract List<GeneratedJavaFile> getGeneratedJavaFiles()
public abstract List<GeneratedXmlFile> getGeneratedXmlFiles()
public abstract boolean isJava5Targeted()
public abstract int getGenerationSteps()
public void setRules(Rules rules)
rules - the new rulespublic TableConfiguration getTableConfiguration()
public void setDAOImplementationType(String DAOImplementationType)
DAOImplementationType - the new DAO implementation typepublic void setDAOInterfaceType(String DAOInterfaceType)
DAOInterfaceType - the new DAO interface typepublic void setPrimaryKeyType(String primaryKeyType)
primaryKeyType - the new primary key typepublic void setBaseRecordType(String baseRecordType)
baseRecordType - the new base record typepublic void setRecordWithBLOBsType(String recordWithBLOBsType)
recordWithBLOBsType - the new record with blo bs typepublic void setExampleType(String exampleType)
exampleType - the new example typepublic void setIbatis2SqlMapPackage(String sqlMapPackage)
sqlMapPackage - the new ibatis2 sql map packagepublic void setIbatis2SqlMapFileName(String sqlMapFileName)
sqlMapFileName - the new ibatis2 sql map file namepublic void setIbatis2SqlMapNamespace(String sqlMapNamespace)
sqlMapNamespace - the new ibatis2 sql map namespacepublic void setMyBatis3FallbackSqlMapNamespace(String sqlMapNamespace)
sqlMapNamespace - the new my batis3 fallback sql map namespacepublic void setSqlMapFullyQualifiedRuntimeTableName(String fullyQualifiedRuntimeTableName)
fullyQualifiedRuntimeTableName - the new sql map fully qualified runtime table namepublic void setSqlMapAliasedFullyQualifiedRuntimeTableName(String aliasedFullyQualifiedRuntimeTableName)
aliasedFullyQualifiedRuntimeTableName - the new sql map aliased fully qualified runtime table namepublic String getMyBatis3XmlMapperPackage()
public void setMyBatis3XmlMapperPackage(String mybatis3XmlMapperPackage)
mybatis3XmlMapperPackage - the new my batis3 xml mapper packagepublic String getMyBatis3XmlMapperFileName()
public void setMyBatis3XmlMapperFileName(String mybatis3XmlMapperFileName)
mybatis3XmlMapperFileName - the new my batis3 xml mapper file namepublic String getMyBatis3JavaMapperType()
public void setMyBatis3JavaMapperType(String mybatis3JavaMapperType)
mybatis3JavaMapperType - the new my batis3 java mapper typepublic String getMyBatis3SqlProviderType()
public void setMyBatis3SqlProviderType(String mybatis3SqlProviderType)
mybatis3SqlProviderType - the new my batis3 sql provider typepublic IntrospectedTable.TargetRuntime getTargetRuntime()
public boolean isImmutable()
public boolean isConstructorBased()
public abstract boolean requiresXMLGenerator()
public Context getContext()
public String getRemarks()
public void setRemarks(String remarks)
public String getTableType()
public void setTableType(String tableType)
Copyright © 2006–2016 MyBatis.org. All rights reserved.