Package net.ontopia.persistence.proxy
Class DefaultFieldHandler
java.lang.Object
net.ontopia.persistence.proxy.DefaultFieldHandler
- All Implemented Interfaces:
FieldHandlerIF
INTERNAL: The default field handler implementation that is able to
read values from result sets and bind values in prepared statements
without any particular knowledge about fields. The field handler
only works with single columns of the type specified in the class
constructor.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFieldHandler(int sql_type) Creates a instance of the default field handler by passing the SQL type to used for reading and storing column values. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(Object value, PreparedStatement stm, int stmt_index) INTERNAL: Binds the object field value starting from the given offset in the prepared statement.intINTERNAL: Returns the number of columns that the field spans.booleanINTERNAL: Returns true if the field handler references an object identity field.load(AccessRegistrarIF registrar, TicketIF ticket, ResultSet rs, int rsindex, boolean direct) INTERNAL: Reads the value beginning at the given offset in the current ResultSet row.voidretrieveFieldValues(Object value, List<Object> field_values) voidretrieveSQLValues(Object value, List<SQLValueIF> sql_values) toString()
-
Field Details
-
sql_type
protected int sql_type
-
-
Constructor Details
-
DefaultFieldHandler
public DefaultFieldHandler(int sql_type) Creates a instance of the default field handler by passing the SQL type to used for reading and storing column values.
-
-
Method Details
-
getColumnCount
public int getColumnCount()Description copied from interface:FieldHandlerIFINTERNAL: Returns the number of columns that the field spans.- Specified by:
getColumnCountin interfaceFieldHandlerIF
-
isIdentityField
public boolean isIdentityField()Description copied from interface:FieldHandlerIFINTERNAL: Returns true if the field handler references an object identity field.- Specified by:
isIdentityFieldin interfaceFieldHandlerIF
-
load
public Object load(AccessRegistrarIF registrar, TicketIF ticket, ResultSet rs, int rsindex, boolean direct) throws SQLException Description copied from interface:FieldHandlerIFINTERNAL: Reads the value beginning at the given offset in the current ResultSet row. The number of columns actually read depends on the type of object field.- Specified by:
loadin interfaceFieldHandlerIF- Throws:
SQLException
-
bind
Description copied from interface:FieldHandlerIFINTERNAL: Binds the object field value starting from the given offset in the prepared statement. The number of columns actually bound depends on the type of object field.- Specified by:
bindin interfaceFieldHandlerIF- Throws:
SQLException
-
retrieveFieldValues
- Specified by:
retrieveFieldValuesin interfaceFieldHandlerIF
-
retrieveSQLValues
- Specified by:
retrieveSQLValuesin interfaceFieldHandlerIF
-
toString
-