public abstract class AbstractMimetypeDAOImpl extends 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(String mimetype) |
org.alfresco.util.Pair<Long,String> |
getMimetype(Long id) |
org.alfresco.util.Pair<Long,String> |
getMimetype(String mimetype) |
protected abstract MimetypeEntity |
getMimetypeEntity(Long id) |
protected abstract MimetypeEntity |
getMimetypeEntity(String mimetype) |
org.alfresco.util.Pair<Long,String> |
getOrCreateMimetype(String mimetype)
Retrieve an existing mimetype or create a new one if it doesn't exist.
|
void |
setMimetypeEntityCache(org.alfresco.repo.cache.SimpleCache<Serializable,Serializable> mimetypeEntityCache) |
int |
updateMimetype(String oldMimetype,
String newMimetype)
Update a mimetype if it exists.
|
protected abstract int |
updateMimetypeEntity(Long id,
String newMimetype) |
public void setMimetypeEntityCache(org.alfresco.repo.cache.SimpleCache<Serializable,Serializable> mimetypeEntityCache)
mimetypeEntityCache
- the cache of IDs to mimetypespublic org.alfresco.util.Pair<Long,String> getMimetype(Long id)
getMimetype
in interface MimetypeDAO
id
- the unique ID of the entitypublic org.alfresco.util.Pair<Long,String> getMimetype(String mimetype)
getMimetype
in interface MimetypeDAO
mimetype
- the Mimetype to query forpublic org.alfresco.util.Pair<Long,String> getOrCreateMimetype(String mimetype)
MimetypeDAO
getOrCreateMimetype
in interface MimetypeDAO
mimetype
- the Mimetypepublic int updateMimetype(String oldMimetype, String newMimetype)
MimetypeDAO
updateMimetype
in interface MimetypeDAO
oldMimetype
- the old MimetypenewMimetype
- the new Mimetypeprotected abstract MimetypeEntity getMimetypeEntity(Long id)
id
- the ID of the mimetype entityprotected abstract MimetypeEntity getMimetypeEntity(String mimetype)
protected abstract MimetypeEntity createMimetypeEntity(String mimetype)
Copyright © 2005–2017 Alfresco Software. All rights reserved.