org.alfresco.repo.domain.encoding
Class AbstractEncodingDAOImpl

java.lang.Object
  extended by org.alfresco.repo.domain.encoding.AbstractEncodingDAOImpl
All Implemented Interfaces:
EncodingDAO
Direct Known Subclasses:
EncodingDAOImpl

public abstract class AbstractEncodingDAOImpl
extends java.lang.Object
implements EncodingDAO

Abstract implementation for Encoding DAO.

This provides basic services such as caching, but defers to the underlying implementation for CRUD operations.

Since:
3.2

Constructor Summary
AbstractEncodingDAOImpl()
           
 
Method Summary
protected abstract  EncodingEntity createEncodingEntity(java.lang.String encoding)
           
 org.alfresco.util.Pair getEncoding(java.lang.Long id)
           
 org.alfresco.util.Pair getEncoding(java.lang.String encoding)
          Get the encoding pair.
protected abstract  EncodingEntity getEncodingEntity(java.lang.Long id)
           
protected abstract  EncodingEntity getEncodingEntity(java.lang.String encoding)
           
 org.alfresco.util.Pair getOrCreateEncoding(java.lang.String encoding)
           
 void setEncodingEntityCache(org.alfresco.repo.cache.SimpleCache encodingEntityCache)
          Set the cache that maintains the ID-Encoding mappings and vice-versa (bi-directional)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEncodingDAOImpl

public AbstractEncodingDAOImpl()
Method Detail

setEncodingEntityCache

public void setEncodingEntityCache(org.alfresco.repo.cache.SimpleCache encodingEntityCache)
Set the cache that maintains the ID-Encoding mappings and vice-versa (bi-directional)

Parameters:
encodingEntityCache - the cache

getEncoding

public org.alfresco.util.Pair getEncoding(java.lang.Long id)
Specified by:
getEncoding in interface EncodingDAO

getEncoding

public org.alfresco.util.Pair getEncoding(java.lang.String encoding)
Description copied from interface: EncodingDAO
Get the encoding pair.

Specified by:
getEncoding in interface EncodingDAO
Parameters:
encoding - the encoding string
Returns:
the ID-encoding pair or null if it doesn't exsit

getOrCreateEncoding

public org.alfresco.util.Pair getOrCreateEncoding(java.lang.String encoding)
Specified by:
getOrCreateEncoding in interface EncodingDAO

getEncodingEntity

protected abstract EncodingEntity getEncodingEntity(java.lang.Long id)
Parameters:
id - the ID of the encoding entity
Returns:
Return the entity or null if it doesn't exist

getEncodingEntity

protected abstract EncodingEntity getEncodingEntity(java.lang.String encoding)

createEncodingEntity

protected abstract EncodingEntity createEncodingEntity(java.lang.String encoding)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.