public abstract class AbstractMimetypeDAOImpl extends java.lang.Object implements MimetypeDAO
This provides basic services such as caching, but defers to the underlying implementation for CRUD operations.
| Constructor and Description |
|---|
AbstractMimetypeDAOImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract MimetypeEntity |
createMimetypeEntity(java.lang.String mimetype) |
org.alfresco.util.Pair |
getMimetype(java.lang.Long id) |
org.alfresco.util.Pair |
getMimetype(java.lang.String mimetype) |
protected abstract MimetypeEntity |
getMimetypeEntity(java.lang.Long id) |
protected abstract MimetypeEntity |
getMimetypeEntity(java.lang.String mimetype) |
org.alfresco.util.Pair |
getOrCreateMimetype(java.lang.String mimetype)
Retrieve an existing mimetype or create a new one if it doesn't exist.
|
void |
setMimetypeEntityCache(org.alfresco.repo.cache.SimpleCache mimetypeEntityCache) |
int |
updateMimetype(java.lang.String oldMimetype,
java.lang.String newMimetype)
Update a mimetype if it exists.
|
protected abstract int |
updateMimetypeEntity(java.lang.Long id,
java.lang.String newMimetype) |
public void setMimetypeEntityCache(org.alfresco.repo.cache.SimpleCache mimetypeEntityCache)
mimetypeEntityCache - the cache of IDs to mimetypespublic org.alfresco.util.Pair getMimetype(java.lang.Long id)
getMimetype in interface MimetypeDAOid - the unique ID of the entitypublic org.alfresco.util.Pair getMimetype(java.lang.String mimetype)
getMimetype in interface MimetypeDAOmimetype - the Mimetype to query forpublic org.alfresco.util.Pair getOrCreateMimetype(java.lang.String mimetype)
MimetypeDAOgetOrCreateMimetype in interface MimetypeDAOmimetype - the Mimetypepublic int updateMimetype(java.lang.String oldMimetype,
java.lang.String newMimetype)
MimetypeDAOupdateMimetype in interface MimetypeDAOoldMimetype - the old MimetypenewMimetype - the new Mimetypeprotected abstract MimetypeEntity getMimetypeEntity(java.lang.Long id)
id - the ID of the mimetype entityprotected abstract MimetypeEntity getMimetypeEntity(java.lang.String mimetype)
protected abstract MimetypeEntity createMimetypeEntity(java.lang.String mimetype)
protected abstract int updateMimetypeEntity(java.lang.Long id,
java.lang.String newMimetype)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.