org.enhydra.shark.repositorypersistence.data
Class XPDLDataStruct

java.lang.Object
  extended by com.lutris.appserver.server.sql.CoreDataStruct
      extended by org.enhydra.shark.repositorypersistence.data.XPDLDataStruct
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class XPDLDataStruct
extends com.lutris.appserver.server.sql.CoreDataStruct
implements java.lang.Cloneable, java.io.Serializable

Data structure for DO class. A container for data members of a DO class. A DO class contains a reference to a DataStruct class. This reference can be null (a DO whose data has not yet been retrieved from the database), allowing a DO object to be a lightweight placeholder until its data is needed.

Since:
DODS Project;
Version:
$Revision: 1.22 $
Author:
NN
See Also:
Serialized Form

Field Summary
static int COLUMN_OID
          Used for query caching.
static int COLUMN_XPDLCLASSVERSION
          Used for query caching.
static int COLUMN_XPDLID
          Used for query caching.
static int COLUMN_XPDLUPLOADTIME
          Used for query caching.
static int COLUMN_XPDLVERSION
          Used for query caching.
 boolean readOnly
          A DO refers to this DataStruct.
 
Fields inherited from class com.lutris.appserver.server.sql.CoreDataStruct
newVersion, oId, version
 
Constructor Summary
XPDLDataStruct()
           
 
Method Summary
 boolean compareCond(org.enhydra.dods.cache.Condition cond)
          Compares whether this DataStruct object satisfies condition cond.
 com.lutris.appserver.server.sql.CoreDataStruct dumpData(boolean incrementVersion)
           
 XPDLDataStruct duplicate()
          Create a copy of the guts of a DO.
 java.lang.String get_CacheHandle()
          Returns this object's cache handle (String in the form: ".
 java.lang.String get_Database()
           
 java.lang.String get_Handle()
          Returns this object's handle (identifier as a string).
protected  int get_Version()
          Returns DataStruct's version.
 long getXPDLClassVersion()
          Return value of XPDLClassVersion column.
 java.lang.String getXPDLId()
          Return value of XPDLId column.
 java.sql.Timestamp getXPDLUploadTime()
          Return value of XPDLUploadTime column.
 java.lang.String getXPDLVersion()
          Return value of XPDLVersion column.
protected  boolean isEmpty()
          Returns indicator if DataStruct has any useful content.
 void set_Database(java.lang.String dbName)
           
protected  void set_Empty(boolean b)
          Sets indicator if DataStruct has any useful content.
protected  void set_OId(com.lutris.appserver.server.sql.ObjectId oId)
          Sets this object's identifier.
protected  void set_Version(int v)
          Sets DataStruct's version.
 void setXPDLClassVersion(long val4XPDLClassVersion)
          Sets XPDLClassVersion column.
 void setXPDLId(java.lang.String val4XPDLId)
          Sets XPDLId column.
 void setXPDLUploadTime(java.sql.Timestamp val4XPDLUploadTime)
          Sets XPDLUploadTime column.
 void setXPDLVersion(java.lang.String val4XPDLVersion)
          Sets XPDLVersion column.
 java.lang.String toString()
           
 java.lang.String toString(int indentCount)
           
 void writeXMLData(java.io.Writer w)
           
 
Methods inherited from class com.lutris.appserver.server.sql.CoreDataStruct
get_OId, get_OIdColumnName, get_versionColumnName, getHandle, getOId, getVersion, set_OIdColumnName, set_versionColumnName, setOId, setVersion, writeXMLhead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

readOnly

public boolean readOnly
A DO refers to this DataStruct. readOnly is set to true when the DO is stored in its class cache.


COLUMN_XPDLID

public static final int COLUMN_XPDLID
Used for query caching.

See Also:
Constant Field Values

COLUMN_XPDLVERSION

public static final int COLUMN_XPDLVERSION
Used for query caching.

See Also:
Constant Field Values

COLUMN_XPDLCLASSVERSION

public static final int COLUMN_XPDLCLASSVERSION
Used for query caching.

See Also:
Constant Field Values

COLUMN_XPDLUPLOADTIME

public static final int COLUMN_XPDLUPLOADTIME
Used for query caching.

See Also:
Constant Field Values

COLUMN_OID

public static final int COLUMN_OID
Used for query caching.

See Also:
Constant Field Values
Constructor Detail

XPDLDataStruct

public XPDLDataStruct()
Method Detail

isEmpty

protected boolean isEmpty()
Returns indicator if DataStruct has any useful content.

