org.alfresco.repo.domain.locale
Interface LocaleDAO

All Known Implementing Classes:
AbstractLocaleDAOImpl, LocaleDAOImpl

public interface LocaleDAO

Data abstraction layer for Locale entities.

Since:
3.4

Method Summary
 org.alfresco.util.Pair getDefaultLocalePair()
           
 org.alfresco.util.Pair getLocalePair(java.util.Locale locale)
           
 org.alfresco.util.Pair getLocalePair(java.lang.Long id)
           
 org.alfresco.util.Pair getOrCreateDefaultLocalePair()
          Find or create the details representing the default locale.
 org.alfresco.util.Pair getOrCreateLocalePair(java.util.Locale locale)
          Gets the locale ID for an existing instance or creates a new entity if one doesn't exist.
 

Method Detail

getLocalePair

org.alfresco.util.Pair getLocalePair(java.lang.Long id)
Parameters:
id - the unique ID of the entity
Returns:
the locale pair (never null)
Throws:
org.springframework.dao.DataIntegrityViolationException - if the ID provided is invalid

getLocalePair

org.alfresco.util.Pair getLocalePair(java.util.Locale locale)
Parameters:
id - the locale to fetch or null to get the default locale
Returns:
the locale or null if no such locale exists

getDefaultLocalePair

org.alfresco.util.Pair getDefaultLocalePair()
Returns:
the locale pair for the default locale. Although the Locale object will be populated, the ID will point to an instance that generically refers to the system's default locale i.e. the value returned can vary depending on the executing thread's default locale.

getOrCreateLocalePair

org.alfresco.util.Pair getOrCreateLocalePair(java.util.Locale locale)
Gets the locale ID for an existing instance or creates a new entity if one doesn't exist.

Parameters:
locale - the locale to fetch or null to get or create the default locale.
Returns:
the locale - never null

getOrCreateDefaultLocalePair

org.alfresco.util.Pair getOrCreateDefaultLocalePair()
Find or create the details representing the default locale.

Returns:
the locale pair for the default locale. Although the Locale object will be populated, the ID will point to an instance that generically refers to the system's default locale i.e. the value returned can vary depending on the executing thread's default locale.


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