org.objectweb.speedo.genclass.collection
Class CollectionImpl

java.lang.Object
  extended byorg.objectweb.speedo.genclass.GenClass
      extended byorg.objectweb.speedo.genclass.collection.CollectionImpl
All Implemented Interfaces:
org.objectweb.perseus.cache.api.CacheEntry, java.util.Collection, org.objectweb.perseus.cache.api.FixableCacheEntry, org.objectweb.jorm.util.api.Loggable, org.objectweb.jorm.api.PBinding, org.objectweb.jorm.api.PBindingCtrl, javax.jdo.spi.PersistenceCapable, org.objectweb.perseus.cache.replacement.api.ReplaceableCacheEntry, SpeedoGenClassCoherence, SpeedoGenClassProxy, SpeedoProxy
Direct Known Subclasses:
ListImpl, SetImpl

public class CollectionImpl
extends GenClass
implements java.util.Collection

This class is an implementation of the java.util.Collection interface.

Author:
Eric.Bruneton, S.Chassande-Barrioz

Nested Class Summary
 
Nested classes inherited from class javax.jdo.spi.PersistenceCapable
javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer, javax.jdo.spi.PersistenceCapable.ObjectIdFieldManager, javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier
 
Field Summary
protected static int DEFAULT_SIZE
           
 
Fields inherited from class org.objectweb.speedo.genclass.GenClass
age, encodedPName, fix, gcid, jdoIsActive, linkedField, listeners, logger, mapperName, pbinding, pnameHints, projectName, ptype
 
Fields inherited from interface javax.jdo.spi.PersistenceCapable
CHECK_READ, CHECK_WRITE, DETACHED, LOAD_REQUIRED, MEDIATE_READ, MEDIATE_WRITE, READ_OK, READ_WRITE_OK, SERIALIZABLE
 
Fields inherited from interface org.objectweb.jorm.api.PBinding
ACTION_BIND, ACTION_EXIST, ACTION_EXPORT, ACTION_READ, ACTION_UNBIND, ACTION_UNEXPORT, ACTION_WRITE, LIFECYCLE_ACTIVEFORIO, LIFECYCLE_DELTOWRITE, LIFECYCLE_ERROR, LIFECYCLE_NEWTOWRITE, LIFECYCLE_NOTBOUND
 
Constructor Summary
CollectionImpl()
          Instanciates and initializes a new collection with an initial size.
 
Method Summary
 boolean add(java.lang.Object o)
           
 boolean addAll(java.util.Collection c)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection c)
           
 SpeedoAccessor createAccessor()
           
 java.lang.Object createGenClass()
           
 boolean equals(java.lang.Object o)
           
 SpeedoAccessor getReferenceAccessor()
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
 boolean retainAll(java.util.Collection c)
           
 void setReferenceAccessor(SpeedoAccessor refAcc)
          Assignes the reference accessor to the SpeedoProxy The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.
 int size()
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] a)
           
 
Methods inherited from class org.objectweb.speedo.genclass.GenClass
bind, copyAccessor, elementIsReference, exist, export, export, fireSpeedoElementAdded, fireSpeedoElementRemoved, fixCe, getCeAge, getCeFixCount, getCeIdentifier, getCeObject, getDataIdentifier, getDataIdentifiers, getEncodedPName, getLogger, getLoggerFactory, getPClassMapping, getPName, getSpeedoAccessor, getSpeedoAccessors, getSpeedoHome, getStatus, init, init, jdoCopyFields, jdoCopyKeyFieldsFromObjectId, jdoCopyKeyFieldsToObjectId, jdoCopyKeyFieldsToObjectId, jdoGetGenClassId, jdoGetJdoFileName, jdoGetObjectId, jdoGetPBinding, jdoGetPersistenceManager, jdoGetPNameHints, jdoGetPType, jdoGetTransactionalObjectId, jdoGetVersion, jdoIsActive, jdoIsActive, jdoIsDeleted, jdoIsDetached, jdoIsDirty, jdoIsNew, jdoIsPersistent, jdoIsTransactional, jdoMakeDirty, jdoNewInstance, jdoNewInstance, jdoNewObjectIdInstance, jdoNewObjectIdInstance, jdoNewObjectIdInstance, jdoProvideField, jdoProvideFields, jdoReplaceField, jdoReplaceFields, jdoReplaceFlags, jdoReplaceObjectId, jdoReplaceStateManager, jdoSetLinkedField, jdoSetPBinding, jdoSetPNameHints, jdoSetPType, read, read, removeSpeedoAccessor, setCeAge, setElements, setEncodedPName, setLogger, setLoggerFactory, setPName, setStatus, speedoAdd, speedoAdd, speedoAddGenClassListener, speedoRemove, speedoSetGcId, unbind, unexport, unfixCe, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
hashCode
 

Field Detail

DEFAULT_SIZE

protected static final int DEFAULT_SIZE
See Also:
Constant Field Values
Constructor Detail

CollectionImpl

public CollectionImpl()
Instanciates and initializes a new collection with an initial size.

Method Detail

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection

addAll

public boolean addAll(java.util.Collection c)
Specified by:
addAll in interface java.util.Collection

clear

public void clear()
Specified by:
clear in interface java.util.Collection

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection

containsAll

public boolean containsAll(java.util.Collection c)
Specified by:
containsAll in interface java.util.Collection

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Collection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.util.Collection

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection

removeAll

public boolean removeAll(java.util.Collection c)
Specified by:
removeAll in interface java.util.Collection

retainAll

public boolean retainAll(java.util.Collection c)
Specified by:
retainAll in interface java.util.Collection

size

public int size()
Specified by:
size in interface java.util.Collection

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
Specified by:
toArray in interface java.util.Collection

createAccessor

public SpeedoAccessor createAccessor()
Specified by:
createAccessor in interface SpeedoProxy
Specified by:
createAccessor in class GenClass

createGenClass

public java.lang.Object createGenClass()
Specified by:
createGenClass in interface SpeedoGenClassProxy

getReferenceAccessor

public SpeedoAccessor getReferenceAccessor()
Specified by:
getReferenceAccessor in interface SpeedoProxy
Specified by:
getReferenceAccessor in class GenClass

setReferenceAccessor

public void setReferenceAccessor(SpeedoAccessor refAcc)
Description copied from interface: SpeedoProxy
Assignes the reference accessor to the SpeedoProxy The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.

Specified by:
setReferenceAccessor in interface SpeedoProxy
Specified by:
setReferenceAccessor in class GenClass