|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I_AttributeTransformer
Supports adding of customized attributes (key/values) to the xml dump.
Example:
<sql> <desc> <command>INSERT</command> <ident>AFTN_CIRCUIT_STATE</ident> <colname type='DATE' nullable='0'>DATUM</colname> <colname type='NUMBER' precision='11' nullable='0'>CPU</colname> </desc> <row num='0'> <col name='DATUM'>2005-01-05 15:41:36.0</col> <col name='CPU'>238089</col> <attr name='SUBNET_ID'>TCP</attr> <attr name='CIRCUIT'>AAAAAAAAAAAAAAAZ</attr> <attr name='CIRCUIT_STATE'>OPERATIVE</attr> </row> </sql>
The above attr tags are created by all Map entries
returned with the transform(ResultSet rs, int rowCount)
method.
It is up to your plugin to create arbitrary map entries which you want
to add.
Method Summary | |
---|---|
void |
init(I_Info info)
Is called after construction. |
void |
shutdown()
Cleanup resources. |
java.util.Map |
transform(java.sql.ResultSet rs,
int rowCount)
Customized transformation to key/values from a given JDBC result set. |
Method Detail |
---|
void init(I_Info info) throws java.lang.Exception
info
- The configuration environment
java.lang.Exception
java.util.Map transform(java.sql.ResultSet rs, int rowCount) throws java.lang.Exception
This is called from I_DataConverter for each row instance 'rs', you may not call rs.next().
rs
- The SQL resultrowCount
- -1 when called for the <desc> section else
it is the current row count of the ResultSet beginning with 0
java.lang.Exception
- if the plugin desires sovoid shutdown() throws java.lang.Exception
java.lang.Exception
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |