@Component(value="cuba_PersistenceManager") public class PersistenceManager extends java.lang.Object implements PersistenceManagerAPI
NAME
Constructor and Description |
---|
PersistenceManager() |
Modifier and Type | Method and Description |
---|---|
void |
deleteStatistics(java.lang.String name) |
EntityStatistics |
enterStatistics(java.lang.String name,
java.lang.Long instanceCount,
java.lang.Integer fetchUI,
java.lang.Integer maxFetchUI,
java.lang.Integer lazyCollectionThreshold,
java.lang.Integer lookupScreenThreshold) |
void |
flushStatisticsCache() |
java.util.SortedMap<java.lang.String,EntityStatistics> |
getEntityStatistics() |
int |
getFetchUI(java.lang.String entityName)
Return a limit of rows fetched for UI components in 'normal' conditions
|
int |
getMaxFetchUI(java.lang.String entityName)
Return the absolute maximum number of rows that can be fetched for UI components
|
void |
refreshStatisticsForEntity(java.lang.String name) |
void |
setConfiguration(Configuration configuration) |
boolean |
useLazyCollection(java.lang.String entityName)
Whether to use a lazy collection datasource for this entity, based on current statistics.
|
boolean |
useLookupScreen(java.lang.String entityName)
Whether to use a lookup screen or a dropdown for this entity, based on current statistics.
|
@Inject public void setConfiguration(Configuration configuration)
public boolean useLazyCollection(java.lang.String entityName)
PersistenceManagerAPI
useLazyCollection
in interface PersistenceManagerAPI
entityName
- entity namepublic boolean useLookupScreen(java.lang.String entityName)
PersistenceManagerAPI
useLookupScreen
in interface PersistenceManagerAPI
entityName
- entity namepublic int getFetchUI(java.lang.String entityName)
PersistenceManagerAPI
getFetchUI
in interface PersistenceManagerAPI
entityName
- entity namepublic int getMaxFetchUI(java.lang.String entityName)
PersistenceManagerAPI
getMaxFetchUI
in interface PersistenceManagerAPI
entityName
- entity namepublic void flushStatisticsCache()
flushStatisticsCache
in interface PersistenceManagerAPI
public EntityStatistics enterStatistics(java.lang.String name, java.lang.Long instanceCount, java.lang.Integer fetchUI, java.lang.Integer maxFetchUI, java.lang.Integer lazyCollectionThreshold, java.lang.Integer lookupScreenThreshold)
enterStatistics
in interface PersistenceManagerAPI
public java.util.SortedMap<java.lang.String,EntityStatistics> getEntityStatistics()
getEntityStatistics
in interface PersistenceManagerAPI
public void deleteStatistics(java.lang.String name)
deleteStatistics
in interface PersistenceManagerAPI
public void refreshStatisticsForEntity(java.lang.String name)
refreshStatisticsForEntity
in interface PersistenceManagerAPI