org.nakedobjects.metamodel.adapter.oid
Class AggregatedOid

java.lang.Object
  extended by org.nakedobjects.metamodel.adapter.oid.AggregatedOid
All Implemented Interfaces:
java.io.Serializable, Oid, Encodable

public class AggregatedOid
extends java.lang.Object
implements Oid, java.io.Serializable

Used as the Oid for collections, values and @Aggregated types.

The Hibernate Object Store has custom handling for collections.

See Also:
Serialized Form

Constructor Summary
AggregatedOid(DataInputExtended input)
           
AggregatedOid(Oid oid, Identifier identifier)
           
AggregatedOid(Oid oid, java.lang.String id)
           
 
Method Summary
 void clearPrevious()
          Indicate that the previous value has been used to remap the adapter and should not been cleared.
 void copyFrom(Oid oid)
          Copies the content of the specified oid into this oid.
 void encode(DataOutputExtended output)
          Returns the domain object's value as an encoded byte array via the encoder.
 boolean equals(AggregatedOid other)
           
 boolean equals(java.lang.Object other)
           
 java.lang.String getFieldName()
           
 Oid getParentOid()
           
 Oid getPrevious()
          Returns the pending oid if there is one.
 int hashCode()
           
 boolean hasPrevious()
          Returns true if this oid contains a previous value, specifically that the Oid was changed from transient to persistent.
 boolean isTransient()
          Flags whether this OID is temporary, and is for a transient object..
 void makePersistent()
          Marks the Oid as persistent.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AggregatedOid

public AggregatedOid(Oid oid,
                     java.lang.String id)

AggregatedOid

public AggregatedOid(Oid oid,
                     Identifier identifier)

AggregatedOid

public AggregatedOid(DataInputExtended input)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

encode

public void encode(DataOutputExtended output)
            throws java.io.IOException
Description copied from interface: Encodable
Returns the domain object's value as an encoded byte array via the encoder.

Specified by:
encode in interface Encodable
Throws:
java.io.IOException

getParentOid

public Oid getParentOid()

getFieldName

public java.lang.String getFieldName()

makePersistent

public void makePersistent()
Description copied from interface: Oid
Marks the Oid as persistent.

Specified by:
makePersistent in interface Oid

getPrevious

public Oid getPrevious()
Description copied from interface: Oid
Returns the pending oid if there is one.

Specified by:
getPrevious in interface Oid
See Also:
Oid.hasPrevious(), Oid.clearPrevious()

hasPrevious

public boolean hasPrevious()
Description copied from interface: Oid
Returns true if this oid contains a previous value, specifically that the Oid was changed from transient to persistent.

Specified by:
hasPrevious in interface Oid
See Also:
Oid.getPrevious(), Oid.clearPrevious()

clearPrevious

public void clearPrevious()
Description copied from interface: Oid
Indicate that the previous value has been used to remap the adapter and should not been cleared.

Specified by:
clearPrevious in interface Oid
See Also:
Oid.getPrevious(), Oid.hasPrevious()

copyFrom

public void copyFrom(Oid oid)
Description copied from interface: Oid
Copies the content of the specified oid into this oid.

After this call the #hashCode() return by both the specified object and this object will be the same, and both objects will be equal.

Specified by:
copyFrom in interface Oid

isTransient

public boolean isTransient()
Description copied from interface: Oid
Flags whether this OID is temporary, and is for a transient object..

Specified by:
isTransient in interface Oid

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(AggregatedOid other)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.