|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.appserver.server.sql.CoreDO
Base class from which the data objects are derived.
Field Summary | |
protected boolean |
persistent
|
static boolean |
versioning
|
Constructor Summary | |
CoreDO()
Public constructor. |
|
CoreDO(java.sql.ResultSet rs)
Public constructor. |
Method Summary | |
static void |
disableVersioning()
Disable use of the version column. |
void |
executeDelete(DBConnection conn)
Deletes this object from the database. |
void |
executeInsert(DBConnection conn)
Inserts this object into the database. |
void |
executeUpdate(DBConnection conn)
Updates the contents of this object in the database. |
void |
finalizeDelete(boolean success)
Currently does nothing. |
void |
finalizeInsert(boolean success)
Updates the persistent state. |
void |
finalizeUpdate(boolean success)
The version number of this object is set to the next version for this object if this object was successfully updated in the database. |
abstract java.sql.PreparedStatement |
getDeleteStatement(DBConnection conn)
Returns the statement that can be used to delete this object from the database. |
abstract java.sql.PreparedStatement |
getInsertStatement(DBConnection conn)
Returns the statement that can be used to insert this object into the database. |
protected int |
getNewVersion()
Returns this object's new version. |
ObjectId |
getOId()
Returns this object's identifier. |
static java.lang.String |
getOIdColumnName()
Returns the object identifier column name. |
protected java.lang.String |
getTableName()
Return the name of the table whose rows represent these objects. |
abstract java.sql.PreparedStatement |
getUpdateStatement(DBConnection conn)
Returns the statement that can be used to update this object in the database. |
protected int |
getVersion()
Returns this object's version. |
static java.lang.String |
getVersionColumnName()
Returns the version column name. |
boolean |
isPersistent()
Returns true if this object is persistent in the database (i.e. |
protected void |
setNewVersion(int newVersion)
Sets this object's new version number. |
protected void |
setOId(ObjectId oId)
Sets this object's identifier. |
static void |
setOIdColumnName(java.lang.String oidColumnName)
Sets the object identifier column name. |
void |
setPersistent(boolean persistent)
Sets the persistent state for this object. |
protected void |
setVersion(int version)
Sets this object's version. |
static void |
setVersionColumnName(java.lang.String versionColumnName)
Sets the version column name. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static boolean versioning
protected boolean persistent
Constructor Detail |
public CoreDO()
public CoreDO(java.sql.ResultSet rs) throws java.sql.SQLException, ObjectIdException
rs
- a result set.Method Detail |
public static void disableVersioning()
public static java.lang.String getOIdColumnName()
public static void setOIdColumnName(java.lang.String oidColumnName)
oidColumnName
- Name of object identifier column.public static java.lang.String getVersionColumnName()
public static void setVersionColumnName(java.lang.String versionColumnName)
versionColumnName
- Name of version column.public ObjectId getOId()
protected void setOId(ObjectId oId)
oId
- this object's identifier.protected void setVersion(int version)
version
- the object's version.protected int getVersion()
protected void setNewVersion(int newVersion)
newVersion
- this object's next version.protected int getNewVersion()
public boolean isPersistent()
public void setPersistent(boolean persistent)
persistent
- true if this object is present in
persistent store.public abstract java.sql.PreparedStatement getInsertStatement(DBConnection conn) throws java.sql.SQLException
conn
- the database connection.public abstract java.sql.PreparedStatement getUpdateStatement(DBConnection conn) throws java.sql.SQLException
conn
- the database connection.public abstract java.sql.PreparedStatement getDeleteStatement(DBConnection conn) throws java.sql.SQLException
conn
- the database connection.public void executeInsert(DBConnection conn) throws java.sql.SQLException, DBRowUpdateException
conn
- the database connection.public void finalizeInsert(boolean success)
success
- true if the transaction succeeded
and this object was successfully inserted into the database.public void executeUpdate(DBConnection conn) throws java.sql.SQLException, DBRowUpdateException
conn
- the database connection.protected java.lang.String getTableName()
executeUpdate(com.lutris.appserver.server.sql.DBConnection)
public void finalizeUpdate(boolean success)
success
- true if the transaction succeeded
and this object was successfully updated in the database.getNewVersion()
public void executeDelete(DBConnection conn) throws java.sql.SQLException
conn
- Database connection.public void finalizeDelete(boolean success)
success
- true if the transaction succeeded
and this object was successfully deleted from the
database.
|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |