|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
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. |
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.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Copyright 2002 Sergey Yakovlev, All Rights Reserved.