|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.domain.contentdata.AbstractContentDataDAOImpl
public abstract class AbstractContentDataDAOImpl
Abstract implementation for ContentData DAO.
This provides basic services such as caching, but defers to the underlying implementation for CRUD operations.
The DAO deals in ContentData
instances. The cache is primarily present to decode
IDs into ContentData
instances.
Nested Class Summary | |
---|---|
class |
AbstractContentDataDAOImpl.ContentUrlDeleteTransactionListener
Transactional listener that deletes unreferenced content_url entities. |
Nested classes/interfaces inherited from interface org.alfresco.repo.domain.contentdata.ContentDataDAO |
---|
ContentDataDAO.ContentUrlHandler |
Constructor Summary | |
---|---|
AbstractContentDataDAOImpl()
Default constructor |
Method Summary | |
---|---|
org.alfresco.util.Pair |
createContentData(org.alfresco.service.cmr.repository.ContentData contentData)
Create a new ContentData instance. |
protected abstract ContentDataEntity |
createContentDataEntity(java.lang.Long contentUrlId,
java.lang.Long mimetypeId,
java.lang.Long encodingId,
java.lang.Long localeId)
Create the row for the alf_content_data |
protected abstract ContentUrlEntity |
createContentUrlEntity(java.lang.String contentUrl,
long size)
|
void |
deleteContentData(java.lang.Long id)
Delete an instance of content. |
protected abstract int |
deleteContentDataEntity(java.lang.Long id)
Delete the entity with the given ID |
org.alfresco.util.Pair |
getContentData(java.lang.Long id)
|
protected abstract ContentDataEntity |
getContentDataEntity(java.lang.Long id)
|
protected abstract ContentUrlEntity |
getContentUrlEntity(java.lang.Long id)
|
protected abstract ContentUrlEntity |
getContentUrlEntity(java.lang.String contentUrl)
|
protected abstract ContentUrlEntity |
getContentUrlEntityUnreferenced(java.lang.String contentUrl)
|
protected void |
registerDereferencedContentUrl(java.lang.String contentUrl)
A content_url entity was dereferenced. |
void |
setContentDataCache(org.alfresco.repo.cache.SimpleCache contentDataCache)
|
void |
setContentStoreCleaner(EagerContentStoreCleaner contentStoreCleaner)
Set this property to enable eager cleanup of orphaned content. |
void |
setControlDAO(ControlDAO controlDAO)
|
void |
setEncodingDAO(EncodingDAO encodingDAO)
|
void |
setLocaleDAO(LocaleDAO localeDAO)
|
void |
setMimetypeDAO(MimetypeDAO mimetypeDAO)
|
void |
updateContentData(java.lang.Long id,
org.alfresco.service.cmr.repository.ContentData contentData)
Update a content data instance |
protected abstract int |
updateContentDataEntity(ContentDataEntity entity)
Update an existing alf_content_data entity |
protected abstract int |
updateContentUrlOrphanTime(java.lang.Long id,
java.lang.Long orphanTime,
java.lang.Long oldOrphanTime)
Update a content URL with the given orphan time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.alfresco.repo.domain.contentdata.ContentDataDAO |
---|
createContentUrlOrphaned, deleteContentDataForNode, deleteContentUrls, getContentUrlsOrphaned |
Constructor Detail |
---|
public AbstractContentDataDAOImpl()
Method Detail |
---|
public void setControlDAO(ControlDAO controlDAO)
controlDAO
- create Savepointspublic void setMimetypeDAO(MimetypeDAO mimetypeDAO)
public void setEncodingDAO(EncodingDAO encodingDAO)
public void setLocaleDAO(LocaleDAO localeDAO)
public void setContentStoreCleaner(EagerContentStoreCleaner contentStoreCleaner)
contentStoreCleaner
- an eager cleaner (may be null)public void setContentDataCache(org.alfresco.repo.cache.SimpleCache contentDataCache)
contentDataCache
- the cache of IDs to ContentData and vice versaprotected void registerDereferencedContentUrl(java.lang.String contentUrl)
public org.alfresco.util.Pair createContentData(org.alfresco.service.cmr.repository.ContentData contentData)
createContentData
in interface ContentDataDAO
contentData
- the ContentData details
public org.alfresco.util.Pair getContentData(java.lang.Long id)
getContentData
in interface ContentDataDAO
id
- the unique ID of the entity
public void updateContentData(java.lang.Long id, org.alfresco.service.cmr.repository.ContentData contentData)
updateContentData
in interface ContentDataDAO
id
- the unique ID of the entitycontentData
- the new datapublic void deleteContentData(java.lang.Long id)
deleteContentData
in interface ContentDataDAO
id
- the unique ID of the entityprotected abstract ContentUrlEntity createContentUrlEntity(java.lang.String contentUrl, long size)
contentUrl
- the content URL to create or search forprotected abstract ContentUrlEntity getContentUrlEntity(java.lang.Long id)
id
- the ID of the content url entity
protected abstract ContentUrlEntity getContentUrlEntity(java.lang.String contentUrl)
contentUrl
- the URL of the content url entity
protected abstract ContentUrlEntity getContentUrlEntityUnreferenced(java.lang.String contentUrl)
contentUrl
- the URL of the content url entity
protected abstract int updateContentUrlOrphanTime(java.lang.Long id, java.lang.Long orphanTime, java.lang.Long oldOrphanTime)
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)
protected abstract ContentDataEntity createContentDataEntity(java.lang.Long contentUrlId, java.lang.Long mimetypeId, java.lang.Long encodingId, java.lang.Long localeId)
protected abstract ContentDataEntity getContentDataEntity(java.lang.Long id)
id
- the entity ID
protected abstract int updateContentDataEntity(ContentDataEntity entity)
entity
- the existing entity that will be updated
protected abstract int deleteContentDataEntity(java.lang.Long id)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |