public class ReverseMappingToolTask extends AbstractTask
ReverseMappingTool
on the specified XML files.
This task can take the following arguments:
package
directory
useSchemaName
useSchemaElement
useForeignKeyName
nullableAsObject
blobAsObject
typeMap
primaryKeyOnJoin
useDatastoreIdentity
useBuiltinIdentityClass
detachable
inverseRelations
discriminatorStrategy
versionStrategy
innerIdentityClasses
identityClassSuffix
metadata
customizerClass
customizerProperties
codeFormat
element with
attributes for the bean properties of the CodeFormat
.Modifier and Type | Class and Description |
---|---|
static class |
ReverseMappingToolTask.AccessType |
static class |
ReverseMappingToolTask.Level |
Modifier and Type | Field and Description |
---|---|
protected String |
customizerClass |
protected String |
customizerProperties |
protected String |
dirName |
protected ReverseMappingTool.Flags |
flags |
protected String |
typeMap |
classpath, fileSets, haltOnError, isolate, useParent
Constructor and Description |
---|
ReverseMappingToolTask()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
createCodeFormat() |
protected void |
executeOn(String[] files)
Perform the task action on the given files.
|
protected ConfigurationImpl |
newConfiguration()
Implement this method to return a configuration object for the
product in use.
|
void |
setAccessType(ReverseMappingToolTask.AccessType accessType)
Whether to use field or property-based access on generated code.
|
void |
setBlobAsObject(boolean blobAsObject)
Set whether to represent blob columns as Java objects rather than
byte[] fields.
|
void |
setCustomizerClass(String customizerClass)
Set a customizer class to use.
|
void |
setCustomizerProperties(String customizerProperties)
Set a properties file to pass to the customizer class.
|
void |
setDetachable(boolean detachable)
Set whether to make generated classes detachable.
|
void |
setDirectory(String dirName)
Set the output directory for the generated classes.
|
void |
setDiscriminatorStrategy(String discStrat)
Default discriminator strategy for base class mappings.
|
void |
setGenerateAnnotations(boolean genAnnotations)
Whether to generate annotations along with generated code.
|
void |
setIdentityClassSuffix(String suffix)
The suffix to use to create the identity class name for a class, or
for inner classes, the name of the inner class.
|
void |
setInnerIdentityClasses(boolean innerAppId)
Whether or not to generate application identity classes as inner classes.
|
void |
setInverseRelations(boolean inverseRelations)
Set whether to generate inverse 1-many/1-1 relations for all many-1/1-1
relations.
|
void |
setMetadata(ReverseMappingToolTask.Level level)
Set the level of the generated metadata.
|
void |
setNullableAsObject(boolean nullableAsObject)
Set whether to represent nullable columns as primitive wrappers.
|
void |
setPackage(String pkg)
Set the package name for the generated classes.
|
void |
setPrimaryKeyOnJoin(boolean primaryKeyOnJoin)
Set whether to allow primary keys on join tables.
|
void |
setTypeMap(String typeMap)
Set the SQL type map overrides.
|
void |
setUseBuiltinIdentityClass(boolean useBuiltinIdentityClass)
Set whether to use single field identity where possible.
|
void |
setUseDataStoreIdentity(boolean useDataStoreIdentity)
Set whether to use datastore identity by default.
|
void |
setUseForeignKeyName(boolean useForeignKeyName)
Set whether to use foreign key names to name relations.
|
void |
setUseGenericCollections(boolean useGenericCollections)
Set whether to use generic collections on one-to-many and many-to-many
relations instead of untyped collections.
|
void |
setUseSchemaElement(boolean useSchemaElement)
Set whether to use the schema name in generated files
|
void |
setUseSchemaName(boolean useSchemaName)
Set whether to use the schema name when naming the classes.
|
void |
setVersionStrategy(String versionStrat)
Default version strategy for base class mappings.
|
addFileset, assertFiles, createClasspath, createConfig, execute, getClassLoader, getConfiguration, setClasspath, setHaltOnError, setIsolate, setUseParentClassloader
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
protected ReverseMappingTool.Flags flags
protected String dirName
protected String typeMap
protected String customizerProperties
protected String customizerClass
public void setPackage(String pkg)
public void setDirectory(String dirName)
public void setUseSchemaName(boolean useSchemaName)
public void setUseSchemaElement(boolean useSchemaElement)
public void setUseForeignKeyName(boolean useForeignKeyName)
public void setNullableAsObject(boolean nullableAsObject)
public void setBlobAsObject(boolean blobAsObject)
public void setUseGenericCollections(boolean useGenericCollections)
public void setTypeMap(String typeMap)
public void setPrimaryKeyOnJoin(boolean primaryKeyOnJoin)
public void setUseDataStoreIdentity(boolean useDataStoreIdentity)
public void setUseBuiltinIdentityClass(boolean useBuiltinIdentityClass)
public void setInverseRelations(boolean inverseRelations)
public void setDetachable(boolean detachable)
public void setDiscriminatorStrategy(String discStrat)
public void setVersionStrategy(String versionStrat)
public void setInnerIdentityClasses(boolean innerAppId)
public void setIdentityClassSuffix(String suffix)
public void setMetadata(ReverseMappingToolTask.Level level)
public void setGenerateAnnotations(boolean genAnnotations)
public void setAccessType(ReverseMappingToolTask.AccessType accessType)
public void setCustomizerClass(String customizerClass)
public void setCustomizerProperties(String customizerProperties)
public Object createCodeFormat()
protected ConfigurationImpl newConfiguration()
AbstractTask
newConfiguration
in class AbstractTask
protected void executeOn(String[] files) throws Exception
AbstractTask
executeOn
in class AbstractTask
Exception
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.