Returns:
true if DataStruct has any useful content, otherwise false.

set_Empty

protected void set_Empty(boolean b)
Sets indicator if DataStruct has any useful content.

Parameters:
b - new value of indicator if DataStruct has any useful content.

get_Version

protected int get_Version()
Returns DataStruct's version.

Overrides:
get_Version in class com.lutris.appserver.server.sql.CoreDataStruct
Returns:
DataStruct's version.

set_Version

protected void set_Version(int v)
Sets DataStruct's version.

Overrides:
set_Version in class com.lutris.appserver.server.sql.CoreDataStruct
Parameters:
v - new DataStruct's version.

set_OId

protected void set_OId(com.lutris.appserver.server.sql.ObjectId oId)
Sets this object's identifier.

Overrides:
set_OId in class com.lutris.appserver.server.sql.CoreDataStruct
Parameters:
oId - this object's identifier.

get_Handle

public java.lang.String get_Handle()
                            throws com.lutris.appserver.server.sql.DatabaseManagerException
Returns this object's handle (identifier as a string).

Overrides:
get_Handle in class com.lutris.appserver.server.sql.CoreDataStruct
Returns:
This object's identifier as a string.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - If a connection to the database cannot be established, etc.

get_CacheHandle

public java.lang.String get_CacheHandle()
                                 throws com.lutris.appserver.server.sql.DatabaseManagerException
Returns this object's cache handle (String in the form: ".").

Overrides:
get_CacheHandle in class com.lutris.appserver.server.sql.CoreDataStruct
Returns:
cache handle.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - If a connection to the database cannot be established, etc.

set_Database

public void set_Database(java.lang.String dbName)
Parameters:
dbName - - name of the logical database this DataStruct should belong to.

get_Database

public java.lang.String get_Database()
Overrides:
get_Database in class com.lutris.appserver.server.sql.CoreDataStruct
Returns:
name of the logical database this DataStruct belongs to.

dumpData

public com.lutris.appserver.server.sql.CoreDataStruct dumpData(boolean incrementVersion)
Specified by:
dumpData in class com.lutris.appserver.server.sql.CoreDataStruct

writeXMLData

public void writeXMLData(java.io.Writer w)
                  throws java.io.IOException
Specified by:
writeXMLData in class com.lutris.appserver.server.sql.CoreDataStruct
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(int indentCount)

setXPDLId

public void setXPDLId(java.lang.String val4XPDLId)
Sets XPDLId column.

Parameters:
val4XPDLId - new column value.

getXPDLId

public java.lang.String getXPDLId()
Return value of XPDLId column.

Returns:
value of XPDLId column.

setXPDLVersion

public void setXPDLVersion(java.lang.String val4XPDLVersion)
Sets XPDLVersion column.

Parameters:
val4XPDLVersion - new column value.

getXPDLVersion

public java.lang.String getXPDLVersion()
Return value of XPDLVersion column.

Returns:
value of XPDLVersion column.

setXPDLClassVersion

public void setXPDLClassVersion(long val4XPDLClassVersion)
Sets XPDLClassVersion column.

Parameters:
val4XPDLClassVersion - new column value.

getXPDLClassVersion

public long getXPDLClassVersion()
Return value of XPDLClassVersion column.

Returns:
value of XPDLClassVersion column.

setXPDLUploadTime

public void setXPDLUploadTime(java.sql.Timestamp val4XPDLUploadTime)
Sets XPDLUploadTime column.

Parameters:
val4XPDLUploadTime - new column value.

getXPDLUploadTime

public java.sql.Timestamp getXPDLUploadTime()
Return value of XPDLUploadTime column.

Returns:
value of XPDLUploadTime column.

compareCond

public boolean compareCond(org.enhydra.dods.cache.Condition cond)
Compares whether this DataStruct object satisfies condition cond.

Overrides:
compareCond in class com.lutris.appserver.server.sql.CoreDataStruct
Parameters:
cond - Condition of the query.
Returns:
true if this DataStruct object satisfies condition of this query, otherwise false.

duplicate

public XPDLDataStruct duplicate()
                         throws com.lutris.dods.builder.generator.query.DataObjectException
Create a copy of the guts of a DO.

Returns:
Copied DataStruct object.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - if createExisting() fails for a contained DO
com.lutris.appserver.server.sql.ObjectIdException - if GenericDO has trouble obtaining a valid id.
com.lutris.dods.builder.generator.query.DataObjectException