public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
AbstractContentDataDAOImpl.ContentUrlDeleteTransactionListener
ContentDataDAO.ContentUrlHandler
Modifier and Type | Field and Description |
---|---|
protected org.mybatis.spring.SqlSessionTemplate |
template |
controlDAO, encodingDAO, localeDAO, mimetypeDAO
Constructor and Description |
---|
ContentDataDAOImpl() |
Modifier and Type | Method and Description |
---|---|
int |
countSymmetricKeysForMasterKeyAlias(String masterKeyAlias)
Count symmetric keys entities for symmetric keys that have been encrypted using the given
master key
|
Map<String,Integer> |
countSymmetricKeysForMasterKeys()
Count symmetric keys entities for symmetric keys for all master keys
|
protected ContentDataEntity |
createContentDataEntity(Long contentUrlId,
Long mimetypeId,
Long encodingId,
Long localeId)
Create the row for the alf_content_data
|
protected ContentUrlEntity |
createContentUrlEntity(String contentUrl,
long size,
ContentUrlKeyEntity contentUrlKeyEntity) |
org.alfresco.util.Pair<Long,String> |
createContentUrlOrphaned(String contentUrl,
Date orphanTime)
Creates an immediately-orphaned content URL, if possible
|
protected int |
deleteContentDataEntity(Long id)
Delete the entity with the given ID
|
void |
deleteContentDataForNode(Long nodeId,
Set<Long> qnameIds)
Deletes all alf_content_data rows that are referenced by the given node
|
protected int |
deleteContentUrlEntity(long id) |
int |
deleteContentUrls(List<Long> ids)
Delete a batch of content URL entities.
|
protected List<ContentDataEntity> |
getContentDataEntitiesForNodes(Set<Long> nodeIds) |
protected ContentDataEntity |
getContentDataEntity(Long id) |
protected ContentUrlEntity |
getContentUrlEntity(Long id) |
ContentUrlEntity |
getContentUrlEntity(String contentUrl) |
protected ContentUrlEntity |
getContentUrlEntityUnreferenced(String contentUrl) |
void |
getContentUrlsKeepOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler,
int maxResults)
Enumerate all available content URLs that were orphaned and cleanup for these urls failed
|
void |
getContentUrlsOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler,
Long maxOrphanTimeExclusive,
int maxResults)
Enumerate all available content URLs that were orphaned on or before the given time
|
List<ContentUrlKeyEntity> |
getSymmetricKeysByMasterKeyAlias(String masterKeyAlias,
long fromId,
int maxResults)
Get symmetric keys entities for symmetric keys that have been encrypted using the given
master key, starting from 'fromId' and returning at most 'maxResults' entities.
|
void |
setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate) |
protected int |
updateContentDataEntity(ContentDataEntity entity)
Update an existing alf_content_data entity
|
protected int |
updateContentUrlEntity(ContentUrlEntity existing,
ContentUrlEntity entity) |
int |
updateContentUrlOrphanTime(Long id,
Long orphanTime,
Long oldOrphanTime)
Update a content URL with the given orphan time
|
cacheContentDataForNodes, createContentData, createContentDataEntity, deleteContentData, getContentData, getContentUrl, getContentUrl, getOrCreateContentUrl, getOrCreateContentUrl, registerDereferencedContentUrl, setContentDataCache, setContentStoreCleaner, setContentUrlCache, setControlDAO, setEncodingDAO, setLocaleDAO, setMimetypeDAO, updateContentData, updateContentDataEntity, updateContentUrlKey, updateContentUrlKey
public final void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
public org.alfresco.util.Pair<Long,String> createContentUrlOrphaned(String contentUrl, Date orphanTime)
ContentDataDAO
contentUrl
- the URL to create if it doesn't existorphanTime
- the recorded orphan time or null to apply the current timeprotected ContentUrlEntity createContentUrlEntity(String contentUrl, long size, ContentUrlKeyEntity contentUrlKeyEntity)
createContentUrlEntity
in class AbstractContentDataDAOImpl
contentUrl
- the content URL to create or search forprotected ContentUrlEntity getContentUrlEntity(Long id)
getContentUrlEntity
in class AbstractContentDataDAOImpl
id
- the ID of the content url entitypublic ContentUrlEntity getContentUrlEntity(String contentUrl)
getContentUrlEntity
in class AbstractContentDataDAOImpl
public void getContentUrlsOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler, Long maxOrphanTimeExclusive, int maxResults)
ContentDataDAO
contentUrlHandler
- the callback object to process the rowsmaxOrphanTimeExclusive
- the maximum orphan time (exclusive)maxResults
- the maximum number of results (1 or greater)public void getContentUrlsKeepOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler, int maxResults)
ContentDataDAO
contentUrlHandler
- the callback object to process the rowsmaxResults
- the maximum number of results (1 or greater)public int updateContentUrlOrphanTime(Long id, Long orphanTime, Long oldOrphanTime)
AbstractContentDataDAOImpl
updateContentUrlOrphanTime
in class AbstractContentDataDAOImpl
id
- the unique ID of the entityorphanTime
- the time (ms since epoch) that the entity was orphanedoldOrphanTime
- the orphan time we expect to update for optimistic locking (may be null)public int deleteContentUrls(List<Long> ids)
protected ContentUrlEntity getContentUrlEntityUnreferenced(String contentUrl)
getContentUrlEntityUnreferenced
in class AbstractContentDataDAOImpl
contentUrl
- the URL of the content url entityprotected ContentDataEntity createContentDataEntity(Long contentUrlId, Long mimetypeId, Long encodingId, Long localeId)
AbstractContentDataDAOImpl
createContentDataEntity
in class AbstractContentDataDAOImpl
protected ContentDataEntity getContentDataEntity(Long id)
getContentDataEntity
in class AbstractContentDataDAOImpl
id
- the entity IDprotected List<ContentDataEntity> getContentDataEntitiesForNodes(Set<Long> nodeIds)
getContentDataEntitiesForNodes
in class AbstractContentDataDAOImpl
nodeIds
- the node IDprotected int updateContentDataEntity(ContentDataEntity entity)
AbstractContentDataDAOImpl
updateContentDataEntity
in class AbstractContentDataDAOImpl
entity
- the existing entity that will be updatedprotected int deleteContentDataEntity(Long id)
AbstractContentDataDAOImpl
deleteContentDataEntity
in class AbstractContentDataDAOImpl
public void deleteContentDataForNode(Long nodeId, Set<Long> qnameIds)
ContentDataDAO
nodeId
- the node IDqnameIds
- the content properties to targetprotected int updateContentUrlEntity(ContentUrlEntity existing, ContentUrlEntity entity)
updateContentUrlEntity
in class AbstractContentDataDAOImpl
protected int deleteContentUrlEntity(long id)
deleteContentUrlEntity
in class AbstractContentDataDAOImpl
public List<ContentUrlKeyEntity> getSymmetricKeysByMasterKeyAlias(String masterKeyAlias, long fromId, int maxResults)
ContentDataDAO
masterKeyAlias
- master key aliasfromId
- idmaxResults
- max resultspublic Map<String,Integer> countSymmetricKeysForMasterKeys()
ContentDataDAO
public int countSymmetricKeysForMasterKeyAlias(String masterKeyAlias)
ContentDataDAO
Copyright © 2005–2017 Alfresco Software. All rights reserved.