com.orientechnologies.jdo.types
Class d_Dictionary

java.lang.Object
  extended bycom.orientechnologies.jdo.types.d_Collection
      extended bycom.orientechnologies.jdo.types.d_Dictionary
All Implemented Interfaces:
java.util.Map

public class d_Dictionary
extends d_Collection
implements java.util.Map

Persistent collection that handle entries as key/values. It implements Map interface and works such as HashMap class, but it store elements in persistent way.


Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
 
Fields inherited from class com.orientechnologies.jdo.types.d_Collection
blocks, blockSize, head, relationship, tail, total
 
Constructor Summary
d_Dictionary()
           
d_Dictionary(oPersistenceManager iManager, boolean iRelationship)
           
 
Method Summary
 boolean contains(java.lang.Object iValue)
          Tests is the collection contains the value passed as argoument
 boolean containsKey(java.lang.Object iKey)
          Tests is the collection contains the key passed as argoument
 boolean containsValue(java.lang.Object iValue)
          Tests is the collection contains the value passed as argoument.
 java.util.Enumeration elements()
          Returns an enumeration of keys.
 java.util.Set entrySet()
          Return a set of values.
 java.lang.Object get(java.lang.Object iKey)
          Get a value from the collection searching by the key
 java.lang.Object getRaw(java.lang.Object iKey)
          Get the raw value from the collection searching by the key.
 java.util.Iterator iterator()
          Returns the iterator over the collection
 java.util.Enumeration keys()
          Returns an enumeration of keys.
 java.util.Set keySet()
          Return a set of keys.
 java.lang.Object put(java.lang.Object iKey, java.lang.Object iValue)
          Insert a value in the collection giving a key
 void putAll(java.util.Map iSourceMap)
          Insert all map values in the collection
 java.lang.Object remove(java.lang.Object iKey)
          Remove an entry from the dictionary.
 java.util.Collection values()
          Returns a Collection view of values.
 
Methods inherited from class com.orientechnologies.jdo.types.d_Collection
clear, find, fromCollection, get, insert_element, isEmpty, isRelationship, remove, setRelationship, size, toCollection
 
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
clear, equals, hashCode, isEmpty, size
 

Constructor Detail

d_Dictionary

public d_Dictionary()

d_Dictionary

public d_Dictionary(oPersistenceManager iManager,
                    boolean iRelationship)
Method Detail

entrySet

public java.util.Set entrySet()
Return a set of values. The Set object is an HashSet.

Specified by:
entrySet in interface java.util.Map
Returns:
HashSet containing all the entries in the collection as Map.Entry objects

keySet

public java.util.Set keySet()
Return a set of keys. The Set object is an HashSet.

Specified by:
keySet in interface java.util.Map
Returns:
HashSet containing all the keys in the collection

elements

public java.util.Enumeration elements()
Returns an enumeration of keys.


keys

public java.util.Enumeration keys()
Returns an enumeration of keys.


values

public java.util.Collection values()
Returns a Collection view of values.

Specified by:
values in interface java.util.Map

iterator

public java.util.Iterator iterator()
Returns the iterator over the collection

Overrides:
iterator in class d_Collection
Returns:
Iterator

putAll

public void putAll(java.util.Map iSourceMap)
Insert all map values in the collection

Specified by:
putAll in interface java.util.Map
Parameters:
iSourceMap - Source map to copy

put

public java.lang.Object put(java.lang.Object iKey,
                            java.lang.Object iValue)
Insert a value in the collection giving a key

Specified by:
put in interface java.util.Map
Parameters:
iKey - Key to retrieve the value
iValue - Value associated to key
Returns:
Previous value associated to iKey if already exist

get

public java.lang.Object get(java.lang.Object iKey)
Get a value from the collection searching by the key

Specified by:
get in interface java.util.Map
Parameters:
iKey - Is the key to search
Returns:
The value associated with the key passed

getRaw

public java.lang.Object getRaw(java.lang.Object iKey)
Get the raw value from the collection searching by the key. Raw key is the raw value present in the dictionary without resolving references (oOID).

Parameters:
iKey - Is the key to search
Returns:
The value associated with the key passed

containsKey

public boolean containsKey(java.lang.Object iKey)
Tests is the collection contains the key passed as argoument

Specified by:
containsKey in interface java.util.Map
Parameters:
iKey - Key to search
Returns:
true is is present, otherwise false

contains

public boolean contains(java.lang.Object iValue)
Tests is the collection contains the value passed as argoument

Overrides:
contains in class d_Collection
Parameters:
iValue - Value to search
Returns:
true is is present, otherwise false

containsValue

public boolean containsValue(java.lang.Object iValue)
Tests is the collection contains the value passed as argoument. This method is identical to contains().

Specified by:
containsValue in interface java.util.Map
Parameters:
iValue - Value to search
Returns:
true is is present, otherwise false

remove

public java.lang.Object remove(java.lang.Object iKey)
Remove an entry from the dictionary.

Specified by:
remove in interface java.util.Map
Overrides:
remove in class d_Collection
Parameters:
iKey - key of entry to remove
Returns:
object removed if any