public class DBPersistenceManager extends Object implements PersistenceManager
| Modifier and Type | Field and Description |
|---|---|
static String |
DISALLOW_CLEAR_PARAM |
static String |
DUMP_FILE_PARAM |
static String |
LOG_CLEAR_PARAM |
NO_DATABASE| Constructor and Description |
|---|
DBPersistenceManager(AbstractTenant tenant,
InvalidationManager invManager) |
| Modifier and Type | Method and Description |
|---|---|
protected PersistenceInfoCache |
cache() |
boolean |
cachesInfoFor(PK typePK) |
void |
clearBeforeDropTables()
For initialization only !
|
void |
clearComposedType(PK typePK,
String code) |
protected void |
clearTypeCache(de.hybris.platform.persistence.property.DBPersistenceManager.LoadStatus newStatus) |
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.
|
void |
destroy() |
protected void |
dumpPersistenceInfoCache(PersistenceInfoCache pic) |
Set<ItemDeployment> |
getAllDeployments() |
Collection<ItemDeployment> |
getAllSubDeployments(ItemDeployment depl) |
Set<Integer> |
getBeanTypeCodes(PK typePK)
Returns a set of all beans typecode which are typed by the type of the specified pk.
|
String |
getDumpFileName() |
Map<Integer,ItemDeployment> |
getDuplicatedItemDeployments()
Returns a duplicated deployments by its type code.
|
Set<PK> |
getExternalTableTypes(PK typePK)
Finds all subtypes of a given non-abstract type which are mapped to a different deployment.
|
PropertyTableDefinition |
getInitialPersistenceInfos(ComposedTypeRemote type,
boolean reinit) |
ItemDeployment |
getItemDeployment(int tc) |
ItemDeployment |
getItemDeployment(String beanOrJNDIName) |
String |
getJNDIName(int typeCode) |
String |
getJNDIName(String code)
locates the JNDI name for a given composed type code.
|
TypeInfoMap |
getPersistenceInfo(PK typePK) |
TypeInfoMap |
getPersistenceInfo(String code)
Returns a TypeInfoMap instance for each composed type.
|
String |
getSQLTypeDef(Class javaClass,
String ownTypeDef) |
PK |
getTypePK(String code) |
boolean |
isDestroyed() |
boolean |
isLoaded() |
boolean |
isLoading() |
boolean |
isRootRelationType(String code) |
void |
loadPersistenceInfos()
loads persistence info for all non-abstract types of the initialized system.
|
protected void |
registerHJMPFinderListeners(InvalidationManager invMan) |
void |
reloadPersistenceInfos() |
protected PersistenceInfoCache |
restorePersistenceInfoCache() |
void |
simulateFullClear()
For testing only! Do not use!
|
public static final String DUMP_FILE_PARAM
public static final String LOG_CLEAR_PARAM
public static final String DISALLOW_CLEAR_PARAM
public DBPersistenceManager(AbstractTenant tenant, InvalidationManager invManager)
public String getSQLTypeDef(Class javaClass, String ownTypeDef)
getSQLTypeDef in interface PersistenceManagerString.class would be mapped to NVARCHAR2(2000) )protected final PersistenceInfoCache cache()
public final TypeInfoMap getPersistenceInfo(String code)
If the instances could not be pre-load ( ususally when the system is not yet initialized )
TypeInfoMap.EMPTY_INFOMAP is returned.
getPersistenceInfo in interface PersistenceManagercode - the code of the item type aka composed typepublic final TypeInfoMap getPersistenceInfo(PK typePK)
getPersistenceInfo in interface PersistenceManagerpublic PropertyTableDefinition getInitialPersistenceInfos(ComposedTypeRemote type, boolean reinit)
getInitialPersistenceInfos in interface PersistenceManagerpublic final Collection<PropertyTableDefinition> createInitialPersistenceInfos(Collection types, boolean reinit)
getPersistenceInfo(String) or
loadPersistenceInfos() 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.createInitialPersistenceInfos in interface PersistenceManagertypes - the initial (non-abstract) types of the systemreinit - needed to get type manager fromPropertyTableDefinition, one for each tablepublic String getDumpFileName()
protected PersistenceInfoCache restorePersistenceInfoCache()
protected void dumpPersistenceInfoCache(PersistenceInfoCache pic)
public final void reloadPersistenceInfos()
public final void loadPersistenceInfos()
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.
loadPersistenceInfos in interface PersistenceManagerpublic boolean cachesInfoFor(PK typePK)
cachesInfoFor in interface PersistenceManagerpublic boolean isLoaded()
isLoaded in interface PersistenceManagerpublic boolean isDestroyed()
public boolean isLoading()
public Set<ItemDeployment> getAllDeployments()
public ItemDeployment getItemDeployment(String beanOrJNDIName)
getItemDeployment in interface PersistenceManagerbeanOrJNDIName - the jndi or bean name to get the deployment forpublic Map<Integer,ItemDeployment> getDuplicatedItemDeployments()
PersistenceManagergetDuplicatedItemDeployments in interface PersistenceManagerpublic ItemDeployment getItemDeployment(int tc)
getItemDeployment in interface PersistenceManagerpublic Collection<ItemDeployment> getAllSubDeployments(ItemDeployment depl)
getAllSubDeployments in interface PersistenceManagerpublic String getJNDIName(int typeCode)
getJNDIName in interface PersistenceManagertypeCode - the item typecode to get the jndi name forpublic String getJNDIName(String code)
getJNDIName in interface PersistenceManagerpublic PK getTypePK(String code)
getTypePK in interface PersistenceManagerpublic boolean isRootRelationType(String code)
isRootRelationType in interface PersistenceManagerpublic Set<PK> getExternalTableTypes(PK typePK)
PersistenceManagergetExternalTableTypes in interface PersistenceManagerprotected void registerHJMPFinderListeners(InvalidationManager invMan)
public void clearComposedType(PK typePK, String code)
clearComposedType in interface PersistenceManagerprotected void clearTypeCache(de.hybris.platform.persistence.property.DBPersistenceManager.LoadStatus newStatus)
public Set<Integer> getBeanTypeCodes(PK typePK)
getBeanTypeCodes in interface PersistenceManagertypePK - the pk of the type to get bean codes forpublic void simulateFullClear()
public void clearBeforeDropTables()
public void destroy()
Copyright © 2017 SAP SE. All Rights Reserved.