|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.mim.lib.AbstractHomeImpl
public abstract class AbstractHomeImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.objectweb.jorm.api.PClassMapping |
---|
org.objectweb.jorm.api.PClassMapping.ReferenceConfigurator |
Field Summary | |
---|---|
protected java.util.Map |
namedQueries
|
protected Personality |
personality
|
protected POManagerFactoryItf |
pmf
|
protected TransactionalPersistenceManager |
tpm
|
protected UserCache[] |
userCaches
|
Fields inherited from interface org.objectweb.speedo.mim.api.HomeItf |
---|
ALL, CACHED, FIXED, NO_CACHE, POST_ATTACH, POST_CLEAR, POST_CREATE, POST_DELETE, POST_DETACH, POST_DIRTY, POST_LOAD, POST_NEW, POST_REMOVE, POST_UPDATE, PRE_ATTACH, PRE_CLEAR, PRE_CREATE, PRE_DELETE, PRE_DETACH, PRE_DIRTY, PRE_NEW, PRE_REMOVE, PRE_UPDATE |
Fields inherited from interface org.objectweb.jorm.api.PClassMapping |
---|
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED |
Constructor Summary | |
---|---|
AbstractHomeImpl(Personality p)
|
|
AbstractHomeImpl(TransactionalPersistenceManager _tpm,
POManagerFactoryItf _pmf)
|
Method Summary | |
---|---|
boolean |
activeUserCache(java.lang.String cacheName)
This method is implemented by the generated XXXHome class |
QueryDefinition |
addNamedQuery(java.lang.String name,
QueryDefinition query)
Defines a named query |
protected UserCache |
addUserCache(java.lang.String userCacheName,
java.lang.String[] fields,
int id)
|
boolean |
allLoaded()
|
void |
attachCopy(PersistentObjectItf sp,
POManagerItf pm,
java.util.Map map,
java.lang.Object clone,
StateItf sa)
|
PersistentObjectItf |
detachCopy(PersistentObjectItf sp,
POManagerItf pm,
java.util.Map map,
java.lang.Object clone,
java.util.Collection fgHints)
|
java.util.Collection |
fgGetFieldsToLoad(java.lang.String fgName)
This default implementation does nothing and returns null. |
java.util.Collection |
fgGetFieldsToLoad(java.lang.String fgName,
boolean onlyDirectRef)
|
java.util.Collection |
fgGetNestedFetchGroups(java.lang.String fgName)
This default implementation does nothing and returns null. |
boolean |
fgIsDefined(java.lang.String fgName)
This default implementation returns always false. |
java.util.Collection |
getActiveUserCache()
Retrieves the list of user cache which has been initialized. |
java.lang.Class |
getClassForQuery(java.lang.String className,
java.lang.String queryName)
|
QueryDefinition |
getNamedQuery(java.lang.String name)
Retrieves a query defintion from its name. |
java.lang.String |
getPath()
|
POManagerFactoryItf |
getPOManagerFactory()
|
boolean |
getPrefetchOnExtent()
|
boolean |
getPrefetchOnGenClass()
|
boolean |
getPrefetchOnQuery()
|
StateItf |
getState(PersistentObjectItf sp)
It retrieves the StateItf instance used in the current context. |
TransactionalPersistenceManager |
getTransactionalPersistenceManager()
|
UserCache |
getUserCache(java.util.Collection fieldNames)
Retrieves the name of the user cache which index is exactly composed by some field names. |
UserCache |
getUserCache(int cacheId)
Retrives a user cache |
boolean |
hasToFix()
|
void |
initSH()
|
protected boolean |
isAbstract()
|
boolean |
isCacheable()
Indicates if the state of persistent instance managed by this home, are kept between two transaction. |
boolean |
isFieldLockingLevel()
Indicates if the locking level must be the field. |
boolean |
isShareable()
|
protected PersistentObjectItf |
newSpeedoPOInstance(java.lang.Class clazz)
Create a new instance of a PersistentObjectItf which the clas is given in parameter. |
StateItf |
readIntention(PersistentObjectItf sp,
long[] fields)
Notifies the transactional persistency manager of a read intention for the given persistent instance. |
QueryDefinition |
removeNamedQuery(java.lang.String name)
Remove a named query |
void |
setCachePolicy(byte v)
Permit to Indicate if the state of persistent instance managed by this home, are kept between two transaction. |
void |
setFieldLockingLevel(boolean val)
Permits to Indicate if the locking level must be the field. |
void |
setPOManagerFactory(POManagerFactoryItf _pmf)
It assignes a PersistenceManagerFactory |
void |
setPrefetchOnExtent(boolean prefetch)
Indicates if the prefetching must be activated on extents when they return instance corresponding to this home. |
void |
setPrefetchOnGenClass(boolean prefetch)
Indicates if the prefetching must be activated genclass loading. |
void |
setPrefetchOnQuery(boolean prefetch)
Indicates if the prefetching must be activated on queries when they return instance corresponding to this home. |
void |
setShareable(boolean v)
|
void |
setTransactionalPersistenceManager(TransactionalPersistenceManager _tpm)
It assignes a TransactionalPersistenceManager |
void |
userCacheEntryUnbound(java.lang.Object oid)
An entry of user cache has been unbound from the real cache. |
StateItf |
writeIntention(PersistentObjectItf sp,
long[] fields)
|
StateItf |
writeIntention(PersistentObjectItf sp,
long[] fields,
java.lang.Object thinLock)
Notifies the transactional persistency manager of a write intention for the given persistent instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.speedo.mim.api.HomeItf |
---|
addInstanceLifeCycleListener, getClassProperties, getProjectName, getVersioningStrategy, hasInstanceLifeCycleListeners, isDetachable, removeInstanceLifeCycleListener, sendEvent |
Methods inherited from interface org.objectweb.jorm.api.PClassMapping |
---|
addAssociation, classDefined, configureRefFields, createPBinding, exist, getAssociationTable, getClassName, getClassPNameCoder, getDecodedPName, getGenClassMapping, getGenClassMapping, getIndexesTable, getMetaInfo, getPBinder, getPMapper, getPNameCoder, getPNameCoder, getPNameIterator, getPNameIterator, getPType, getSubPCMs, init, init, isConform, match, read, read, read, resolve, setPBinder, write |
Methods inherited from interface org.objectweb.jorm.util.api.Loggable |
---|
getLogger, getLoggerFactory, setLogger, setLoggerFactory |
Field Detail |
---|
protected TransactionalPersistenceManager tpm
protected POManagerFactoryItf pmf
protected java.util.Map namedQueries
protected Personality personality
protected UserCache[] userCaches
Constructor Detail |
---|
public AbstractHomeImpl(Personality p)
public AbstractHomeImpl(TransactionalPersistenceManager _tpm, POManagerFactoryItf _pmf)
Method Detail |
---|
protected boolean isAbstract()
protected PersistentObjectItf newSpeedoPOInstance(java.lang.Class clazz) throws java.lang.Exception
java.lang.Exception
public boolean isCacheable()
HomeItf
isCacheable
in interface HomeItf
public boolean allLoaded()
allLoaded
in interface HomeItf
public boolean hasToFix()
hasToFix
in interface HomeItf
public void setCachePolicy(byte v)
HomeItf
setCachePolicy
in interface HomeItf
public boolean isShareable()
isShareable
in interface HomeItf
public void setShareable(boolean v)
setShareable
in interface HomeItf
public boolean isFieldLockingLevel()
HomeItf
isFieldLockingLevel
in interface HomeItf
public void setFieldLockingLevel(boolean val)
HomeItf
setFieldLockingLevel
in interface HomeItf
public java.util.Collection fgGetNestedFetchGroups(java.lang.String fgName)
public boolean fgIsDefined(java.lang.String fgName)
public java.util.Collection fgGetFieldsToLoad(java.lang.String fgName)
public final POManagerFactoryItf getPOManagerFactory()
getPOManagerFactory
in interface HomeItf
public final void setPOManagerFactory(POManagerFactoryItf _pmf)
setPOManagerFactory
in interface HomeItf
_pmf
- is the PersistenceManagerFactory which represents the data
support inside which the po is persistent.public final TransactionalPersistenceManager getTransactionalPersistenceManager()
getTransactionalPersistenceManager
in interface HomeItf
public final void setTransactionalPersistenceManager(TransactionalPersistenceManager _tpm)
setTransactionalPersistenceManager
in interface HomeItf
_tpm
- is the TransactionalPersistenceManager which manage the
concurrency, loading, ... of the po.public final StateItf readIntention(PersistentObjectItf sp, long[] fields)
readIntention
in interface HomeItf
sp
- is the PersistentObjectItf which the read access is requested.fields
- the ids of the fields that may be accessed by the caller
of this method. If the i-th bit of 'fields' is set to 1, then the i-th
field of the given speedo accessor may be accessed by the caller of this
method.public final StateItf writeIntention(PersistentObjectItf sp, long[] fields)
writeIntention
in interface HomeItf
public StateItf writeIntention(PersistentObjectItf sp, long[] fields, java.lang.Object thinLock)
writeIntention
in interface HomeItf
sp
- is the PersistentObjectItf which the write access is requested.fields
- the ids of the fields that may be accessed by the caller
of this method. If the i-th bit of 'fields' is set to 1, then the i-th
field of the given speedo accessor may be accessed by the caller of this
method.thinLock
- permits to allocate a lock on only a part of the
resource. The locking size is thinner than a lock on the persistent
object entirely. This parameter can be typically used to lock at the
field or the genclass element levels.public final StateItf getState(PersistentObjectItf sp)
getState
in interface HomeItf
public final PersistentObjectItf detachCopy(PersistentObjectItf sp, POManagerItf pm, java.util.Map map, java.lang.Object clone, java.util.Collection fgHints)
detachCopy
in interface HomeItf
public final void attachCopy(PersistentObjectItf sp, POManagerItf pm, java.util.Map map, java.lang.Object clone, StateItf sa)
attachCopy
in interface HomeItf
public final java.util.Collection fgGetFieldsToLoad(java.lang.String fgName, boolean onlyDirectRef)
public void setPrefetchOnExtent(boolean prefetch)
HomeItf
setPrefetchOnExtent
in interface HomeItf
public boolean getPrefetchOnExtent()
getPrefetchOnExtent
in interface HomeItf
public void setPrefetchOnGenClass(boolean prefetch)
HomeItf
setPrefetchOnGenClass
in interface HomeItf
public boolean getPrefetchOnGenClass()
getPrefetchOnGenClass
in interface HomeItf
public void setPrefetchOnQuery(boolean prefetch)
HomeItf
setPrefetchOnQuery
in interface HomeItf
public boolean getPrefetchOnQuery()
getPrefetchOnQuery
in interface HomeItf
public void initSH()
initSH
in interface HomeItf
public java.lang.Class getClassForQuery(java.lang.String className, java.lang.String queryName)
public final QueryDefinition addNamedQuery(java.lang.String name, QueryDefinition query)
HomeItf
addNamedQuery
in interface HomeItf
name
- is the name identifying the queryquery
- is the definition of the query
public final QueryDefinition removeNamedQuery(java.lang.String name)
HomeItf
removeNamedQuery
in interface HomeItf
name
- is the name of the query definition to remove
public final QueryDefinition getNamedQuery(java.lang.String name)
HomeItf
getNamedQuery
in interface HomeItf
name
- is the name the wanted query definitionpublic java.lang.String getPath()
getPath
in interface HomeItf
protected UserCache addUserCache(java.lang.String userCacheName, java.lang.String[] fields, int id)
public boolean activeUserCache(java.lang.String cacheName)
activeUserCache
in interface UserCacheManager
cacheName
- is the name of the user cache to initialize
public UserCache getUserCache(int cacheId)
UserCacheManager
getUserCache
in interface UserCacheManager
cacheId
- is the identifier of the asked user cache
public UserCache getUserCache(java.util.Collection fieldNames)
UserCacheManager
getUserCache
in interface UserCacheManager
fieldNames
- is the collection of field names (String). The order of
the collection is not important here.
public java.util.Collection getActiveUserCache()
UserCacheManager
getActiveUserCache
in interface UserCacheManager
public void userCacheEntryUnbound(java.lang.Object oid)
UserCacheManager
userCacheEntryUnbound
in interface UserCacheManager
oid
- is the identifier of the persistent object to unbind
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |