Package com.redwood.scheduler.api.model
Interface TranslationKey
-
- All Superinterfaces:
MetaData
,SchedulerEntity
,SchedulerEntityComp
,TranslationKeyComp
public interface TranslationKey extends TranslationKeyComp, MetaData
Key for translation lookups.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAMESPACE_PREFIX
This is the namespace string that will be always the beginning part of the keys in this table.static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "TranslationKey" objects.static String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
TRANSLATE_PREFIX
Prefix indicating translation is required using original locale system.static String
TRANSLATE_PREFIX_2
Prefix indicating translation is required using new locale system.static QueryObjectType<TranslationKey>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Translation
createTranslation(Language newLanguage)
Create a newTranslation
linked to this object.String
getKey()
Get the value for Key.Translation
getTranslationByLanguage(Language language)
Get the Translation by TranslationKeyLanguage.RWIterable<Translation>
getTranslations()
Get anRWIterable
over an ordered collection ofTranslations
.void
setKey(String newKey)
Set the value for Key.-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "TranslationKey" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<TranslationKey> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
NAMESPACE_PREFIX
static final String NAMESPACE_PREFIX
This is the namespace string that will be always the beginning part of the keys in this table.- See Also:
- Constant Field Values
-
TRANSLATE_PREFIX
static final String TRANSLATE_PREFIX
Prefix indicating translation is required using original locale system.- See Also:
- Constant Field Values
-
TRANSLATE_PREFIX_2
static final String TRANSLATE_PREFIX_2
Prefix indicating translation is required using new locale system.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
getKey
String getKey()
Get the value for Key. (Key for looking up a translation.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setKey
void setKey(String newKey)
Set the value for Key. (Key for looking up a translation.) This value is mandatory.- Parameters:
newKey
- the new value for Key. If this isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getTranslations
RWIterable<Translation> getTranslations()
Get anRWIterable
over an ordered collection ofTranslations
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. A given translation key has multiple translations (for different languages) that belong to it.- Specified by:
getTranslations
in interfaceTranslationKeyComp
- Returns:
- An
RWIterable
over an ordered collection ofTranslation
objects .
-
createTranslation
Translation createTranslation(Language newLanguage)
Create a newTranslation
linked to this object.- Parameters:
newLanguage
- The other parent of theTranslationLanguage
association.- Returns:
- a new
Translation
.
-
getTranslationByLanguage
Translation getTranslationByLanguage(Language language)
Get the Translation by TranslationKeyLanguage.- Parameters:
language
-- Returns:
- the Translation, or
null
if it could not be found
-
-