|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.access.types.AbstractType
public abstract class AbstractType
A convenience superclass of ExtendedType implementations. Implements
setJdbcObject(PreparedStatement, Object, int, int, int)
in a generic fashion
by calling "setObject(..)" on PreparedStatement. Some adapters may need to override
this behavior as it doesn't work consistently across all JDBC drivers.
Constructor Summary | |
---|---|
AbstractType()
|
Method Summary | |
---|---|
abstract java.lang.String |
getClassName()
Returns a full name of Java class that this ExtendedType supports. |
abstract java.lang.Object |
materializeObject(java.sql.CallableStatement rs,
int index,
int type)
Reads an object from a stored procedure OUT parameter, converting it to class returned by 'getClassName' method. |
abstract java.lang.Object |
materializeObject(java.sql.ResultSet rs,
int index,
int type)
Reads an object from JDBC ResultSet column, converting it to class returned by 'getClassName' method. |
void |
setJdbcObject(java.sql.PreparedStatement st,
java.lang.Object val,
int pos,
int type,
int precision)
Calls "PreparedStatement.setObject(..)". |
java.lang.String |
toString()
|
static boolean |
validateNull(java.lang.Object source,
java.lang.String property,
java.lang.Object value,
DbAttribute dbAttribute,
ValidationResult validationResult)
Helper method for ExtendedType implementors to check for null required values. |
boolean |
validateProperty(java.lang.Object source,
java.lang.String property,
java.lang.Object value,
DbAttribute dbAttribute,
ValidationResult validationResult)
Always returns true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractType()
Method Detail |
---|
public static boolean validateNull(java.lang.Object source, java.lang.String property, java.lang.Object value, DbAttribute dbAttribute, ValidationResult validationResult)
public void setJdbcObject(java.sql.PreparedStatement st, java.lang.Object val, int pos, int type, int precision) throws java.lang.Exception
setJdbcObject
in interface ExtendedType
java.lang.Exception
public abstract java.lang.String getClassName()
ExtendedType
getClassName
in interface ExtendedType
public abstract java.lang.Object materializeObject(java.sql.CallableStatement rs, int index, int type) throws java.lang.Exception
ExtendedType
materializeObject
in interface ExtendedType
java.lang.Exception
- if read error ocurred, or an object can't be converted to a
target Java class.public abstract java.lang.Object materializeObject(java.sql.ResultSet rs, int index, int type) throws java.lang.Exception
ExtendedType
materializeObject
in interface ExtendedType
java.lang.Exception
- if read error ocurred, or an object can't be converted to a
target Java class.public boolean validateProperty(java.lang.Object source, java.lang.String property, java.lang.Object value, DbAttribute dbAttribute, ValidationResult validationResult)
validateProperty
in interface ExtendedType
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |