aspoev.manager
Class DatabaseObject

java.lang.Object
  extended byaspoev.interpreter.base.MetaObject
      extended byaspoev.manager.DatabaseObject
All Implemented Interfaces:
pJ.jasmine.PRI, java.io.Serializable

public class DatabaseObject
extends MetaObject
implements pJ.jasmine.PRI

This class is an object handle for the database. It enables the instance adapter to swap object representations without losing referential integrity within the database, i.e. all references that exist to an object within the database point to its object handle, and thus are not invalidated when the object changes via conversion.

See Also:
Serialized Form

Field Summary
protected  MetaObject contents
           
protected  pJ.jasmine.ListOfObject relationships
           
 
Fields inherited from class aspoev.interpreter.base.MetaObject
declarationType, type
 
Fields inherited from interface pJ.jasmine.PRI
DELETECHANGE, MODIFYCHANGE, NOCHANGE
 
Constructor Summary
DatabaseObject(MetaObject contents)
          Creates a handle to the argument object.
 
Method Summary
 void addRelationship(DatabaseRelationship relation)
          Deprecated.
 ClassDeclarationElement getClassDeclaration()
          Returns the class declaration for the contents of this handle.
 TypeReferenceElement getDeclarationType()
          Returns the type of the contents of this handle.
 java.util.Collection getFieldNames()
          Returns a collection of the names of all fields defined on this object.
 TypeReferenceElement getFieldType(java.lang.String fieldName)
          Returns the type of the specified field.
 java.lang.Object getFieldValue(java.lang.String fieldName)
          Gets the value of the specified field in the contents of this handle.
 TypeReferenceElement getType()
           
 boolean hasField(java.lang.String fieldName)
          Returns true if the contents of this handle have the specified field name.
 boolean removeRelationship(DatabaseRelationship relation)
          Deprecated
 void setFieldValue(java.lang.String fieldName, java.lang.Object value)
          Sets the specified field in the contents of this handle to the specified value.
 MetaObject setType(TypeReferenceElement type)
           
 java.lang.String toLongString(int level)
          Returns an extended String representation of the object, indented to the specified level.
 java.lang.String toString()
          Returns a string description of the object.
 
Methods inherited from class aspoev.interpreter.base.MetaObject
equals, toLongString, toShortString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

relationships

protected pJ.jasmine.ListOfObject relationships

contents

protected MetaObject contents
Constructor Detail

DatabaseObject

public DatabaseObject(MetaObject contents)
Creates a handle to the argument object.

Method Detail

addRelationship

public void addRelationship(DatabaseRelationship relation)
Deprecated.


getClassDeclaration

public ClassDeclarationElement getClassDeclaration()
Returns the class declaration for the contents of this handle.

Overrides:
getClassDeclaration in class MetaObject

getDeclarationType

public TypeReferenceElement getDeclarationType()
Returns the type of the contents of this handle.


getFieldNames

public java.util.Collection getFieldNames()
Description copied from class: MetaObject
Returns a collection of the names of all fields defined on this object.

Overrides:
getFieldNames in class MetaObject

getFieldType

public TypeReferenceElement getFieldType(java.lang.String fieldName)
Returns the type of the specified field.

Overrides:
getFieldType in class MetaObject

getFieldValue

public java.lang.Object getFieldValue(java.lang.String fieldName)
Gets the value of the specified field in the contents of this handle.

Overrides:
getFieldValue in class MetaObject

getType

public TypeReferenceElement getType()

hasField

public boolean hasField(java.lang.String fieldName)
Returns true if the contents of this handle have the specified field name.

Overrides:
hasField in class MetaObject

setFieldValue

public void setFieldValue(java.lang.String fieldName,
                          java.lang.Object value)
Sets the specified field in the contents of this handle to the specified value.

Overrides:
setFieldValue in class MetaObject

removeRelationship

public boolean removeRelationship(DatabaseRelationship relation)
Deprecated


setType

public MetaObject setType(TypeReferenceElement type)

toLongString

public java.lang.String toLongString(int level)
Description copied from class: MetaObject
Returns an extended String representation of the object, indented to the specified level.

Overrides:
toLongString in class MetaObject

toString

public java.lang.String toString()
Description copied from class: MetaObject
Returns a string description of the object. (Same as 'toLongString')

Overrides:
toString in class MetaObject