org.nakedobjects.object.collection
Class InstanceCollection

java.lang.Object
  extended byjava.util.Observable
      extended byorg.nakedobjects.object.AbstractNakedObject
          extended byorg.nakedobjects.object.collection.AbstractNakedCollection
              extended byorg.nakedobjects.object.collection.TypedCollection
                  extended byorg.nakedobjects.object.collection.InstanceCollection
All Implemented Interfaces:
java.io.Externalizable, Naked, NakedCollection, NakedObject, java.io.Serializable

public class InstanceCollection
extends TypedCollection

See Also:
Serialized Form

Constructor Summary
InstanceCollection(java.lang.Class type)
           
InstanceCollection(NakedObject pattern)
           
 
Method Summary
 Permission canAdd(NakedObject object)
          Returns a veto.
 Permission canRemove(NakedObject object)
          Returns a veto.
 boolean isPersistent()
          The instances collections are always shown as persistent as they are based on the ObjectStore, which is used to persist objects, although the collection does not exist in its own right on the store.
 void resolve()
          Resolves the current object ensuring all its attributes are available in memory.
 Title title()
          by default returns the collections name and its number of elements
 
Methods inherited from class org.nakedobjects.object.collection.TypedCollection
getType, type
 
Methods inherited from class org.nakedobjects.object.collection.AbstractNakedCollection
add, addAll, added, contains, displayElements, elements, extract, first, getDisplaySize, getMaxCacheSize, hasNext, hasPrevious, isEmpty, last, next, position, previous, remove, removeAll, removed, reset, search, setDisplaySize, setMaxCacheSize, size
 
Methods inherited from class org.nakedobjects.object.AbstractNakedObject
about, aboutExplorationActionClass, aboutExplorationActionClone, aboutExplorationActionMakePersistent, canClone, contextualTitle, copyObject, created, createInstance, createInstance, createTransientInstance, deleted, destroy, equals, explorationActionClass, explorationActionClone, explorationActionMakePersistent, getClassHelpText, getClassName, getCollectiveName, getFullClassName, getIconName, getIdString, getNakedClass, getObjectHelpText, getObjectStore, getOid, hashCode, iconImage, init, isFinder, isLookupElement, isResolved, isSameAs, isValid, makeFinder, makePersistent, objectChanged, readExternal, resolve, setChangedAndNotifyObservers, setOid, setResolved, summary, toString, writeExternal
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.object.NakedCollection
copyObject
 
Methods inherited from interface org.nakedobjects.object.NakedObject
addObserver, contextualTitle, countObservers, created, deleted, deleteObserver, destroy, getCollectiveName, getIdString, getNakedClass, getObjectStore, getOid, hasChanged, iconImage, isFinder, isLookupElement, isResolved, makeFinder, makePersistent, objectChanged, setChangedAndNotifyObservers, setOid, setResolved
 
Methods inherited from interface org.nakedobjects.object.Naked
about, getClassName, getFullClassName, getObjectHelpText, isSameAs, isValid, summary
 

Constructor Detail

InstanceCollection

public InstanceCollection(java.lang.Class type)

InstanceCollection

public InstanceCollection(NakedObject pattern)
Method Detail

isPersistent

public boolean isPersistent()
The instances collections are always shown as persistent as they are based on the ObjectStore, which is used to persist objects, although the collection does not exist in its own right on the store.

Specified by:
isPersistent in interface NakedObject
Overrides:
isPersistent in class AbstractNakedObject

canAdd

public Permission canAdd(NakedObject object)
Returns a veto. The user should not be able to add instannces to the set of instances

Specified by:
canAdd in interface NakedCollection
Overrides:
canAdd in class TypedCollection

canRemove

public Permission canRemove(NakedObject object)
Returns a veto. The user should not be able to remove instannces to the set of instances

Specified by:
canRemove in interface NakedCollection
Overrides:
canRemove in class TypedCollection

resolve

public void resolve()
Description copied from interface: NakedObject
Resolves the current object ensuring all its attributes are available in memory.

Specified by:
resolve in interface NakedObject
Overrides:
resolve in class AbstractNakedObject

title

public Title title()
Description copied from interface: NakedCollection
by default returns the collections name and its number of elements

Specified by:
title in interface NakedCollection
Overrides:
title in class AbstractNakedCollection