public abstract class AbstractUsageDAOImpl extends Object implements UsageDAO
This provides basic services such as caching, but defers to the underlying implementation for CRUD operations for: alf_usage_delta
UsageDAO.MapHandler, UsageDAO.StringHandler| Constructor and Description |
|---|
AbstractUsageDAOImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
deleteDeltas(long nodeId)
Delete usage deltas for given node entity id
|
int |
deleteDeltas(NodeRef nodeRef)
Delete usage deltas for given nodeRef
|
protected abstract int |
deleteUsageDeltaEntitiesByNodeId(long nodeEntityId) |
Long |
getContentSizeForStoreForUser(StoreRef storeRef,
String userName)
Get user with a calculated usage
|
long |
getTotalDeltaSize(NodeRef nodeRef,
boolean removeDeltas)
Get the total delta size for a node.
|
Set<NodeRef> |
getUsageDeltaNodes() |
void |
getUserContentSizesForStore(StoreRef storeRef,
UsageDAO.MapHandler resultsCallback)
New style content urls - Iterate and sum all content node sizes for user (owner/creator)
|
void |
getUsersWithoutUsage(StoreRef storeRef,
UsageDAO.MapHandler handler)
Iterate over all person nodes to get users without a calculated usage
|
void |
getUsersWithUsage(StoreRef storeRef,
UsageDAO.MapHandler handler)
Iterate over all person nodes to get users with a calculated usage
|
void |
insertDelta(NodeRef usageNodeRef,
long deltaSize)
Create a usage delta entry.
|
protected abstract UsageDeltaEntity |
insertUsageDeltaEntity(UsageDeltaEntity entity) |
protected abstract Long |
selectContentSizeForStoreForUser(StoreRef storeRef,
String userName) |
protected abstract UsageDeltaEntity |
selectTotalUsageDeltaSize(long nodeEntityId) |
protected abstract List<Long> |
selectUsageDeltaNodes() |
protected abstract void |
selectUserContentSizesForStore(StoreRef storeRef,
UsageDAO.MapHandler resultsCallback) |
protected abstract void |
selectUsersWithoutUsage(StoreRef storeRef,
UsageDAO.MapHandler handler) |
protected abstract void |
selectUsersWithUsage(StoreRef storeRef,
UsageDAO.MapHandler handler) |
void |
setNodeDAO(NodeDAO nodeDAO) |
public void setNodeDAO(NodeDAO nodeDAO)
public int deleteDeltas(NodeRef nodeRef)
UsageDAOdeleteDeltas in interface UsageDAOnodeRef - NodeRefpublic int deleteDeltas(long nodeId)
UsageDAOdeleteDeltas in interface UsageDAOnodeId - longpublic long getTotalDeltaSize(NodeRef nodeRef, boolean removeDeltas)
UsageDAOgetTotalDeltaSize in interface UsageDAOnodeRef - the node referenceremoveDeltas - true to remove the deltas before returning the result.public void insertDelta(NodeRef usageNodeRef, long deltaSize)
UsageDAOinsertDelta in interface UsageDAOdeltaSize - the size changepublic Set<NodeRef> getUsageDeltaNodes()
getUsageDeltaNodes in interface UsageDAOpublic void getUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
UsageDAOgetUserContentSizesForStore in interface UsageDAOstoreRef - the store to search inresultsCallback - the callback to use while iterating over the content sizes (one row per user)public void getUsersWithoutUsage(StoreRef storeRef, UsageDAO.MapHandler handler)
UsageDAOgetUsersWithoutUsage in interface UsageDAOstoreRef - the store to search inhandler - the callback to use while iterating over the peoplepublic void getUsersWithUsage(StoreRef storeRef, UsageDAO.MapHandler handler)
UsageDAOgetUsersWithUsage in interface UsageDAOstoreRef - the store to search inhandler - the callback to use while iterating over the peoplepublic Long getContentSizeForStoreForUser(StoreRef storeRef, String userName)
UsageDAOgetContentSizeForStoreForUser in interface UsageDAOstoreRef - the store to search inuserName - the usernameprotected abstract UsageDeltaEntity insertUsageDeltaEntity(UsageDeltaEntity entity)
protected abstract UsageDeltaEntity selectTotalUsageDeltaSize(long nodeEntityId)
protected abstract void selectUsersWithoutUsage(StoreRef storeRef, UsageDAO.MapHandler handler)
protected abstract void selectUsersWithUsage(StoreRef storeRef, UsageDAO.MapHandler handler)
protected abstract void selectUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
protected abstract Long selectContentSizeForStoreForUser(StoreRef storeRef, String userName)
protected abstract int deleteUsageDeltaEntitiesByNodeId(long nodeEntityId)
Copyright © 2005–2020 Alfresco Software. All rights reserved.