|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsystemic.sif.sifcommon.mapping.adapter.ResultSetAdapter
public class ResultSetAdapter
Basic implementation of the ADK FieldAdaptor interface for java.sql.ResultSet. An initial implementation was provided by Andrew Elmhorst. This implementation has been further enhanced by Joerg Huber.
Note: This class is only expected to be used for Outbound message mappings (ie. publishers). The behaviour is unknown (in fact it will not work) for Inbound messages (ie. subscribers).
Constructor Summary | |
---|---|
ResultSetAdapter(java.sql.ResultSet sourceData,
java.lang.Class clazz)
Initialises the ResultSet Adapter. |
Method Summary | |
---|---|
openadk.library.SIFSimpleType |
getSIFValue(java.lang.String name,
openadk.library.SIFTypeConverter typeConverter,
openadk.library.tools.mapping.FieldMapping fm)
|
java.lang.Object |
getValue(java.lang.String name)
|
boolean |
hasField(java.lang.String fieldName)
|
boolean |
hasNext()
Moves the position in the resultset forward by one record. |
openadk.library.SIFDataObject |
map(openadk.library.tools.mapping.MappingsContext mappingCtx)
This methods will return an object of the type specified in the constructor of this class. |
void |
setSIFValue(java.lang.String fieldName,
openadk.library.SIFSimpleType sifDataElement,
openadk.library.tools.mapping.FieldMapping fm)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultSetAdapter(java.sql.ResultSet sourceData, java.lang.Class clazz) throws java.lang.Exception
sourceData
- The resultset for this adapter.clazz
- The class that will be returned as part of the map() method.
java.lang.Exception
- If there is a problem with the resultset and therefore this class cannot be
created.Method Detail |
---|
public openadk.library.SIFDataObject map(openadk.library.tools.mapping.MappingsContext mappingCtx) throws openadk.library.tools.mapping.ADKMappingException
mappingCtx
- The mapping context that shall be used to populate the returned sif object.
openadk.library.tools.mapping.ADKMappingException
- Failure to map due to invalid mapping syntax, context or semantics.public boolean hasNext() throws java.sql.SQLException
Note: Do not call resultSet.next() outside of this class!!!!
java.sql.SQLException
public openadk.library.SIFSimpleType getSIFValue(java.lang.String name, openadk.library.SIFTypeConverter typeConverter, openadk.library.tools.mapping.FieldMapping fm)
getSIFValue
in interface openadk.library.tools.mapping.FieldAdaptor
public java.lang.Object getValue(java.lang.String name)
getValue
in interface openadk.library.tools.mapping.FieldAdaptor
public boolean hasField(java.lang.String fieldName)
hasField
in interface openadk.library.tools.mapping.FieldAdaptor
public void setSIFValue(java.lang.String fieldName, openadk.library.SIFSimpleType sifDataElement, openadk.library.tools.mapping.FieldMapping fm)
setSIFValue
in interface openadk.library.tools.mapping.FieldAdaptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |