Package 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
- Author:
- Derek Hulley, janv
-
Method Summary
Modifier and TypeMethodDescriptiongetLocalePair(Long id) getLocalePair(Locale locale) Find or create the details representing the default locale.getOrCreateLocalePair(Locale locale) Gets the locale ID for an existing instance or creates a new entity if one doesn't exist.
-
Method Details
-
getLocalePair
- 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
- Parameters:
locale- the locale to fetch or null to get the default locale- Returns:
- the locale or null if no such locale exists
-
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
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
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.
-