org.caleigo.core
Interface IEntityPool

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IProxySelection, IQualifiedSelection, ISelection
All Known Implementing Classes:
EntityPool, ProxySelection, QualifiedSelection, Selection

public interface IEntityPool
extends java.io.Serializable

IEntityPool defines the interface to an entity collection class that can store zero or more IEntity objects. The entities stored in an IEntityPool are not type specified and does not have to be defined by a single IEntityDescriptor. IEntityPool is not ordered and should not accept duplicates effectively makeing it at a "Set".

Version:
1.00
Author:
Dennis Zikovic

Method Summary
 boolean addEntity(IEntity entity)
           
 java.util.Set asSet()
           
 void clear()
           
 boolean contains(IEntity entity)
           
 void deleteAll()
          Deletes all contained entities.
 boolean doesAccept(IEntity entity)
           
 boolean isDirty()
          Return true if any (one or more) of the collections's contained entities has the DIRTY flag set to true that is have unsaved changes.
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 void refreshAll()
          Performs a refresh on all contained entities.
 boolean removeEntity(IEntity entity)
           
 int size()
           
 void storeAll()
          Stores all contained entities that have the DIRTY flag set to true.
 

Method Detail

isDirty

public boolean isDirty()
Return true if any (one or more) of the collections's contained entities has the DIRTY flag set to true that is have unsaved changes.


storeAll

public void storeAll()
Stores all contained entities that have the DIRTY flag set to true. The entities are stored in a single transaction meaning that if one store fails then all fails.


deleteAll

public void deleteAll()
Deletes all contained entities. The entities are deleted in a single transaction meaning that if one delete fails then all fails. USE THIS METHOD WITH CAUTION!


refreshAll

public void refreshAll()
Performs a refresh on all contained entities. The refresh is batched to save performance.


addEntity

public boolean addEntity(IEntity entity)

removeEntity

public boolean removeEntity(IEntity entity)

iterator

public java.util.Iterator iterator()

clear

public void clear()

size

public int size()

isEmpty

public boolean isEmpty()

contains

public boolean contains(IEntity entity)

doesAccept

public boolean doesAccept(IEntity entity)

asSet

public java.util.Set asSet()


Copyright © 2005 Caleigo. All Rights Reserved.