|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.ibator.api.IntrospectedTable
public abstract class IntrospectedTable
Base class for all code generator implementations. This class provides many of the Ibator housekeeping methods needed to implement a code generator, with only the actual code generation methods left unimplemented.
Field Summary | |
---|---|
static java.lang.String |
ATTR_BASE_RECORD_TYPE
This attribute must be a class of type org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType |
static java.lang.String |
ATTR_DAO_IMPLEMENTATION_PACKAGE
This attribute must be a class of type java.lang.String |
static java.lang.String |
ATTR_DAO_IMPLEMENTATION_TYPE
This attribute must be a class of type org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType |
static java.lang.String |
ATTR_DAO_INTERFACE_PACKAGE
This attribute must be a class of type java.lang.String |
static java.lang.String |
ATTR_DAO_INTERFACE_TYPE
This attribute must be a class of type org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType |
static java.lang.String |
ATTR_EXAMPLE_TYPE
This attribute must be a class of type org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType |
static java.lang.String |
ATTR_JAVA_MODEL_PACKAGE
This attribute must be a class of type java.lang.String |
static java.lang.String |
ATTR_PRIMARY_KEY_TYPE
This attribute must be a class of type org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType |
static java.lang.String |
ATTR_RECORD_WITH_BLOBS_TYPE
This attribute must be a class of type org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType |
static java.lang.String |
ATTR_SQL_MAP_FILE_NAME
This attribute must be a class of type java.lang.String |
static java.lang.String |
ATTR_SQL_MAP_PACKAGE
This attribute must be a class of type java.lang.String |
protected java.util.Map<java.lang.String,java.lang.Object> |
attributes
Attributes may be used by plugins to capture table related state between the different plugin calls. |
protected java.util.List<IntrospectedColumn> |
baseColumns
|
protected java.util.List<IntrospectedColumn> |
blobColumns
|
protected FullyQualifiedTable |
fullyQualifiedTable
|
protected IbatorContext |
ibatorContext
|
protected java.util.List<IntrospectedColumn> |
primaryKeyColumns
|
protected IbatorRules |
rules
|
protected TableConfiguration |
tableConfiguration
|
Constructor Summary | |
---|---|
IntrospectedTable()
|
Method Summary | |
---|---|
void |
addColumn(IntrospectedColumn introspectedColumn)
|
void |
addPrimaryKeyColumn(java.lang.String columnName)
|
abstract void |
calculateGenerators(java.util.List<java.lang.String> warnings,
ProgressCallback progressCallback)
This method can be used to initialize the generators before they will be called. |
java.util.List<IntrospectedColumn> |
getAllColumns()
Returns all columns in the table (for use by the select by primary key and select by example with BLOBs methods) |
java.lang.Object |
getAttribute(java.lang.String name)
|
java.util.List<IntrospectedColumn> |
getBaseColumns()
|
FullyQualifiedJavaType |
getBaseRecordType()
|
java.util.List<IntrospectedColumn> |
getBLOBColumns()
|
IntrospectedColumn |
getColumn(java.lang.String columnName)
|
java.lang.String |
getDAOImplementationPackage()
|
FullyQualifiedJavaType |
getDAOImplementationType()
|
java.lang.String |
getDAOInterfacePackage()
|
FullyQualifiedJavaType |
getDAOInterfaceType()
|
FullyQualifiedJavaType |
getExampleType()
|
FullyQualifiedTable |
getFullyQualifiedTable()
|
abstract java.util.List<GeneratedJavaFile> |
getGeneratedJavaFiles()
This method should return a list of generated Java files related to this table. |
GeneratedKey |
getGeneratedKey()
|
abstract java.util.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. |
java.lang.String |
getJavaModelPackage()
|
int |
getNonBLOBColumnCount()
|
java.util.List<IntrospectedColumn> |
getNonBLOBColumns()
Returns all columns except BLOBs (for use by the select by example without BLOBs method) |
java.util.List<IntrospectedColumn> |
getNonPrimaryKeyColumns()
|
java.util.List<IntrospectedColumn> |
getPrimaryKeyColumns()
Returns the columns in the primary key. |
FullyQualifiedJavaType |
getPrimaryKeyType()
|
FullyQualifiedJavaType |
getRecordWithBLOBsType()
|
IbatorRules |
getRules()
|
java.lang.String |
getSelectByExampleQueryId()
|
java.lang.String |
getSelectByPrimaryKeyQueryId()
|
java.lang.String |
getSqlMapFileName()
Calculates an SQL Map file name for the table. |
java.lang.String |
getSqlMapPackage()
Calculates the package for the current table. |
java.lang.String |
getTableConfigurationProperty(java.lang.String property)
|
boolean |
hasAnyColumns()
|
boolean |
hasBaseColumns()
|
boolean |
hasBLOBColumns()
|
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()
|
void |
initialize()
|
abstract boolean |
isJava5Targeted()
Denotes whether generated code is targeted for Java version 5.0 or higher. |
void |
removeAttribute(java.lang.String name)
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
|
void |
setFullyQualifiedTable(FullyQualifiedTable fullyQualifiedTable)
|
void |
setIbatorContext(IbatorContext ibatorContext)
|
void |
setRules(IbatorRules rules)
This method exists to give plugins the opportunity to replace the calculated rules if necessary. |
void |
setTableConfiguration(TableConfiguration tableConfiguration)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ATTR_DAO_IMPLEMENTATION_PACKAGE
public static final java.lang.String ATTR_DAO_INTERFACE_PACKAGE
public static final java.lang.String ATTR_DAO_IMPLEMENTATION_TYPE
public static final java.lang.String ATTR_DAO_INTERFACE_TYPE
public static final java.lang.String ATTR_JAVA_MODEL_PACKAGE
public static final java.lang.String ATTR_PRIMARY_KEY_TYPE
public static final java.lang.String ATTR_BASE_RECORD_TYPE
public static final java.lang.String ATTR_RECORD_WITH_BLOBS_TYPE
public static final java.lang.String ATTR_EXAMPLE_TYPE
public static final java.lang.String ATTR_SQL_MAP_PACKAGE
public static final java.lang.String ATTR_SQL_MAP_FILE_NAME
protected TableConfiguration tableConfiguration
protected FullyQualifiedTable fullyQualifiedTable
protected IbatorContext ibatorContext
protected IbatorRules rules
protected java.util.List<IntrospectedColumn> primaryKeyColumns
protected java.util.List<IntrospectedColumn> baseColumns
protected java.util.List<IntrospectedColumn> blobColumns
protected java.util.Map<java.lang.String,java.lang.Object> attributes
Constructor Detail |
---|
public IntrospectedTable()
Method Detail |
---|
public FullyQualifiedTable getFullyQualifiedTable()
public java.lang.String getSelectByExampleQueryId()
public java.lang.String getSelectByPrimaryKeyQueryId()
public GeneratedKey getGeneratedKey()
public IntrospectedColumn getColumn(java.lang.String columnName)
public boolean hasJDBCDateColumns()
public boolean hasJDBCTimeColumns()
public java.util.List<IntrospectedColumn> getPrimaryKeyColumns()
public boolean hasPrimaryKeyColumns()
public java.util.List<IntrospectedColumn> getBaseColumns()
public java.util.List<IntrospectedColumn> getAllColumns()
public java.util.List<IntrospectedColumn> getNonBLOBColumns()
public int getNonBLOBColumnCount()
public java.util.List<IntrospectedColumn> getNonPrimaryKeyColumns()
public java.util.List<IntrospectedColumn> getBLOBColumns()
public boolean hasBLOBColumns()
public boolean hasBaseColumns()
public IbatorRules getRules()
public java.lang.String getTableConfigurationProperty(java.lang.String property)
public FullyQualifiedJavaType getPrimaryKeyType()
public FullyQualifiedJavaType getBaseRecordType()
public FullyQualifiedJavaType getExampleType()
public FullyQualifiedJavaType getRecordWithBLOBsType()
public java.lang.String getSqlMapFileName()
public java.lang.String getSqlMapPackage()
public FullyQualifiedJavaType getDAOImplementationType()
public FullyQualifiedJavaType getDAOInterfaceType()
public boolean hasAnyColumns()
public java.lang.String getDAOInterfacePackage()
public java.lang.String getDAOImplementationPackage()
public java.lang.String getJavaModelPackage()
public void setTableConfiguration(TableConfiguration tableConfiguration)
public void setFullyQualifiedTable(FullyQualifiedTable fullyQualifiedTable)
public void setIbatorContext(IbatorContext ibatorContext)
public void addColumn(IntrospectedColumn introspectedColumn)
public void addPrimaryKeyColumn(java.lang.String columnName)
public java.lang.Object getAttribute(java.lang.String name)
public void removeAttribute(java.lang.String name)
public void setAttribute(java.lang.String name, java.lang.Object value)
public void initialize()
public abstract void calculateGenerators(java.util.List<java.lang.String> warnings, ProgressCallback progressCallback)
warnings
- progressCallback
- public abstract java.util.List<GeneratedJavaFile> getGeneratedJavaFiles()
public abstract java.util.List<GeneratedXmlFile> getGeneratedXmlFiles()
public abstract boolean isJava5Targeted()
public abstract int getGenerationSteps()
public void setRules(IbatorRules rules)
rules
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |