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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Delete usage deltas for given nodeRef
|
protected abstract int |
deleteUsageDeltaEntitiesByNodeId(long nodeEntityId) |
Long |
getContentSizeForStoreForUser(org.alfresco.service.cmr.repository.StoreRef storeRef,
String userName)
Get user with a calculated usage
|
long |
getTotalDeltaSize(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean removeDeltas)
Get the total delta size for a node.
|
Set<org.alfresco.service.cmr.repository.NodeRef> |
getUsageDeltaNodes() |
void |
getUserContentSizesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef,
UsageDAO.MapHandler resultsCallback)
New style content urls - Iterate and sum all content node sizes for user (owner/creator)
|
void |
getUsersWithoutUsage(org.alfresco.service.cmr.repository.StoreRef storeRef,
UsageDAO.MapHandler handler)
Iterate over all person nodes to get users without a calculated usage
|
void |
getUsersWithUsage(org.alfresco.service.cmr.repository.StoreRef storeRef,
UsageDAO.MapHandler handler)
Iterate over all person nodes to get users with a calculated usage
|
void |
insertDelta(org.alfresco.service.cmr.repository.NodeRef usageNodeRef,
long deltaSize)
Create a usage delta entry.
|
protected abstract UsageDeltaEntity |
insertUsageDeltaEntity(UsageDeltaEntity entity) |
protected abstract Long |
selectContentSizeForStoreForUser(org.alfresco.service.cmr.repository.StoreRef storeRef,
String userName) |
protected abstract UsageDeltaEntity |
selectTotalUsageDeltaSize(long nodeEntityId) |
protected abstract List<Long> |
selectUsageDeltaNodes() |
protected abstract void |
selectUserContentSizesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef,
UsageDAO.MapHandler resultsCallback) |
protected abstract void |
selectUsersWithoutUsage(org.alfresco.service.cmr.repository.StoreRef storeRef,
UsageDAO.MapHandler handler) |
protected abstract void |
selectUsersWithUsage(org.alfresco.service.cmr.repository.StoreRef storeRef,
UsageDAO.MapHandler handler) |
void |
setNodeDAO(NodeDAO nodeDAO) |
public void setNodeDAO(NodeDAO nodeDAO)
public int deleteDeltas(org.alfresco.service.cmr.repository.NodeRef nodeRef)
UsageDAO
deleteDeltas
in interface UsageDAO
nodeRef
- NodeRefpublic int deleteDeltas(long nodeId)
UsageDAO
deleteDeltas
in interface UsageDAO
nodeId
- longpublic long getTotalDeltaSize(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean removeDeltas)
UsageDAO
getTotalDeltaSize
in interface UsageDAO
nodeRef
- the node referenceremoveDeltas
- true to remove the deltas before returning the result.public void insertDelta(org.alfresco.service.cmr.repository.NodeRef usageNodeRef, long deltaSize)
UsageDAO
insertDelta
in interface UsageDAO
deltaSize
- the size changepublic Set<org.alfresco.service.cmr.repository.NodeRef> getUsageDeltaNodes()
getUsageDeltaNodes
in interface UsageDAO
public void getUserContentSizesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
UsageDAO
getUserContentSizesForStore
in interface UsageDAO
storeRef
- the store to search inresultsCallback
- the callback to use while iterating over the content sizes (one row per user)public void getUsersWithoutUsage(org.alfresco.service.cmr.repository.StoreRef storeRef, UsageDAO.MapHandler handler)
UsageDAO
getUsersWithoutUsage
in interface UsageDAO
storeRef
- the store to search inhandler
- the callback to use while iterating over the peoplepublic void getUsersWithUsage(org.alfresco.service.cmr.repository.StoreRef storeRef, UsageDAO.MapHandler handler)
UsageDAO
getUsersWithUsage
in interface UsageDAO
storeRef
- the store to search inhandler
- the callback to use while iterating over the peoplepublic Long getContentSizeForStoreForUser(org.alfresco.service.cmr.repository.StoreRef storeRef, String userName)
UsageDAO
getContentSizeForStoreForUser
in interface UsageDAO
storeRef
- the store to search inuserName
- the usernameprotected abstract UsageDeltaEntity insertUsageDeltaEntity(UsageDeltaEntity entity)
protected abstract UsageDeltaEntity selectTotalUsageDeltaSize(long nodeEntityId)
protected abstract void selectUsersWithoutUsage(org.alfresco.service.cmr.repository.StoreRef storeRef, UsageDAO.MapHandler handler)
protected abstract void selectUsersWithUsage(org.alfresco.service.cmr.repository.StoreRef storeRef, UsageDAO.MapHandler handler)
protected abstract void selectUserContentSizesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
protected abstract Long selectContentSizeForStoreForUser(org.alfresco.service.cmr.repository.StoreRef storeRef, String userName)
protected abstract int deleteUsageDeltaEntitiesByNodeId(long nodeEntityId)
Copyright © 2005–2017 Alfresco Software. All rights reserved.