Package com.cmobilecom.af.entity.i18n
Class EntityI18NSupportBase
- java.lang.Object
-
- com.cmobilecom.af.entity.PersistenceEntityBase
-
- com.cmobilecom.af.entity.i18n.EntityI18NSupportBase
-
- All Implemented Interfaces:
EntityI18NSupport
,PersistenceEntity
,java.io.Serializable
,java.lang.Cloneable
@MappedSuperclass public abstract class EntityI18NSupportBase extends PersistenceEntityBase implements EntityI18NSupport
EntityI18NSupportBase: EntityI18NSupport implementation base class- Since:
- 4.2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,EntityI18N>>
entityI18NMap
entityI18NMap: cache, built from entityI18Ns.protected java.util.Set<EntityI18N>
entityI18Ns
A set of EntityI18N(s) for property value translations.-
Fields inherited from class com.cmobilecom.af.entity.PersistenceEntityBase
id, instance, sequenceNo
-
Fields inherited from interface com.cmobilecom.af.entity.i18n.EntityI18NSupport
PROPERTY_ENTITY_I18NS
-
Fields inherited from interface com.cmobilecom.af.entity.PersistenceEntity
ID_SEPARATOR, PROPERTY_ID, PROPERTY_INSTANCE, PROPERTY_SELECTED, PROPERTY_SEQUENCE_NO, PROPERTY_VERSION
-
-
Constructor Summary
Constructors Constructor Description EntityI18NSupportBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.Map<java.lang.String,EntityI18N>>
getEntityI18NMap()
Get entity I18N map from property to translations(map from locale to EntityI18N).java.util.Set<EntityI18N>
getEntityI18Ns()
Get the set of EntityI18N(s) that this entity has.java.lang.String
getPropertyValue(java.lang.String property, java.util.Locale locale)
Get property value by localevoid
setEntityI18NMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,EntityI18N>> entityI18NMap)
Set entity I18N map from property to translations(map from locale to EntityI18N).void
setEntityI18Ns(java.util.Set<EntityI18N> entityI18Ns)
Set the set of EntityI18N(s) that this entity has.-
Methods inherited from class com.cmobilecom.af.entity.PersistenceEntityBase
clone, equals, getId, getInstance, getSequenceNo, getVersion, hashCode, isChanged, isPartiallyInitialized, isPersisted, isSelected, isStatistics, setChanged, setId, setInstance, setPartiallyInitialized, setPersisted, setSelected, setSequenceNo, setStatistics, setVersion
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.cmobilecom.af.entity.i18n.EntityI18NSupport
getEntityI18NType, getI18NProperties, toString
-
Methods inherited from interface com.cmobilecom.af.entity.PersistenceEntity
clone, getId, getInstance, getSequenceNo, getVersion, isChanged, isPartiallyInitialized, isPersisted, isSelected, isStatistics, setChanged, setId, setInstance, setPartiallyInitialized, setPersisted, setSelected, setSequenceNo, setStatistics, setVersion
-
-
-
-
Field Detail
-
entityI18Ns
protected java.util.Set<EntityI18N> entityI18Ns
A set of EntityI18N(s) for property value translations.
-
entityI18NMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,EntityI18N>> entityI18NMap
entityI18NMap: cache, built from entityI18Ns. map from property name to locale to translation(EntityI18N)
-
-
Method Detail
-
getEntityI18Ns
public java.util.Set<EntityI18N> getEntityI18Ns()
Description copied from interface:EntityI18NSupport
Get the set of EntityI18N(s) that this entity has.- Specified by:
getEntityI18Ns
in interfaceEntityI18NSupport
- Returns:
- a set of EntityI18N(s)
-
setEntityI18Ns
public void setEntityI18Ns(java.util.Set<EntityI18N> entityI18Ns)
Description copied from interface:EntityI18NSupport
Set the set of EntityI18N(s) that this entity has.- Specified by:
setEntityI18Ns
in interfaceEntityI18NSupport
- Parameters:
entityI18Ns
- a set of EntityI18N(s)
-
getEntityI18NMap
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,EntityI18N>> getEntityI18NMap()
Description copied from interface:EntityI18NSupport
Get entity I18N map from property to translations(map from locale to EntityI18N). The map is built from the set of EntityI18Ns, see getEntityI18Ns().- Specified by:
getEntityI18NMap
in interfaceEntityI18NSupport
- Returns:
- i18N map
-
setEntityI18NMap
public void setEntityI18NMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,EntityI18N>> entityI18NMap)
Description copied from interface:EntityI18NSupport
Set entity I18N map from property to translations(map from locale to EntityI18N). The map is built from the set of EntityI18Ns, see getEntityI18Ns().- Specified by:
setEntityI18NMap
in interfaceEntityI18NSupport
- Parameters:
entityI18NMap
- property translation map
-
getPropertyValue
public java.lang.String getPropertyValue(java.lang.String property, java.util.Locale locale) throws SystemException
Get property value by locale- Specified by:
getPropertyValue
in interfaceEntityI18NSupport
- Parameters:
property
- the property for which to get valuelocale
- locale- Returns:
- property value
- Throws:
SystemException
- throw if an error occurs
-
-