org.qi4j.spi.entitystore.helpers
Class JSONNamedAssociationState

java.lang.Object
  extended by org.qi4j.spi.entitystore.helpers.JSONNamedAssociationState
All Implemented Interfaces:
Serializable, Iterable<NamedEntityReference>, NamedAssociationState

public final class JSONNamedAssociationState
extends Object
implements NamedAssociationState, Serializable

JSON implementation of ManyAssociationState. Backed by JSONArray.

See Also:
Serialized Form

Constructor Summary
JSONNamedAssociationState(JSONEntityState entityState, JSONObject references)
           
 
Method Summary
 String contains(EntityReference entityReference)
           
 boolean containsKey(String name)
           
 int count()
           
 EntityReference get(String name)
           
 Iterator<NamedEntityReference> iterator()
           
 Iterable<String> names()
           
 void put(String name, EntityReference entityReference)
           
 boolean remove(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONNamedAssociationState

public JSONNamedAssociationState(JSONEntityState entityState,
                                 JSONObject references)
Method Detail

count

public int count()
Specified by:
count in interface NamedAssociationState

contains

public String contains(EntityReference entityReference)
Specified by:
contains in interface NamedAssociationState

containsKey

public boolean containsKey(String name)
Specified by:
containsKey in interface NamedAssociationState

put

public void put(String name,
                EntityReference entityReference)
Specified by:
put in interface NamedAssociationState

remove

public boolean remove(String name)
Specified by:
remove in interface NamedAssociationState

get

public EntityReference get(String name)
Specified by:
get in interface NamedAssociationState

names

public Iterable<String> names()
Specified by:
names in interface NamedAssociationState

iterator

public Iterator<NamedEntityReference> iterator()
Specified by:
iterator in interface Iterable<NamedEntityReference>