|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.access.types.AbstractType
org.apache.cayenne.access.types.DefaultType
public class DefaultType
An ExtendedType that can work with any Java class, providing JDBC-to-Java mapping exactly per JDBC specification.
Field Summary | |
---|---|
protected String |
className
|
protected Method |
procReadMethod
|
protected Method |
readMethod
|
Constructor Summary | |
---|---|
DefaultType()
Creates DefaultType to read objects from ResultSet using "getObject" method. |
|
DefaultType(String className)
|
Method Summary | |
---|---|
static Iterator |
defaultTypes()
Returns an Iterator of supported default Java classes (as Strings) |
String |
getClassName()
Returns a full name of Java class that this ExtendedType supports. |
Object |
materializeObject(CallableStatement st,
int index,
int type)
Reads an object from a stored procedure OUT parameter, converting it to class returned by 'getClassName' method. |
Object |
materializeObject(ResultSet rs,
int index,
int type)
Reads an object from JDBC ResultSet column, converting it to class returned by 'getClassName' method. |
Methods inherited from class org.apache.cayenne.access.types.AbstractType |
---|
setJdbcObject, toString, validateNull, validateProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String className
protected Method readMethod
protected Method procReadMethod
Constructor Detail |
---|
public DefaultType()
public DefaultType(String className)
Method Detail |
---|
public static Iterator defaultTypes()
public String getClassName()
ExtendedType
getClassName
in interface ExtendedType
getClassName
in class AbstractType
public Object materializeObject(ResultSet rs, int index, int type) throws Exception
ExtendedType
materializeObject
in interface ExtendedType
materializeObject
in class AbstractType
Exception
- if read error ocurred, or an object can't be converted to a
target Java class.public Object materializeObject(CallableStatement st, int index, int type) throws Exception
ExtendedType
materializeObject
in interface ExtendedType
materializeObject
in class AbstractType
Exception
- if read error ocurred, or an object can't be converted to a
target Java class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |