org.qi4j.spi.entitystore.helpers
Class JSONManyAssociationState

java.lang.Object
  extended by org.qi4j.spi.entitystore.helpers.JSONManyAssociationState
All Implemented Interfaces:
Serializable, Iterable<EntityReference>, ManyAssociationState

public final class JSONManyAssociationState
extends Object
implements ManyAssociationState, Serializable

JSON implementation of ManyAssociationState. Backed by JSONArray.

See Also:
Serialized Form

Constructor Summary
JSONManyAssociationState(JSONEntityState entityState, JSONArray references)
           
 
Method Summary
 boolean add(int idx, EntityReference entityReference)
           
 boolean contains(EntityReference entityReference)
           
 int count()
           
 EntityReference get(int i)
           
 Iterator<EntityReference> iterator()
           
 boolean remove(EntityReference entityReference)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONManyAssociationState

public JSONManyAssociationState(JSONEntityState entityState,
                                JSONArray references)
Method Detail

count

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

contains

public boolean contains(EntityReference entityReference)
Specified by:
contains in interface ManyAssociationState

add

public boolean add(int idx,
                   EntityReference entityReference)
Specified by:
add in interface ManyAssociationState

remove

public boolean remove(EntityReference entityReference)
Specified by:
remove in interface ManyAssociationState

get

public EntityReference get(int i)
Specified by:
get in interface ManyAssociationState

iterator

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