|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.datagenerator.ant.DelegateEntityDefElement
The DelegateEntityDefElement provides an Ant wrapper for creating a EntityDef object from Ant. The EntityDef could be one of three types : GenerateEntityDef, ImportEntityDef and ExportEntityDef. To create a GenerateEntityDef, the setter for the 'target' property should be invoked. To create an ExportEntityDef, the setter for the 'source' property should be invoked with the value 'db'. To create an ImportEntityDef, the setter for the 'source' property should be invoked with any value except 'db'.
Field Summary | |
protected java.lang.String |
catalog
The name of the catalog that contains the table. |
protected java.util.List |
columnElements
The list of column def elements. |
protected int |
count
The number of rows to generate (used when creating a GenerateEntityDef). |
static int |
DATAGENERATE_ENTITY_DEF
Constant indicating a GenerateEntityDef. |
protected DelegateDelimiterElement |
delimiterElement
The delegate delimiter element. |
protected java.lang.String |
encoding
The encoding charset |
protected int |
entityDefType
The type of EntityDef to create. |
static int |
EXPORT_ENTITY_DEF
Constant indicating an ExportEntityDef. |
static int |
IMPORT_ENTITY_DEF
Constant indicating an ImportEntityDef. |
protected java.util.Map |
plugins
The mapping between custom types and implementations. |
protected java.lang.String |
schema
The name of the schema that owns the table. |
protected java.io.File |
source
The source file (used when creating an ImportEntityDef). |
protected java.lang.String |
table
The name of the table. |
protected java.io.File |
target
The target file (used when creating a GenerateEntityDef). |
static int |
UNKNOWN_ENTITY_DEF
Constant indicating that the EntityDef type is unknown. |
protected java.lang.String |
where
The where clause (used when creating an ExportEntityDef). |
Constructor Summary | |
DelegateEntityDefElement(java.util.Map plugins)
Constructs an DelegateEntityDefElement with the given mapping between custom types and implementations. |
Method Summary | |
DelegateColumnDefElement |
createColumn()
Creates an empty ColumnDefElement and returns it. |
DelegateDelimiterElement |
createDelimiter()
Creates an empty DelegateDelimiterDefElement and returns it. |
EntityDef |
getEntityDef()
Returns the wrapped entity definition. |
void |
setCatalog(java.lang.String name)
Sets the name of the catalog that contains the table. |
void |
setCount(int count)
Sets the number of rows to generate |
void |
setEncoding(java.lang.String encoding)
Sets the encoding of the source or target file. |
void |
setSchema(java.lang.String name)
Sets the name of the schema that owns the table. |
void |
setSource(java.lang.String source)
Sets the source. |
void |
setTable(java.lang.String name)
Sets the name of the table. |
void |
setTarget(java.io.File file)
Sets the target of the generated data. |
void |
setWhere(java.lang.String where)
Sets the where clause for an ExportEntityDef. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNKNOWN_ENTITY_DEF
public static final int IMPORT_ENTITY_DEF
public static final int EXPORT_ENTITY_DEF
public static final int DATAGENERATE_ENTITY_DEF
protected java.util.Map plugins
protected int entityDefType
protected java.lang.String schema
protected java.lang.String catalog
protected java.lang.String table
protected java.io.File source
protected java.lang.String where
protected int count
protected java.io.File target
protected java.lang.String encoding
protected DelegateDelimiterElement delimiterElement
protected java.util.List columnElements
Constructor Detail |
public DelegateEntityDefElement(java.util.Map plugins)
plugins
- the plugin mappingsMethod Detail |
public void setSchema(java.lang.String name)
name
- name of the schemapublic void setCatalog(java.lang.String name)
name
- name of the catalogpublic void setTable(java.lang.String name)
name
- name of the tablepublic void setSource(java.lang.String source)
source
- either 'db' or the source filepublic void setWhere(java.lang.String where)
where
- the where clausepublic void setTarget(java.io.File file)
file
- the file containing the generated data.public void setEncoding(java.lang.String encoding)
encoding
- the encoding charsetpublic void setCount(int count)
count
- the number of rowspublic DelegateColumnDefElement createColumn()
public DelegateDelimiterElement createDelimiter()
public EntityDef getEntityDef() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- if the entity table, delimiter formatter or columns have errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |