Package overit.geocall.sql
Class DBDrivenLoader
java.lang.Object
overit.geocall.sql.DBDrivenLoader
- All Implemented Interfaces:
DBObjectMap
The class extends a
DBObjectMap and can be used in specifical cases to force load
(for example to force, during the creation of a DBView, the instantiation of a Float, etc.)-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intStores the forcing typestatic final intConstant that defines theBooleanforcingstatic final intConstant that defines theDateforcingstatic final intConstant that defines theDoubleforcingstatic final intConstant that defines theEuroforcingstatic final intConstant that defines theFloatforcingstatic final intConstant that defines theIntegerforcingstatic final intConstant that defines theLongforcingstatic final intConstant that defines theStringforcing -
Constructor Summary
ConstructorsConstructorDescriptionDBDrivenLoader(int type) Creates the instance of DBDrivenLoader with the specific mapping type -
Method Summary
Modifier and TypeMethodDescriptionloadInstance(ResultSet rs, int field) Implements the transformations and the reading of a field in a Java object, starting from aResultSet, the position and the informations of theResultSetMetaDatavoidsaveInstance(int field, Object o) Does nothing because the object does not have the ability to savevoidsaveInstance(PreparedStatement ps, int field, Object o) Does nothing because the object does not have the ability to saveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.sql.DBObjectMap
loadInstance, loadInstance
-
Field Details
-
TYPE_INTEGER
public static final int TYPE_INTEGERConstant that defines theIntegerforcing- See Also:
-
TYPE_LONG
public static final int TYPE_LONGConstant that defines theLongforcing- See Also:
-
TYPE_FLOAT
public static final int TYPE_FLOATConstant that defines theFloatforcing- See Also:
-
TYPE_DOUBLE
public static final int TYPE_DOUBLEConstant that defines theDoubleforcing- See Also:
-
TYPE_DATE
public static final int TYPE_DATEConstant that defines theDateforcing- See Also:
-
TYPE_EURO
public static final int TYPE_EUROConstant that defines theEuroforcing- See Also:
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEANConstant that defines theBooleanforcing- See Also:
-
TYPE_STRING
public static final int TYPE_STRINGConstant that defines theStringforcing- See Also:
-
_type
protected int _typeStores the forcing type
-
-
Constructor Details
-
DBDrivenLoader
public DBDrivenLoader(int type) Creates the instance of DBDrivenLoader with the specific mapping type- Parameters:
type- Specific mapping type
-
-
Method Details
-
loadInstance
Implements the transformations and the reading of a field in a Java object, starting from aResultSet, the position and the informations of theResultSetMetaData- Specified by:
loadInstancein interfaceDBObjectMap- Parameters:
rs- The ResultSet from which retrieve the ResultSetMetaData and the values used to create the Java objectfield- Number of the field to read from the ResultSet- Returns:
- The created object instance, created according the choosen forcing type
- Throws:
SQLException- The operation of reading from the database can raise anSQLException
-
saveInstance
Does nothing because the object does not have the ability to save- Specified by:
saveInstancein interfaceDBObjectMap- Parameters:
ps- Does nothing because the object does not have the ability to savefield- Does nothing because the object does not have the ability to saveo- Does nothing because the object does not have the ability to save- Throws:
SQLException- Does nothing because the object does not have the ability to save
-
saveInstance
Does nothing because the object does not have the ability to save- Parameters:
field- Does nothing because the object does not have the ability to saveo- Does nothing because the object does not have the ability to save- Throws:
SQLException- Does nothing because the object does not have the ability to save
-