org.objectweb.speedo.runtime.genclass.map
Class MapImpl

org.objectweb.speedo.runtime.genclass.GenClass
  |
  +--org.objectweb.speedo.runtime.genclass.map.MapImpl
All Implemented Interfaces:
java.util.Map, SpeedoAccessor, SpeedoGenClassProxy, SpeedoProxy

public class MapImpl
extends GenClass
implements java.util.Map


Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
protected  java.util.Map map
          is the internal map used when the generic class is not persistent
 
Fields inherited from class org.objectweb.speedo.runtime.genclass.GenClass
accessor, accessors, age, fixCount, inner, jdoIsActive, jdoStatus, linkedField, logger, mapperName, pbinding, pmf, pms, pnameHints, projectName, ptype, tpm, tx
 
Constructor Summary
MapImpl()
          Instantiates a new map.
MapImpl(int size)
          Instanciates and initializes a new map with an initial size.
MapImpl(java.util.Map map, org.objectweb.jorm.type.api.PType ptype, java.lang.String linkedField, org.objectweb.jorm.naming.api.PName linkedPName, java.lang.String mapperName)
           
MapImpl(org.objectweb.jorm.type.api.PType ptype, java.lang.String linkedField, org.objectweb.jorm.naming.api.PName linkedPName, java.lang.String mapperName)
           
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
protected  SpeedoAccessor createAccessor()
           
protected  MapImpl createInstance(int size)
           
protected  java.util.Map createMap(int size)
           
 java.util.Set entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
 java.util.Collection getGenClassElements(SpeedoAccessor sa)
           
 boolean isEmpty()
           
 void jdoLoadFieldsFromAccessor(SpeedoAccessor sa)
          Stores fields owned by the accessor into the proxy
 void jdoLoadFieldsInAccessor(SpeedoAccessor sa)
          Stores fields owned by this object into an accessor
 void jdoMakePersistent(ProxyManager pm)
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
 void setGCValue(java.lang.Object o)
           
 int size()
           
 java.util.Collection values()
           
 
Methods inherited from class org.objectweb.speedo.runtime.genclass.GenClass
bind, elementIsReference, exist, export, export, fixCe, getCeAge, getCeFixCount, getCeIdentifier, getCeObject, getJormConfig, getLogger, getLoggerFactory, getMemoryInstance, getPClassMapping, getPName, getSpeedoAccessor, getSpeedoAccessors, getStatus, init, jdoChangeStatus, jdoCopyFields, jdoCopyKeyFieldsFromObjectId, jdoCopyKeyFieldsToObjectId, jdoCopyKeyFieldsToObjectId, jdoDeletePersistent, jdoGePNameHints, jdoGetGenClassId, jdoGetJdoFileName, jdoGetMapperName, jdoGetObjectId, jdoGetPersistenceManager, jdoGetPersistenceManagerFactory, jdoGetPersistenceManagerSwitch, jdoGetProjectName, jdoGetPType, jdoGetSpeedoProxy, jdoGetStatus, jdoGetTransaction, jdoGetTransactionalObjectId, jdoGetTransactionalPersistenceManager, jdoIsActive, jdoIsActive, jdoIsContainerId, jdoIsDeleted, jdoIsDirty, jdoIsNew, jdoIsPersistent, jdoIsTransactional, jdoMakeDirty, jdoMakePersistent, jdoNewInstance, jdoNewInstance, jdoNewObjectIdInstance, jdoNewObjectIdInstance, jdoProvideField, jdoProvideFields, jdoReadIntention, jdoReplaceField, jdoReplaceFields, jdoReplaceFlags, jdoReplaceStateManager, jdoSetLinkedField, jdoSetMapperName, jdoSetPBinding, jdoSetPBinding, jdoSetPersistenceManagerFactory, jdoSetPersistenceManagerSwitch, jdoSetPNameHints, jdoSetPType, jdoSetSpeedoProxy, jdoSetStatus, jdoSetTransaction, jdoSetTransactionalPersistenceManager, jdoWriteIntention, read, read, removeSpeedoAccessor, setCeAge, setInner, setLogger, setLoggerFactory, setPName, setStatus, unbind, unexport, unfixCe, write
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

map

protected java.util.Map map
is the internal map used when the generic class is not persistent
Constructor Detail

MapImpl

public MapImpl()
Instantiates a new map.

MapImpl

public MapImpl(int size)
Instanciates and initializes a new map with an initial size.

MapImpl

public MapImpl(java.util.Map map,
               org.objectweb.jorm.type.api.PType ptype,
               java.lang.String linkedField,
               org.objectweb.jorm.naming.api.PName linkedPName,
               java.lang.String mapperName)

MapImpl

public MapImpl(org.objectweb.jorm.type.api.PType ptype,
               java.lang.String linkedField,
               org.objectweb.jorm.naming.api.PName linkedPName,
               java.lang.String mapperName)
Method Detail

size

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

isEmpty

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

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map

clear

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

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

setGCValue

public void setGCValue(java.lang.Object o)
Overrides:
setGCValue in class GenClass

createAccessor

protected SpeedoAccessor createAccessor()
Overrides:
createAccessor in class GenClass

jdoLoadFieldsInAccessor

public void jdoLoadFieldsInAccessor(SpeedoAccessor sa)
Description copied from interface: SpeedoProxy
Stores fields owned by this object into an accessor
Overrides:
jdoLoadFieldsInAccessor in class GenClass
Following copied from interface: org.objectweb.speedo.api.SpeedoProxy
Parameters:
sa - the accessor requiring persistent fields

jdoLoadFieldsFromAccessor

public void jdoLoadFieldsFromAccessor(SpeedoAccessor sa)
Description copied from interface: SpeedoProxy
Stores fields owned by the accessor into the proxy
Overrides:
jdoLoadFieldsFromAccessor in class GenClass
Following copied from interface: org.objectweb.speedo.api.SpeedoProxy
Parameters:
sa - the accessor containing persistent fields

getGenClassElements

public java.util.Collection getGenClassElements(SpeedoAccessor sa)
Overrides:
getGenClassElements in class GenClass

jdoMakePersistent

public void jdoMakePersistent(ProxyManager pm)

createMap

protected java.util.Map createMap(int size)

createInstance

protected MapImpl createInstance(int size)