Package org.synchronoss.cpo.jdbc
Class CallableStatementCpoData
java.lang.Object
org.synchronoss.cpo.core.AbstractCpoData
org.synchronoss.cpo.core.meta.AbstractBindableCpoData
org.synchronoss.cpo.jdbc.AbstractStatementCpoData
org.synchronoss.cpo.jdbc.CallableStatementCpoData
- All Implemented Interfaces:
CpoData
Moves a bound attribute's value to or from a JDBC
CallableStatement IN/OUT parameter,
applying any configured JdbcCpoTransform along the way.- Author:
- dberry
-
Constructor Summary
ConstructorsConstructorDescriptionCallableStatementCpoData(CallableStatement cs, CpoAttribute cpoAttribute, int index) Constructs a CallableStatementCpoDataCallableStatementCpoData(JdbcCallableStatementFactory jcsf, CpoAttribute cpoAttribute, int index) Constructs a CallableStatementCpoData -
Method Summary
Modifier and TypeMethodDescriptionInvokes the bean's getter for the bound attribute.voidinvokeSetter(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, setCpoAttribute, transformIn
-
Constructor Details
-
CallableStatementCpoData
Constructs a CallableStatementCpoData- Parameters:
cs- - The callable statementcpoAttribute- - The attribute to add.index- - The index of the attribute in the callable statement
-
CallableStatementCpoData
public CallableStatementCpoData(JdbcCallableStatementFactory jcsf, CpoAttribute cpoAttribute, int index) Constructs a CallableStatementCpoData- Parameters:
jcsf- - The factory for building the callable statementcpoAttribute- - The attribute to add.index- - The index of the attribute in the callable statement
-
-
Method Details
-
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
-
invokeGetter
Description copied from class:AbstractCpoDataInvokes the bean's getter for the bound attribute.Not implemented by this base class; subclasses that support reflective getter invocation must override this method.
- Specified by:
invokeGetterin interfaceCpoData- Overrides:
invokeGetterin classAbstractCpoData- Returns:
- the value returned by the attribute's getter
- Throws:
CpoException- if the getter cannot be invoked
-
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
-