Overview | Package | Class | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package com.synex.xml.ext

Contains the Java Custom Extensions framework, and miscellaneous utility classes (a random-number generator, sequence-number generator, and current date and time facilities).

See:
Description

Interface Summary
CustomAction | Basic interface for Java Custom Extension.

Class Summary
CurrentDate | The implementation of the java custom extension.
RandomGenerator | The implementation of the java custom extension.
SequenceGenerator | The implementation of the java custom extension.

## Package com.synex.xml.ext Description

Contains the Java Custom Extensions framework, and miscellaneous utility classes (a random-number generator, sequence-number generator, and current date and time facilities).

With Java Custom Extensions (JCE), you can generate the field values dynamically at run-time. JCE may be used in the value of element attributes. This is done by placing the JCE class name between "${" and "}" in the attribute value. For example, if there is a "com.synex.xml.ext.CurrentDate" class with the method getValue() that returns the current system date, then this could be used in an attribute like this: ${com.synex.xml.ext.CurrentDate}.

NOTE: The JCE class should implement CustomAction interface.

The following example class gets the current date:

    public class CurrentDate implements CustomAction {

        public java.lang.String getValue() {
            return new java.sql.Timestamp(new java.util.Date().getTime()).toString();
        }

    }

Then, consider this fragment of an XML document:

    <custOrder custOrderID="custOrder:1"
               createdDate="${com.synex.xml.ext.CurrentDate}"/>
    ...

In the example above, the createDate attribute of <custOrder> is settled as the current system date during the bulk loading. Also, you can use JCE for generating of ID unique values or other application specific values.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Submit a bug or feature
For further API reference and developer documentation, see XML Bulk Loader Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright 2002 Sergey Yakovlev, All Rights Reserved.