|
DODS 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lutris.appserver.server.sql.CoreDO
public abstract class CoreDO
Base class from which the data objects are derived.
Field Summary | |
---|---|
protected CoreDataStruct |
originalData
|
protected boolean |
persistent
|
static boolean |
versioning
|
Constructor Summary | |
---|---|
CoreDO()
Public constructor. |
|
CoreDO(java.sql.ResultSet rs)
Public constructor. |
Method Summary | |
---|---|
void |
addToCache()
This method is invoked whenever an object is added to the cache. |
void |
deleteFromCache()
This method is invoked whenever an object is deleted from the cache. |
static void |
disableVersioning()
Disable use of the version column. |
abstract void |
dumpData(boolean incrementVersion)
|
void |
evict()
This method is invoked whenever an object is removed from the cache. |
void |
executeDelete(DBConnection conn)
Deletes this object from the database. |
void |
executeInsert(DBConnection conn)
Inserts this object into the database. |
void |
executeLockingStatement(DBConnection conn)
|
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. |
protected int |
get_NewVersion()
Returns this object's new version. |
ObjectId |
get_OId()
Returns this object's identifier. |
static java.lang.String |
get_OIdColumnName()
Returns the object identifier column name. |
protected int |
get_Version()
Returns this object's version. |
static java.lang.String |
get_versionColumnName()
Returns the version column name. |
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()
Deprecated. use get_NewVersion instead |
ObjectId |
getOId()
Deprecated. Use get_OId() |
static java.lang.String |
getOIdColumnName()
Deprecated. use get_OIdColumnName() |
int |
getOriginalVersion()
|
abstract 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. |
int |
getVersion()
Deprecated. Use get_Version() |
static java.lang.String |
getVersionColumnName()
Deprecated. use get_versionColumnName() |
boolean |
isPersistent()
|
void |
makeInvisible()
|
void |
makeVisible()
|
abstract int |
objectIdentityType()
Return the type of the identity column(s) of DOs that these objects represents. |
java.lang.Object |
originalData_get()
This method is invoked whenever an object original data is needed. |
void |
refresh()
This method is invoked whenever object's data needs to be loaded. |
protected void |
set_NewVersion(int newVersion)
Sets this object's new version number. |
protected void |
set_OId(ObjectId oId)
Sets this object's identifier. |
static void |
set_OIdColumnName(java.lang.String _oidColumnName)
Sets the object identifier column name. |
protected void |
set_Version(int version)
Sets this object's version. |
static void |
set_versionColumnName(java.lang.String _versionColumnName)
Sets the version column name. |
protected void |
setNewVersion(int newVersion)
Deprecated. use set_NewVersion instead |
protected void |
setOId(ObjectId oId)
Deprecated. Use set_OId() |
static void |
setOIdColumnName(java.lang.String _oidColumnName)
Deprecated. use get_versionColumnName() |
void |
setPersistent(boolean persistent)
Sets the persistent state for this object. |
protected void |
setVersion(int version)
Deprecated. Use set_Version() |
static void |
setVersionColumnName(java.lang.String _versionColumnName)
Deprecated. use set_versionColumnName() |
void |
updateCache()
This method is invoked whenever an object is inserted or updated in the cache. |
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
protected CoreDataStruct originalData
Constructor Detail |
---|
public CoreDO()
public CoreDO(java.sql.ResultSet rs) throws java.sql.SQLException, ObjectIdException
rs
- a result set.
java.sql.SQLException
- if an error occurs while instantiating
this object from the result set.
ObjectIdException
- if the object id for this object is
invalid.Method Detail |
---|
public static void disableVersioning()
author Jay Gunter
public static java.lang.String get_OIdColumnName()
public static java.lang.String getOIdColumnName()
public static void set_OIdColumnName(java.lang.String _oidColumnName)
_oidColumnName
- Name of object identifier column.public static void setOIdColumnName(java.lang.String _oidColumnName)
_oidColumnName
- Name of object identifier column.public static java.lang.String get_versionColumnName()
public static java.lang.String getVersionColumnName()
public static void set_versionColumnName(java.lang.String _versionColumnName)
_versionColumnName
- Name of version column.public static void setVersionColumnName(java.lang.String _versionColumnName)
_versionColumnName
- Name of version column.public ObjectId getOId()
public ObjectId get_OId()
protected void setOId(ObjectId oId)
oId
- this object's identifier.protected void set_OId(ObjectId oId)
oId
- this object's identifier.protected void setVersion(int version)
version
- the object's version.protected void set_Version(int version)
version
- the object's version.public int getVersion()
protected int get_Version()
protected void setNewVersion(int newVersion)
newVersion
- this object's next version.protected void set_NewVersion(int newVersion)
newVersion
- this object's next version.protected int getNewVersion()
protected int get_NewVersion()
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.
java.sql.SQLException
- If an error occurs.public abstract java.sql.PreparedStatement getUpdateStatement(DBConnection conn) throws java.sql.SQLException
conn
- the database connection.
java.sql.SQLException
- If an error occurs.public abstract java.sql.PreparedStatement getDeleteStatement(DBConnection conn) throws java.sql.SQLException
conn
- the database connection.
java.sql.SQLException
- If an error occurs.public void executeInsert(DBConnection conn) throws java.sql.SQLException
executeInsert
in interface Transaction
conn
- the database connection.
java.sql.SQLException
- if a database access error
occurs.
DBRowUpdateException
- If a version error occurs.public void finalizeInsert(boolean success)
finalizeInsert
in interface Transaction
success
- true if the transaction succeeded and this object
was successfully inserted into the database.public void executeUpdate(DBConnection conn) throws java.sql.SQLException
executeUpdate
in interface Transaction
conn
- the database connection.
java.sql.SQLException
- If a database access error
occurs.
DBRowUpdateException
- If a version error occurs.public abstract java.lang.String getTableName()
executeUpdate(com.lutris.appserver.server.sql.DBConnection)
public abstract int objectIdentityType()
CommonConstants.OBJECT_IDENTITY_TYPE
public void finalizeUpdate(boolean success)
finalizeUpdate
in interface Transaction
success
- true if the transaction succeeded and this object
was successfully updated in the database.get_NewVersion()
public void executeDelete(DBConnection conn) throws java.sql.SQLException
executeDelete
in interface Transaction
conn
- Database connection.
java.sql.SQLException
- If a database access error
occurs.public void finalizeDelete(boolean success)
finalizeDelete
in interface Transaction
success
- true if the transaction succeeded and this object
was successfully deleted from the database.public java.lang.Object originalData_get()
public void updateCache()
public void deleteFromCache()
public void addToCache()
public void evict()
public void refresh() throws DataObjectException
DataObjectException
- If a data access error occurs.public int getOriginalVersion()
public void makeVisible()
public void makeInvisible()
public void executeLockingStatement(DBConnection conn) throws java.sql.SQLException
java.sql.SQLException
public abstract void dumpData(boolean incrementVersion)
|
DODS 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |