Class DBPersistenceManager
java.lang.Object
de.hybris.platform.persistence.property.DBPersistenceManager
- All Implemented Interfaces:
PersistenceManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface de.hybris.platform.persistence.property.PersistenceManager
NO_DATABASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final PersistenceInfoCachecache()booleancachesInfoFor(PK typePK) voidFor initialization only !voidclearComposedType(PK typePK, String code) protected voidclearTypeCache(de.hybris.platform.persistence.property.DBPersistenceManager.LoadStatus newStatus) createInitialPersistenceInfos(Collection types, boolean reinit) should only be called during initialization! this analyzes the collection of item type and creates new TypeInfoMap instances for them.voiddestroy()protected voidgetBeanTypeCodes(PK typePK) Returns a set of all beans typecode which are typed by the type of the specified pk.Returns a duplicated deployments by its type code.getExternalTableTypes(PK typePK) Finds all subtypes of a given non-abstract type which are mapped to a different deployment.getInitialPersistenceInfos(ComposedTypeRemote type, boolean reinit) getItemDeployment(int tc) getItemDeployment(String beanOrJNDIName) getJNDIName(int typeCode) getJNDIName(String code) locates the JNDI name for a given composed type code.final TypeInfoMapgetPersistenceInfo(PK typePK) final TypeInfoMapgetPersistenceInfo(String code) Returns a TypeInfoMap instance for each composed type.getSQLTypeDef(Class javaClass, String ownTypeDef) booleanbooleanisLoaded()booleanbooleanisRootRelationType(String code) voidfinal voidloads persistence info for all non-abstract types of the initialized system.protected voidfinal voidprotected PersistenceInfoCachevoidFor testing only! Do not use!
-
Field Details
-
TYPE_INFO_MAP_BATCH_MODE
- See Also:
-
DUMP_FILE_PARAM
- See Also:
-
LOG_CLEAR_PARAM
- See Also:
-
DISALLOW_CLEAR_PARAM
- See Also:
-
-
Constructor Details
-
DBPersistenceManager
-
-
Method Details
-
getSQLTypeDef
- Specified by:
getSQLTypeDefin interfacePersistenceManager- Returns:
- the property SQL column type definition for a given java class. ( e.g. for oracle
String.classwould be mapped toNVARCHAR2(2000))
-
cache
-
getPersistenceInfo
Returns a TypeInfoMap instance for each composed type. These instances are cached and pre-loaded on system startup. only composed types created after startup will be analyzed and a new instance is created.If the instances could not be pre-load ( ususally when the system is not yet initialized )
TypeInfoMap.EMPTY_INFOMAPis returned.- Specified by:
getPersistenceInfoin interfacePersistenceManager- Parameters:
code- the code of the item type aka composed type
-
getPersistenceInfo
- Specified by:
getPersistenceInfoin interfacePersistenceManager
-
getInitialPersistenceInfos
- Specified by:
getInitialPersistenceInfosin interfacePersistenceManager
-
createInitialPersistenceInfos
public final Collection<PropertyTableDefinition> createInitialPersistenceInfos(Collection types, boolean reinit) should only be called during initialization! this analyzes the collection of item type and creates new TypeInfoMap instances for them. the difference to loading them viagetPersistenceInfo(String)orloadPersistenceInfos()is that even property features without database column are put inside the instance, provided they have a proposed column name. this assumes that the caller of this method is able to create these columns somehow.- Specified by:
createInitialPersistenceInfosin interfacePersistenceManager- Parameters:
types- the initial (non-abstract) types of the systemreinit- needed to get type manager from- Returns:
- a collection of
PropertyTableDefinition, one for each table
-
getDumpFileName
-
restorePersistenceInfoCache
-
dumpPersistenceInfoCache
-
reloadPersistenceInfos
public final void reloadPersistenceInfos() -
loadPersistenceInfos
public final void loadPersistenceInfos()loads persistence info for all non-abstract types of the initialized system. this has to be called before any access to items ! otherwise accessing their properties will fail.for each type a instance is created and cached. these maps only contain features with present database column. you may use this to manually change a database column , shutdown the system, change you schema accordingly and restart the system again.
- Specified by:
loadPersistenceInfosin interfacePersistenceManager
-
legacyLoadPersistenceInfosInternalInTX
public void legacyLoadPersistenceInfosInternalInTX() -
cachesInfoFor
- Specified by:
cachesInfoForin interfacePersistenceManager
-
isLoaded
public boolean isLoaded()- Specified by:
isLoadedin interfacePersistenceManager
-
isDestroyed
public boolean isDestroyed() -
isLoading
public boolean isLoading() -
getAllDeployments
-
getItemDeployment
- Specified by:
getItemDeploymentin interfacePersistenceManager- Parameters:
beanOrJNDIName- the jndi or bean name to get the deployment for- Returns:
- the item deployment for this bean or jndi name, null if no such deployment exists
-
getDuplicatedItemDeployments
Description copied from interface:PersistenceManagerReturns a duplicated deployments by its type code. There is always inserted deployment which is deployed in DB persistance as to be redundant in compare to xml modeled one.- Specified by:
getDuplicatedItemDeploymentsin interfacePersistenceManager
-
getItemDeployment
- Specified by:
getItemDeploymentin interfacePersistenceManager
-
getAllSubDeployments
- Specified by:
getAllSubDeploymentsin interfacePersistenceManager
-
getJNDIName
- Specified by:
getJNDINamein interfacePersistenceManager- Parameters:
typeCode- the item typecode to get the jndi name for- Returns:
- the jndi name of the bean deployment which owns this typecode, null if no such deployment exists
-
getJNDIName
locates the JNDI name for a given composed type code.- Specified by:
getJNDINamein interfacePersistenceManager
-
getTypePK
- Specified by:
getTypePKin interfacePersistenceManager
-
isRootRelationType
- Specified by:
isRootRelationTypein interfacePersistenceManager
-
getExternalTableTypes
Description copied from interface:PersistenceManagerFinds all subtypes of a given non-abstract type which are mapped to a different deployment.- Specified by:
getExternalTableTypesin interfacePersistenceManager
-
registerHJMPFinderListeners
-
clearComposedType
- Specified by:
clearComposedTypein interfacePersistenceManager
-
clearTypeCache
protected void clearTypeCache(de.hybris.platform.persistence.property.DBPersistenceManager.LoadStatus newStatus) -
getBeanTypeCodes
Returns a set of all beans typecode which are typed by the type of the specified pk.- Specified by:
getBeanTypeCodesin interfacePersistenceManager- Parameters:
typePK- the pk of the type to get bean codes for- Returns:
- a set of bean code strings
-
simulateFullClear
public void simulateFullClear()For testing only! Do not use! -
clearBeforeDropTables
public void clearBeforeDropTables()For initialization only ! -
destroy
public void destroy()
-