Package org.alfresco.repo.domain.locale
Interface LocaleDAO
-
- All Known Implementing Classes:
AbstractLocaleDAOImpl,LocaleDAOImpl
public interface LocaleDAOData abstraction layer for Locale entities.- Since:
- 3.4
- Author:
- Derek Hulley, janv
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.alfresco.util.Pair<java.lang.Long,java.util.Locale>getDefaultLocalePair()org.alfresco.util.Pair<java.lang.Long,java.util.Locale>getLocalePair(java.lang.Long id)org.alfresco.util.Pair<java.lang.Long,java.util.Locale>getLocalePair(java.util.Locale locale)org.alfresco.util.Pair<java.lang.Long,java.util.Locale>getOrCreateDefaultLocalePair()Find or create the details representing the default locale.org.alfresco.util.Pair<java.lang.Long,java.util.Locale>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<java.lang.Long,java.util.Locale> 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<java.lang.Long,java.util.Locale> getLocalePair(java.util.Locale locale)
- Parameters:
locale- 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<java.lang.Long,java.util.Locale> 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<java.lang.Long,java.util.Locale> 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<java.lang.Long,java.util.Locale> 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.
-
-