Enhydra 3.1 API

com.lutris.appserver.server.sql
Class CloneableDO

java.lang.Object
  |
  +--com.lutris.appserver.server.sql.CoreDO
        |
        +--com.lutris.appserver.server.sql.CloneableDO
Direct Known Subclasses:
GenericDO

public abstract class CloneableDO
extends CoreDO
implements java.lang.Cloneable

Base class from which the data objects are created. Provides functionality for cloning data objects. The cloned data object will have a unique object identifier.

Since:
LBS1.8
Version:
$Revision: 1.6.12.1 $
See Also:
Serialized Form

Fields inherited from class com.lutris.appserver.server.sql.CoreDO
persistent, versioning
 
Constructor Summary
CloneableDO()
          Public constructor.
CloneableDO(java.sql.ResultSet rs)
          Public constructor.
 
Method Summary
protected  java.lang.Object clone()
          Will clone the existing object keeping a fields the same, including the object id.
 java.lang.Object cloneUnique()
          Creates a clone of the object, but ensures that a new and unique object id is created for the object and that the version number is set to zero.
 
Methods inherited from class com.lutris.appserver.server.sql.CoreDO
disableVersioning, executeDelete, executeInsert, executeUpdate, finalizeDelete, finalizeInsert, finalizeUpdate, getDeleteStatement, getInsertStatement, getNewVersion, getOId, getOIdColumnName, getTableName, getUpdateStatement, getVersion, getVersionColumnName, isPersistent, setNewVersion, setOId, setOIdColumnName, setPersistent, setVersion, setVersionColumnName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloneableDO

public CloneableDO()
Public constructor.

CloneableDO

public CloneableDO(java.sql.ResultSet rs)
            throws java.sql.SQLException,
                   ObjectIdException
Public constructor.
Parameters:
rs - a result set.
Throws:
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

cloneUnique

public java.lang.Object cloneUnique()
                             throws DatabaseManagerException,
                                    ObjectIdException
Creates a clone of the object, but ensures that a new and unique object id is created for the object and that the version number is set to zero.
Throws:
DatabaseManagerException - if an error occurs while allocation a new object id from the default logical database.
ObjectIdException - if a new object id could not be allocated.

clone

protected java.lang.Object clone()
Will clone the existing object keeping a fields the same, including the object id.
Overrides:
clone in class java.lang.Object

Enhydra 3.1 API