|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jdbcexporter.config.ExportEntityConfigDelegate
The ExportEntityConfigDelegate constructs ExportEntityDef and ExportColumnDef from the Node objects.
| Field Summary | |
static java.lang.String |
COLUMN_TRANSLATOR_ATTR
The attribute name that contains the ColumnTranslator classname to use on all column values to be exported. |
static java.lang.String |
COLUMN_TRANSLATOR_TAG
The element name that contains the ColumnTranslator definition. |
static java.lang.String |
COLUMN_TRANSLATOR_TYPE_ATTR
The attribute name in the COLUMN_TRANSLATOR_TAG element that contains the column translator type. |
protected CustomObjectFactory |
columnTranslatorFactory
The custom object factory that can create ColumnTranslators from column translator types. |
static java.lang.String |
DELIMITER_TAG
The element name that contains the DelimiterFormatter definition. |
static java.lang.String |
DELIMITER_TYPE_ATTR
The attribute name in the DELIMITER_TAG element that contains contains the delimiter type. |
protected CustomObjectFactory |
delimiterFormatterFactory
The custom object factory that can create DelimiterFormatters from delimiter formatter types. |
protected boolean |
delimiterMandatory
Flag indicating that the 'delimiter' child element is mandatory (default true). |
static java.lang.String |
EXPORT_ENGINE_ATTR
The element name that contains the class name of export engine used to export this entity. |
protected static org.apache.commons.logging.Log |
LOG
The log for debug information. |
static java.lang.String |
TARGET_ATTR
The attribute name that contains the name of data file that will contain the data exported. |
static java.lang.String |
TARGET_ENCODING_ATTR
The attribute name that contains the encoding of the target file. |
protected boolean |
targetMandatory
Flag indicating that the 'target' attribute is mandatory (default true). |
static java.lang.String |
WHERE_CLAUSE_ATTR
The attribute name that contains the where clause for the sql select statement. |
| Constructor Summary | |
ExportEntityConfigDelegate()
Creates an ExportEntityConfigDelegate that requires the 'target' attribute and the 'delimiter' child element. |
|
ExportEntityConfigDelegate(boolean targetMandatory,
boolean delimiterMandatory)
Creates an ExportEntityConfigDelegate with the given mandatory flags. |
|
| Method Summary | |
ColumnDef |
createColumnDef(org.w3c.dom.Node column)
Create a ColumnDef from the given node and apply any custom attributes. |
EntityDef |
createEntityDef(org.w3c.dom.Node node)
Create an EntityDef from the given node and apply any custom attributes. |
protected void |
initDelimiter(ExportEntityDef entityDef,
org.w3c.dom.Node delimiter)
Load the delimiter formatter defined in the given node into the ExportEntityDef. |
protected ColumnTranslator |
instantiateTranslator(java.lang.String className)
Instantiate a column translator. |
void |
setColumnTranslatorFactory(CustomObjectFactory factory)
Set the custom object factory for create column translators. |
void |
setDelimiterFormatterFactory(CustomObjectFactory factory)
Set the custom object factory for creating delimiter formatters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.commons.logging.Log LOG
public static final java.lang.String TARGET_ATTR
public static final java.lang.String TARGET_ENCODING_ATTR
public static final java.lang.String WHERE_CLAUSE_ATTR
public static final java.lang.String EXPORT_ENGINE_ATTR
public static final java.lang.String DELIMITER_TAG
public static final java.lang.String DELIMITER_TYPE_ATTR
public static final java.lang.String COLUMN_TRANSLATOR_ATTR
public static final java.lang.String COLUMN_TRANSLATOR_TAG
public static final java.lang.String COLUMN_TRANSLATOR_TYPE_ATTR
protected CustomObjectFactory delimiterFormatterFactory
protected CustomObjectFactory columnTranslatorFactory
protected boolean targetMandatory
protected boolean delimiterMandatory
| Constructor Detail |
public ExportEntityConfigDelegate()
public ExportEntityConfigDelegate(boolean targetMandatory,
boolean delimiterMandatory)
targetMandatory - flag indicating whether the 'target' attribute is required or notdelimiterMandatory - flag indicating whether the 'delimiter' element is required or not| Method Detail |
public EntityDef createEntityDef(org.w3c.dom.Node node)
throws org.w3c.dom.DOMException,
InvalidCustomObjectDefException
EntityConfigDelegate
createEntityDef in interface EntityConfigDelegatenode - the element node with the name 'entity'
InvalidCustomObjectDefException - if the custom EntityDef could not be created
org.w3c.dom.DOMException - if any custom attributes are missing or invalidEntityConfigDelegate.createEntityDef(org.w3c.dom.Node)
public ColumnDef createColumnDef(org.w3c.dom.Node column)
throws org.w3c.dom.DOMException,
InvalidCustomObjectDefException
EntityConfigDelegate
createColumnDef in interface EntityConfigDelegatecolumn - the element node with the name 'column'
org.w3c.dom.DOMException - if any custom attributes are missing or invalid
InvalidCustomObjectDefException - if the custom ColumnDef could not be createdEntityConfigDelegate.createColumnDef(org.w3c.dom.Node)public void setDelimiterFormatterFactory(CustomObjectFactory factory)
factory - the delimiter formatter factorypublic void setColumnTranslatorFactory(CustomObjectFactory factory)
factory - the delimiter formatter factory
protected void initDelimiter(ExportEntityDef entityDef,
org.w3c.dom.Node delimiter)
throws org.w3c.dom.DOMException,
InvalidCustomObjectDefException
entityDef - the export entity definitiondelimiter - the node containing the delimiter formatter definition.
org.w3c.dom.DOMException - if the node is invalid
InvalidCustomObjectDefException - if the delimiter formatter could not
be created by the delimiter formatter factory
protected ColumnTranslator instantiateTranslator(java.lang.String className)
throws org.w3c.dom.DOMException
className - the class name of the column translator
org.w3c.dom.DOMException - if the column translator could not be instantiated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||