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 StringNAMESPACE_PREFIXThis is the namespace string that will be always the beginning part of the keys in this table.static StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "TranslationKey" objects.static StringSEC_RANK_ALLThis rank is made of the following privileges:static StringSEC_RANK_NONEThis rank has no privileges assigned to it.static StringTRANSLATE_PREFIXPrefix indicating translation is required using original locale system.static StringTRANSLATE_PREFIX_2Prefix indicating translation is required using new locale system.static QueryObjectType<TranslationKey>TYPEType 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 TranslationcreateTranslation(Language newLanguage)Create a newTranslationlinked to this object.StringgetKey()Get the value for Key.TranslationgetTranslationByLanguage(Language language)Get the Translation by TranslationKeyLanguage.RWIterable<Translation>getTranslations()Get anRWIterableover an ordered collection ofTranslations.voidsetKey(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 benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getTranslations
RWIterable<Translation> getTranslations()
Get anRWIterableover 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:
getTranslationsin interfaceTranslationKeyComp- Returns:
- An
RWIterableover an ordered collection ofTranslationobjects .
-
createTranslation
Translation createTranslation(Language newLanguage)
Create a newTranslationlinked to this object.- Parameters:
newLanguage- The other parent of theTranslationLanguageassociation.- Returns:
- a new
Translation.
-
getTranslationByLanguage
Translation getTranslationByLanguage(Language language)
Get the Translation by TranslationKeyLanguage.- Parameters:
language-- Returns:
- the Translation, or
nullif it could not be found
-
-