|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jpattern.orm.persistor.PropertyPersistor<BEAN,P,DB>
P - the type of the bean to manipulateP - the type of the bean's property to manipulateDB - the type of the field in the PreparedStatement and ResultSetpublic class PropertyPersistor<BEAN,P,DB>
| Constructor Summary | |
|---|---|
PropertyPersistor(TypeWrapper<P,DB> typeWrapper,
JdbcIO<DB> jdbcIO,
IClassField<BEAN,P> classField,
VersionMath<P> math)
|
|
| Method Summary | |
|---|---|
void |
clonePropertyValue(BEAN source,
BEAN destination)
Set copy the property value from source to destination |
String |
getDbColumnName()
|
DB |
getDBReadyValueFromBean(BEAN bean)
|
void |
getFromResultSet(BEAN bean,
ResultSet rs,
int rsColumnIndex)
Extract the value from a ResultSet and set it to a bean's property |
void |
getFromResultSet(BEAN bean,
ResultSet rs,
String rsColumnNamePrefix)
Extract the value from a ResultSet and set it to a bean's property |
P |
getPropertyValueFromBean(BEAN bean)
|
void |
increaseVersion(BEAN bean,
boolean firstVersionNumber)
|
Class<DB> |
jdbcType()
|
Class<P> |
propertyType()
|
void |
setDBValueToBean(BEAN bean,
DB value)
|
void |
setPropertyValueToBean(BEAN bean,
P value)
|
void |
setToPreparedStatement(DB value,
PreparedStatement ps,
int psIndex)
Extract the value of a bean's property and set it to the PreparedStatement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyPersistor(TypeWrapper<P,DB> typeWrapper,
JdbcIO<DB> jdbcIO,
IClassField<BEAN,P> classField,
VersionMath<P> math)
| Method Detail |
|---|
public void setToPreparedStatement(DB value,
PreparedStatement ps,
int psIndex)
throws IllegalArgumentException,
SQLException,
IllegalAccessException,
InvocationTargetException
PreparedStatement
bean -
InvocationTargetException
IllegalAccessException
SQLException
IllegalArgumentException
public void getFromResultSet(BEAN bean,
ResultSet rs,
String rsColumnNamePrefix)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException,
SQLException
ResultSet and set it to a bean's property
bean -
InvocationTargetException
IllegalAccessException
IllegalArgumentException
SQLException
public void getFromResultSet(BEAN bean,
ResultSet rs,
int rsColumnIndex)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException,
SQLException
ResultSet and set it to a bean's property
bean -
InvocationTargetException
IllegalAccessException
IllegalArgumentException
SQLException
public void clonePropertyValue(BEAN source,
BEAN destination)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException
InvocationTargetException
IllegalAccessException
IllegalArgumentException
public void increaseVersion(BEAN bean,
boolean firstVersionNumber)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException
IllegalArgumentException
IllegalAccessException
InvocationTargetException
public DB getDBReadyValueFromBean(BEAN bean)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException
IllegalArgumentException
IllegalAccessException
InvocationTargetException
public void setDBValueToBean(BEAN bean,
DB value)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException
IllegalArgumentException
IllegalAccessException
InvocationTargetException
public P getPropertyValueFromBean(BEAN bean)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException
IllegalArgumentException
IllegalAccessException
InvocationTargetException
public void setPropertyValueToBean(BEAN bean,
P value)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException
IllegalArgumentException
IllegalAccessException
InvocationTargetExceptionpublic Class<DB> jdbcType()
public Class<P> propertyType()
public String getDbColumnName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||