|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.abator.internal.sqlmap.SqlMapGeneratorIterateImpl
Field Summary | |
protected AbatorContext |
abatorContext
|
protected JavaModelGenerator |
javaModelGenerator
This is the java model generator associated with the current generation context. |
protected java.util.Properties |
properties
Contains any properties passed in from the SqlMap configuration element. |
protected java.lang.String |
targetPackage
This is the target package from the SqlMap configuration element |
protected java.lang.String |
targetProject
This is the target project from the SqlMap configuration element |
protected java.util.List |
warnings
|
Constructor Summary | |
SqlMapGeneratorIterateImpl()
Constructs an instance of SqlMapGeneratorDefaultImpl |
Method Summary | |
void |
addConfigurationProperties(java.util.Properties properties)
Adds properties for this instance from any properties configured in the SqlMapGeneratorConfiguration. |
protected void |
afterGenerationHook(IntrospectedTable introspectedTable,
Document generatedDocument)
Override this method to provide any extra Elements needed in the generated XML. |
protected XmlElement |
getBaseResultMapElement(IntrospectedTable introspectedTable)
This method should return an XmlElement which is the result map (without any BLOBs if they exist in the table). |
protected XmlElement |
getByExampleWhereClauseFragment(IntrospectedTable introspectedTable)
This method should return an XmlElement for the example where clause SQL fragment (an sql fragment). |
protected XmlElement |
getCountByExample(IntrospectedTable introspectedTable)
This method should return an XmlElement for the count by example statement. |
java.lang.String |
getCountByExampleStatementId()
|
protected XmlElement |
getDeleteByExample(IntrospectedTable introspectedTable)
This method should return an XmlElement for the delete by example statement. |
java.lang.String |
getDeleteByExampleStatementId()
|
protected XmlElement |
getDeleteByPrimaryKey(IntrospectedTable introspectedTable)
This method should return an XmlElement for the delete by primary key statement. |
java.lang.String |
getDeleteByPrimaryKeyStatementId()
|
protected java.lang.String |
getExampleWhereClauseId()
Calculates the name of the example where clause element. |
java.util.List |
getGeneratedXMLFiles(IntrospectedTable introspectedTable,
ProgressCallback callback)
|
protected XmlElement |
getInsertElement(IntrospectedTable introspectedTable)
This method should return an XmlElement which the insert statement. |
java.lang.String |
getInsertStatementId()
|
protected java.lang.String |
getResultMapName(FullyQualifiedTable table)
Calculates the name of the result map. |
protected XmlElement |
getResultMapWithBLOBsElement(IntrospectedTable introspectedTable)
This method should return an XmlElement which is the result map (with any BLOBs if they exist in the table). |
protected XmlElement |
getSelectByExample(IntrospectedTable introspectedTable)
This method should an XmlElement for the select by example statement that returns all fields in the table (except BLOB fields). |
java.lang.String |
getSelectByExampleStatementId()
|
protected XmlElement |
getSelectByExampleWithBLOBs(IntrospectedTable introspectedTable)
This method should return an XmlElement for the select by example statement that returns all fields in the table (including BLOB fields). |
java.lang.String |
getSelectByExampleWithBLOBsStatementId()
|
protected XmlElement |
getSelectByPrimaryKey(IntrospectedTable introspectedTable)
This method should return an XmlElement for the select by primary key statement. |
java.lang.String |
getSelectByPrimaryKeyStatementId()
|
protected XmlElement |
getSelectKey(ColumnDefinition columnDefinition,
GeneratedKey generatedKey)
This method should return an XmlElement for the select key used to automatically generate keys. |
protected GeneratedXmlFile |
getSqlMap(IntrospectedTable introspectedTable)
Creates the default implementation of the Sql Map |
protected XmlElement |
getSqlMapElement(IntrospectedTable introspectedTable)
Creates the sqlMap element (the root element, and all child elements). |
protected java.lang.String |
getSqlMapFileName(FullyQualifiedTable table)
Calculates a file name for the current table. |
java.lang.String |
getSqlMapNamespace(FullyQualifiedTable table)
|
protected java.lang.String |
getSqlMapPackage(FullyQualifiedTable table)
Calculates the package for the current table. |
protected XmlElement |
getUpdateByExampleSelective(IntrospectedTable introspectedTable)
This method should return an XmlElement for the update by example statement that updates all fields in the table - but only if the field is not null in the parameter object. |
java.lang.String |
getUpdateByExampleSelectiveStatementId()
|
java.lang.String |
getUpdateByExampleStatementId()
|
protected XmlElement |
getUpdateByExampleWithBLOBs(IntrospectedTable introspectedTable)
|
java.lang.String |
getUpdateByExampleWithBLOBsStatementId()
|
protected XmlElement |
getUpdateByExampleWithoutBLOBs(IntrospectedTable introspectedTable)
|
protected XmlElement |
getUpdateByPrimaryKeySelective(IntrospectedTable introspectedTable)
This method should return an XmlElement for the update by primary key statement that updates all fields in the table - but only if the field is not null in the parameter object. |
java.lang.String |
getUpdateByPrimaryKeySelectiveStatementId()
|
java.lang.String |
getUpdateByPrimaryKeyStatementId()
|
protected XmlElement |
getUpdateByPrimaryKeyWithBLOBs(IntrospectedTable introspectedTable)
This method should return an XmlElement for the update by primary key statement that updates all fields in the table (including BLOB fields). |
java.lang.String |
getUpdateByPrimaryKeyWithBLOBsStatementId()
|
protected XmlElement |
getUpdateByPrimaryKeyWithoutBLOBs(IntrospectedTable introspectedTable)
This method should return an XmlElement for the update by primary key statement that updates all fields in the table (excluding BLOB fields). |
void |
setAbatorContext(AbatorContext abatorContext)
Sets the instance of the AbatorConfiguration object associated with this instance. |
void |
setJavaModelGenerator(JavaModelGenerator javaModelGenerator)
|
void |
setTargetPackage(java.lang.String targetPackage)
|
void |
setTargetProject(java.lang.String targetProject)
|
void |
setWarnings(java.util.List warnings)
Abator will supply a list to this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List warnings
protected AbatorContext abatorContext
protected java.util.Properties properties
protected java.lang.String targetPackage
protected java.lang.String targetProject
protected JavaModelGenerator javaModelGenerator
Constructor Detail |
public SqlMapGeneratorIterateImpl()
Method Detail |
public void addConfigurationProperties(java.util.Properties properties)
SqlMapGenerator
addConfigurationProperties
in interface SqlMapGenerator
properties
- All properties from the configurationpublic void setTargetPackage(java.lang.String targetPackage)
setTargetPackage
in interface SqlMapGenerator
public void setJavaModelGenerator(JavaModelGenerator javaModelGenerator)
setJavaModelGenerator
in interface SqlMapGenerator
public java.util.List getGeneratedXMLFiles(IntrospectedTable introspectedTable, ProgressCallback callback)
getGeneratedXMLFiles
in interface SqlMapGenerator
protected GeneratedXmlFile getSqlMap(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getSqlMapElement(IntrospectedTable introspectedTable)
introspectedTable
-
protected void afterGenerationHook(IntrospectedTable introspectedTable, Document generatedDocument)
generatedDocument
- the generated documentprotected XmlElement getBaseResultMapElement(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getResultMapWithBLOBsElement(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getInsertElement(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getUpdateByPrimaryKeyWithBLOBs(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getUpdateByPrimaryKeyWithoutBLOBs(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getDeleteByPrimaryKey(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getDeleteByExample(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getCountByExample(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getSelectByPrimaryKey(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getSelectKey(ColumnDefinition columnDefinition, GeneratedKey generatedKey)
columnDefinition
- the column related to the select key statementgeneratedKey
- the generated key for the current table
public java.lang.String getSqlMapNamespace(FullyQualifiedTable table)
getSqlMapNamespace
in interface SqlMapGenerator
protected java.lang.String getResultMapName(FullyQualifiedTable table)
table
- the current table
protected java.lang.String getSqlMapFileName(FullyQualifiedTable table)
table
- the current table
public java.lang.String getDeleteByPrimaryKeyStatementId()
getDeleteByPrimaryKeyStatementId
in interface SqlMapGenerator
public java.lang.String getDeleteByExampleStatementId()
getDeleteByExampleStatementId
in interface SqlMapGenerator
public java.lang.String getCountByExampleStatementId()
getCountByExampleStatementId
in interface SqlMapGenerator
public java.lang.String getInsertStatementId()
getInsertStatementId
in interface SqlMapGenerator
public java.lang.String getSelectByPrimaryKeyStatementId()
getSelectByPrimaryKeyStatementId
in interface SqlMapGenerator
public java.lang.String getSelectByExampleStatementId()
getSelectByExampleStatementId
in interface SqlMapGenerator
public java.lang.String getSelectByExampleWithBLOBsStatementId()
getSelectByExampleWithBLOBsStatementId
in interface SqlMapGenerator
public java.lang.String getUpdateByPrimaryKeyWithBLOBsStatementId()
getUpdateByPrimaryKeyWithBLOBsStatementId
in interface SqlMapGenerator
public java.lang.String getUpdateByPrimaryKeyStatementId()
getUpdateByPrimaryKeyStatementId
in interface SqlMapGenerator
public java.lang.String getUpdateByPrimaryKeySelectiveStatementId()
getUpdateByPrimaryKeySelectiveStatementId
in interface SqlMapGenerator
public java.lang.String getUpdateByExampleSelectiveStatementId()
getUpdateByExampleSelectiveStatementId
in interface SqlMapGenerator
protected java.lang.String getSqlMapPackage(FullyQualifiedTable table)
table
- the current table
protected java.lang.String getExampleWhereClauseId()
protected XmlElement getByExampleWhereClauseFragment(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getSelectByExample(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getSelectByExampleWithBLOBs(IntrospectedTable introspectedTable)
introspectedTable
-
public void setTargetProject(java.lang.String targetProject)
setTargetProject
in interface SqlMapGenerator
public void setWarnings(java.util.List warnings)
SqlMapGenerator
setWarnings
in interface SqlMapGenerator
warnings
- protected XmlElement getUpdateByPrimaryKeySelective(IntrospectedTable introspectedTable)
introspectedTable
-
public void setAbatorContext(AbatorContext abatorContext)
SqlMapGenerator
setAbatorContext
in interface SqlMapGenerator
abatorContext
- The current AbatorContextprotected XmlElement getUpdateByExampleSelective(IntrospectedTable introspectedTable)
introspectedTable
-
protected XmlElement getUpdateByExampleWithBLOBs(IntrospectedTable introspectedTable)
protected XmlElement getUpdateByExampleWithoutBLOBs(IntrospectedTable introspectedTable)
public java.lang.String getUpdateByExampleStatementId()
getUpdateByExampleStatementId
in interface SqlMapGenerator
public java.lang.String getUpdateByExampleWithBLOBsStatementId()
getUpdateByExampleWithBLOBsStatementId
in interface SqlMapGenerator
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |