Package org.apache.cayenne.access.types
Interface ExtendedType<T>
- All Known Implementing Classes:
- BigDecimalType,- BooleanType,- ByteArrayType,- ByteType,- CalendarType,- CharType,- DateType,- DoubleType,- EnumType,- ExtendedEnumType,- FloatType,- IngresBooleanType,- IntegerType,- LongType,- ObjectType,- OracleByteArrayType,- OracleCharType,- OracleUtilDateType,- ShortType,- TimestampType,- TimeType,- UtilDateType,- VoidType
public interface ExtendedType<T>
Defines methods to read Java objects from JDBC ResultSets and write as parameters of PreparedStatements.
- 
Field SummaryFields Modifier and Type Field Description static intTRIM_VALUES_THRESHOLDDefines trimming constant for toString method that helps to limit logging of large values.
- 
Method SummaryModifier and Type Method Description StringgetClassName()Returns a full name of Java class that this ExtendedType supports.TmaterializeObject(CallableStatement rs, int index, int type)Reads an object from a stored procedure OUT parameter, converting it to class returned by 'getClassName' method.TmaterializeObject(ResultSet rs, int index, int type)Reads an object from JDBC ResultSet column, converting it to class returned by 'getClassName' method.voidsetJdbcObject(PreparedStatement statement, T value, int pos, int type, int scale)Initializes a single parameter of a PreparedStatement with object value.StringtoString(T value)Converts value of the supported type to a human-readable String representation.
- 
Field Details- 
TRIM_VALUES_THRESHOLDstatic final int TRIM_VALUES_THRESHOLDDefines trimming constant for toString method that helps to limit logging of large values.- See Also:
- Constant Field Values
 
 
- 
- 
Method Details- 
getClassNameString getClassName()Returns a full name of Java class that this ExtendedType supports.
- 
setJdbcObjectvoid setJdbcObject(PreparedStatement statement, T value, int pos, int type, int scale) throws ExceptionInitializes a single parameter of a PreparedStatement with object value.- Throws:
- Exception
 
- 
materializeObjectReads an object from JDBC ResultSet column, converting it to class returned by 'getClassName' method.- Throws:
- Exception- if read error occurred, or an object can't be converted to a target Java class.
 
- 
materializeObjectReads an object from a stored procedure OUT parameter, converting it to class returned by 'getClassName' method.- Throws:
- Exception- if read error occurred, or an object can't be converted to a target Java class.
 
- 
toStringConverts value of the supported type to a human-readable String representation.- Parameters:
- value- a value to convert to String.
- Since:
- 4.0
 
 
-