com.orientechnologies.jdo.types
Class d_Association

java.lang.Object
  extended bycom.orientechnologies.jdo.types.d_Association
All Implemented Interfaces:
java.util.Map.Entry

public class d_Association
extends java.lang.Object
implements java.util.Map.Entry

Express an association key/value. This class is often used in Map collections to contains entries. If the value is a reference (oOID object), then on first access (get() method) the references will be resolved in the real object.

This behaviour avoid the loading of concrete objects in cache, but only real required by application on the first use.


Constructor Summary
d_Association()
           
d_Association(java.lang.Object iKey, java.lang.Object iValue)
           
 
Method Summary
 void fromStream(oPersistenceManager iManager, com.orientechnologies.jdo.objecthandler.oObjectHandler iHandler, java.lang.String iURL, java.io.DataInputStream iBuffer, int iTotal, boolean iRelationship)
          Deserialize object from stream to memory.
 java.lang.Object getKey()
          Returns the key
 java.lang.Object getValue()
          Returns the value without resolving it in case of relationship
 java.lang.Object getValue(boolean iTreatAsRelationship)
           
 java.lang.Object setValue(java.lang.Object iValue)
          Assign the value
 oBinary toStream(oPersistenceManager iManager, java.lang.String iURL, boolean iRelationship)
          Serialize object from memory to stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
equals, hashCode
 

Constructor Detail

d_Association

public d_Association()

d_Association

public d_Association(java.lang.Object iKey,
                     java.lang.Object iValue)
Method Detail

getKey

public java.lang.Object getKey()
Returns the key

Specified by:
getKey in interface java.util.Map.Entry
Returns:
key associated

getValue

public java.lang.Object getValue()
Returns the value without resolving it in case of relationship

Specified by:
getValue in interface java.util.Map.Entry
Returns:
raw value associated

getValue

public java.lang.Object getValue(boolean iTreatAsRelationship)

setValue

public java.lang.Object setValue(java.lang.Object iValue)
Assign the value

Specified by:
setValue in interface java.util.Map.Entry
Parameters:
iValue - value to assign
Returns:
old value if any

toStream

public oBinary toStream(oPersistenceManager iManager,
                        java.lang.String iURL,
                        boolean iRelationship)
Serialize object from memory to stream.


fromStream

public void fromStream(oPersistenceManager iManager,
                       com.orientechnologies.jdo.objecthandler.oObjectHandler iHandler,
                       java.lang.String iURL,
                       java.io.DataInputStream iBuffer,
                       int iTotal,
                       boolean iRelationship)
Deserialize object from stream to memory.