Package org.alfresco.repo.domain.usage
Class AbstractUsageDAOImpl
java.lang.Object
org.alfresco.repo.domain.usage.AbstractUsageDAOImpl
- All Implemented Interfaces:
UsageDAO
- Direct Known Subclasses:
UsageDAOImpl
Abstract implementation for Usage DAO.
This provides basic services such as caching, but defers to the underlying implementation for CRUD operations for: alf_usage_delta
- Since:
- 3.4
- Author:
- janv
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.domain.usage.UsageDAO
UsageDAO.MapHandler, UsageDAO.StringHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdeleteDeltas(long nodeId) Delete usage deltas for given node entity idintdeleteDeltas(NodeRef nodeRef) Delete usage deltas for given nodeRefprotected abstract intdeleteUsageDeltaEntitiesByNodeId(long nodeEntityId) getContentSizeForStoreForUser(StoreRef storeRef, String userName) Get user with a calculated usagelonggetTotalDeltaSize(NodeRef nodeRef, boolean removeDeltas) Get the total delta size for a node.voidgetUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback) New style content urls - Iterate and sum all content node sizes for user (owner/creator)voidgetUsersWithoutUsage(StoreRef storeRef, UsageDAO.MapHandler handler) Iterate over all person nodes to get users without a calculated usagevoidgetUsersWithUsage(StoreRef storeRef, UsageDAO.MapHandler handler) Iterate over all person nodes to get users with a calculated usagevoidinsertDelta(NodeRef usageNodeRef, long deltaSize) Create a usage delta entry.protected abstract UsageDeltaEntityprotected abstract LongselectContentSizeForStoreForUser(StoreRef storeRef, String userName) protected abstract UsageDeltaEntityselectTotalUsageDeltaSize(long nodeEntityId) protected abstract voidselectUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback) protected abstract voidselectUsersWithoutUsage(StoreRef storeRef, UsageDAO.MapHandler handler) protected abstract voidselectUsersWithUsage(StoreRef storeRef, UsageDAO.MapHandler handler) voidsetNodeDAO(NodeDAO nodeDAO)
-
Constructor Details
-
AbstractUsageDAOImpl
public AbstractUsageDAOImpl()
-
-
Method Details
-
setNodeDAO
-
deleteDeltas
Description copied from interface:UsageDAODelete usage deltas for given nodeRef- Specified by:
deleteDeltasin interfaceUsageDAO- Parameters:
nodeRef- NodeRef- Returns:
- int
-
deleteDeltas
public int deleteDeltas(long nodeId) Description copied from interface:UsageDAODelete usage deltas for given node entity id- Specified by:
deleteDeltasin interfaceUsageDAO- Parameters:
nodeId- long- Returns:
- int
-
getTotalDeltaSize
Description copied from interface:UsageDAOGet the total delta size for a node.- Specified by:
getTotalDeltaSizein interfaceUsageDAO- Parameters:
nodeRef- the node referenceremoveDeltas- true to remove the deltas before returning the result.- Returns:
- sum of delta sizes (in bytes) - can be +ve or -ve
-
insertDelta
Description copied from interface:UsageDAOCreate a usage delta entry.- Specified by:
insertDeltain interfaceUsageDAOdeltaSize- the size change
-
getUsageDeltaNodes
- Specified by:
getUsageDeltaNodesin interfaceUsageDAO
-
getUserContentSizesForStore
Description copied from interface:UsageDAONew style content urls - Iterate and sum all content node sizes for user (owner/creator)- Specified by:
getUserContentSizesForStorein interfaceUsageDAO- Parameters:
storeRef- the store to search inresultsCallback- the callback to use while iterating over the content sizes (one row per user)
-
getUsersWithoutUsage
Description copied from interface:UsageDAOIterate over all person nodes to get users without a calculated usage- Specified by:
getUsersWithoutUsagein interfaceUsageDAO- Parameters:
storeRef- the store to search inhandler- the callback to use while iterating over the people
-
getUsersWithUsage
Description copied from interface:UsageDAOIterate over all person nodes to get users with a calculated usage- Specified by:
getUsersWithUsagein interfaceUsageDAO- Parameters:
storeRef- the store to search inhandler- the callback to use while iterating over the people
-
getContentSizeForStoreForUser
Description copied from interface:UsageDAOGet user with a calculated usage- Specified by:
getContentSizeForStoreForUserin interfaceUsageDAO- Parameters:
storeRef- the store to search inuserName- the username- Returns:
- Returns ussage
-
insertUsageDeltaEntity
-
selectTotalUsageDeltaSize
-
selectUsageDeltaNodes
-
selectUsersWithoutUsage
-
selectUsersWithUsage
-
selectUserContentSizesForStore
protected abstract void selectUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback) -
selectContentSizeForStoreForUser
-
deleteUsageDeltaEntitiesByNodeId
protected abstract int deleteUsageDeltaEntitiesByNodeId(long nodeEntityId)
-