|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.lock.AbstractLockable
org.entityfs.util.ManualEntityListable
public class ManualEntityListable
This is an EntityListable
consisting of manually added entity views.
Different views of the same entity may be added.
If an entity that is added to a ManualEntityListable
is deleted but
not removed from the listable, the listable will continue to return the, now
invalid, entity object.
This can optionally be created to be lockable. Locking settings can be
inherited from a FileSystem
instance or provided manually.
Constructor Summary | |
---|---|
ManualEntityListable()
This creates a ManualEntityRepository that does not do any
locking. |
|
ManualEntityListable(EntityLockAdapterFactory laf,
LockAcquiringStrategy las)
Create a ManualEntityRepository . |
|
ManualEntityListable(FileSystem fs)
This creates a ManualEntityRepository that uses the same locking
settings as the provided file system. |
Method Summary | |
---|---|
ManualEntityListable |
add(EntityView ev)
Add the entity to the listable. |
ManualEntityListable |
addAll(Collection<? extends EntityView> c)
Add a collection of entities to the listable. |
boolean |
isEmpty()
Is the listable empty? If a directory view is empty, the viewed directory may still contain entities that are hidden by the view's filter. |
Iterator<EntityView> |
iterator()
|
Set<EntityView> |
listEntities()
Return all entities that are visible in this directory. |
EntityView |
remove(EntityView ev)
Remove the entity from the listable, if it exists here. |
Collection<EntityView> |
removeAll(Collection<? extends EntityView> c)
Remove a collection of entities from the listable, if they exist here. |
Methods inherited from class org.entityfs.lock.AbstractLockable |
---|
assertIsReadLocked, assertIsWriteLocked, getLockAcquiringStrategy, getLockAdapter, getLocked, getLogAdapter, getReadLock, getWriteLock, isReadLockedByCurrentThread, isWriteLockedByCurrentThread, lock, lockForReading, lockForWriting, logLockStack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.entityfs.lock.ReadLockable |
---|
getReadLock, isReadLockedByCurrentThread, lockForReading |
Constructor Detail |
---|
public ManualEntityListable()
ManualEntityRepository
that does not do any
locking.
public ManualEntityListable(FileSystem fs)
ManualEntityRepository
that uses the same locking
settings as the provided file system.
fs
- The file system to inherit locking settings from.public ManualEntityListable(EntityLockAdapterFactory laf, LockAcquiringStrategy las)
ManualEntityRepository
.
laf
- A lock adapter factory.las
- A lock acquiring strategy.Method Detail |
---|
public ManualEntityListable add(EntityView ev)
ev
- The entity to add.
this
.public ManualEntityListable addAll(Collection<? extends EntityView> c)
c
- A collection of entities.
this
.public EntityView remove(EntityView ev)
ev
- The entity to remove. If this does not exist in the listable,
nothing will be removed.
null
.public Collection<EntityView> removeAll(Collection<? extends EntityView> c)
c
- The collection of entities to remove. Only the entities existing
in the listable will be removed (duh).
public boolean isEmpty()
EntityListable
isEmpty
in interface EntityListable
true
if the directory view is empty.public Iterator<EntityView> iterator()
iterator
in interface Iterable<EntityView>
public Set<EntityView> listEntities()
EntityListable
If this is called on a directory view, all returned ViewCapable
entities inherit the view's filters.
listEntities
in interface EntityListable
Set
of entity views. If this is called on a directory
entity object, a set of entity objects (not views) are returned. The set
may be empty, but never null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |