Package org.synchronoss.cpo.jdbc
Class JdbcPreparedStatementCpoData
java.lang.Object
org.synchronoss.cpo.core.AbstractCpoData
org.synchronoss.cpo.core.meta.AbstractBindableCpoData
org.synchronoss.cpo.jdbc.AbstractStatementCpoData
org.synchronoss.cpo.jdbc.JdbcPreparedStatementCpoData
- All Implemented Interfaces:
CpoData
The data handler for a prepared statement
- Author:
- dberry
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcPreparedStatementCpoData(JdbcPreparedStatementFactory cpoStatementFactory, CpoAttribute cpoAttribute, int index) Construct a JdbcPreparedStatementCpoData -
Method Summary
Modifier and TypeMethodDescriptionvoidinvokeSetter(Object instanceObject) Invokes the bean's setter for the bound attribute.transformOut(Object attributeObject) Transforms a value read from the bean attribute into the form expected by the datastore, applying the attribute's configured transform (if any).Methods inherited from class org.synchronoss.cpo.core.meta.AbstractBindableCpoData
getIndexMethods inherited from class org.synchronoss.cpo.core.AbstractCpoData
getCpoAttribute, getDataGetterReturnType, getDataSetterParamType, invokeGetter, setCpoAttribute, transformIn
-
Constructor Details
-
JdbcPreparedStatementCpoData
public JdbcPreparedStatementCpoData(JdbcPreparedStatementFactory cpoStatementFactory, CpoAttribute cpoAttribute, int index) Construct a JdbcPreparedStatementCpoData- Parameters:
cpoStatementFactory- - The JdbcPreparedStatementFactorycpoAttribute- - The CpoAttribute to manageindex- - The index of the CpoAttribute
-
-
Method Details
-
invokeSetter
Description copied from class:AbstractCpoDataInvokes the bean's setter for the bound attribute.Not implemented by this base class; subclasses that support reflective setter invocation must override this method.
- Specified by:
invokeSetterin interfaceCpoData- Overrides:
invokeSetterin classAbstractCpoData- Parameters:
instanceObject- the value to pass to the attribute's setter- Throws:
CpoException- if the setter cannot be invoked
-
transformOut
Description copied from class:AbstractCpoDataTransforms a value read from the bean attribute into the form expected by the datastore, applying the attribute's configured transform (if any).Applies the attribute's configured
CpoTransform, if any; otherwise returns the value unchanged.- Specified by:
transformOutin interfaceCpoData- Overrides:
transformOutin classAbstractCpoData- Parameters:
attributeObject- the raw value read from the bean's getter- Returns:
- the value to bind to the datastore statement, transformed if a transform is configured
- Throws:
CpoException- if the transform fails
-