public class UtilDateType extends Object implements ExtendedType
java.util.Date to any of the three database date/time types: TIME,
DATE, TIMESTAMP.| Constructor and Description |
|---|
UtilDateType() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertToJdbcObject(Object val,
int type) |
String |
getClassName()
Returns "java.util.Date".
|
Date |
materializeObject(CallableStatement cs,
int index,
int type)
Reads an object from a stored procedure OUT parameter, converting it to class
returned by 'getClassName' method.
|
Date |
materializeObject(ResultSet rs,
int index,
int type)
Reads an object from JDBC ResultSet column, converting it to class returned by
'getClassName' method.
|
void |
setJdbcObject(PreparedStatement statement,
Object value,
int pos,
int type,
int scale)
Initializes a single parameter of a PreparedStatement with object value.
|
public String getClassName()
getClassName in interface ExtendedTypeprotected Object convertToJdbcObject(Object val, int type) throws Exception
Exceptionpublic Date materializeObject(ResultSet rs, int index, int type) throws Exception
ExtendedTypematerializeObject in interface ExtendedTypeException - if read error occurred, or an object can't be converted to a
target Java class.public Date materializeObject(CallableStatement cs, int index, int type) throws Exception
ExtendedTypematerializeObject in interface ExtendedTypeException - if read error ocurred, or an object can't be converted to a
target Java class.public void setJdbcObject(PreparedStatement statement, Object value, int pos, int type, int scale) throws Exception
ExtendedTypesetJdbcObject in interface ExtendedTypeExceptionCopyright © 2001–2018 Apache Cayenne. All rights reserved.