Class GcBoundDataConversionImpl
java.lang.Object
edu.internet2.middleware.grouperClient.jdbc.GcBoundDataConversionImpl
- All Implemented Interfaces:
GcBoundDataConversion
This is our implementation of a helper to convert data to and from Oracle. It is externalized because it will likely be common that editing will need to be done on a per project basis.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBindVariableToStatement(PreparedStatement preparedStatement, Object bindVar, int index) Add the value to the prepared statement, doing any casting, etc needed.<T> TgetFieldValue(Class<T> clazz, Object value) Cast and manipulate the value returned from the database to get it into the appropriate value for assignment.voidsetFieldValue(Object instance, Field field, Object value) Set the value of a field, do any casting, etc needed.
-
Constructor Details
-
GcBoundDataConversionImpl
public GcBoundDataConversionImpl()
-
-
Method Details
-
addBindVariableToStatement
public void addBindVariableToStatement(PreparedStatement preparedStatement, Object bindVar, int index) Add the value to the prepared statement, doing any casting, etc needed.- Specified by:
addBindVariableToStatementin interfaceGcBoundDataConversion- Parameters:
preparedStatement- is the statement to add the value to.bindVar- is the bindvar to add.index- is the indes of the statement to add it to.
-
setFieldValue
Set the value of a field, do any casting, etc needed.- Specified by:
setFieldValuein interfaceGcBoundDataConversion- Parameters:
instance- is the instance to set the value to.field- is the field taking the value.value- is the value to set.
-
getFieldValue
Cast and manipulate the value returned from the database to get it into the appropriate value for assignment.- Specified by:
getFieldValuein interfaceGcBoundDataConversion- Type Parameters:
T- is the type to return.- Parameters:
clazz- is the type to return.value- is the value to cast or manipulate.- Returns:
- the manipulated value.
-