public interface Record
Modifier and Type | Field and Description |
---|---|
static boolean |
WITH_BLOBS
indicator to include BLOBS in read / write operations
|
static boolean |
WITHOUT_BLOBS
indicator to exclude BLOBS from read / write operations
|
Modifier and Type | Method and Description |
---|---|
java.sql.PreparedStatement |
getDeleteStatment(java.sql.Connection c,
java.lang.Object record)
Get a statement suitable to delete a given object from the database
|
java.sql.PreparedStatement |
getInsertStatment(java.sql.Connection c,
java.lang.Object record)
Get a statement suitable to insert a given object to the database
|
java.sql.PreparedStatement |
getInsertStmt(java.sql.Connection c,
java.lang.Object record,
int autoGeneratedKeys)
Get a statement suitable to insert a given object to the database
|
java.lang.String |
getTableName()
Get the name of the database table this record references
|
java.sql.PreparedStatement |
getUpdateStatment(java.sql.Connection c,
java.lang.Object record)
Get a statement suitable to update a given object in the database
|
java.lang.Object |
toObject(java.sql.ResultSet resultSet,
boolean includeBlobs)
Get contents of this record as an object
|
static final boolean WITH_BLOBS
static final boolean WITHOUT_BLOBS
java.lang.String getTableName()
java.lang.Object toObject(java.sql.ResultSet resultSet, boolean includeBlobs) throws java.lang.Exception
resultSet
- a resultSet that points to the record to get as an objectincludeBlobs
- indicator whether or not to include BLOBsjava.lang.Exception
java.sql.PreparedStatement getInsertStmt(java.sql.Connection c, java.lang.Object record, int autoGeneratedKeys) throws java.lang.Exception
c
- the database connection to use for the insertrecord
- the object to insertautoGeneratedKeys
- a flag indicating whether auto-generated keys should be returned;
one of Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYSjava.lang.Exception
java.sql.PreparedStatement getInsertStatment(java.sql.Connection c, java.lang.Object record) throws java.lang.Exception
c
- the database connection to use for the insertrecord
- the object to insertjava.lang.Exception
java.sql.PreparedStatement getUpdateStatment(java.sql.Connection c, java.lang.Object record) throws java.lang.Exception
c
- the database connection to use for the updaterecord
- the object to updatejava.lang.Exception
java.sql.PreparedStatement getDeleteStatment(java.sql.Connection c, java.lang.Object record) throws java.lang.Exception
c
- the database connection to use for the deleterecord
- the object to deletejava.lang.Exception