|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.j256.ormlite.stmt.mapped.BaseMappedStatement<T,ID>
public abstract class BaseMappedStatement<T,ID>
Abstract mapped statement which has common statements used by the subclasses.
Field Summary | |
---|---|
protected FieldType[] |
argFieldTypes
|
protected FieldType |
idField
|
protected static Logger |
logger
|
protected String |
statement
|
protected TableInfo<T,ID> |
tableInfo
|
Constructor Summary | |
---|---|
protected |
BaseMappedStatement(TableInfo<T,ID> tableInfo,
String statement,
FieldType[] argFieldTypes)
|
Method Summary | |
---|---|
protected Object |
convertIdToFieldObject(ID id)
Return a field object converted from an id. |
int |
delete(DatabaseConnection databaseConnection,
T data)
Delete the object from the database. |
protected Object |
extractIdToFieldObject(T data)
Return a field-object for the id extracted from the data. |
protected Object[] |
getFieldObjects(Object data)
Return the array of field objects pulled from the data object. |
String |
getStatement()
|
protected int |
insert(DatabaseConnection databaseConnection,
T data)
Insert the object into the database |
String |
toString()
|
int |
update(DatabaseConnection databaseConnection,
T data)
Update the object in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static Logger logger
protected final TableInfo<T,ID> tableInfo
protected final FieldType idField
protected final String statement
protected final FieldType[] argFieldTypes
Constructor Detail |
---|
protected BaseMappedStatement(TableInfo<T,ID> tableInfo, String statement, FieldType[] argFieldTypes)
Method Detail |
---|
protected int insert(DatabaseConnection databaseConnection, T data) throws SQLException
SQLException
public int update(DatabaseConnection databaseConnection, T data) throws SQLException
SQLException
public int delete(DatabaseConnection databaseConnection, T data) throws SQLException
SQLException
public String getStatement()
protected Object[] getFieldObjects(Object data) throws SQLException
SQLException
protected Object convertIdToFieldObject(ID id) throws SQLException
SQLException
protected Object extractIdToFieldObject(T data) throws SQLException
SQLException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |