|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openwms.core.domain.AbstractEntity
org.openwms.core.domain.system.I18n
public class I18n
An I18n entity stores multiple translations assigned to an unique key.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity |
---|
AbstractEntity.AbstractEntityListener |
Field Summary | |
---|---|
static String |
NQ_FIND_ALL
Query to find all I18n entities. |
static String |
NQ_FIND_BY_UNIQUE_QUERY
Query to find one I18n by
moduleName and key .Query parameter name
moduleName : The name of the Module where
the I18n entity belongs toQuery parameter name
key : The key of the I18n to search for |
Fields inherited from class org.openwms.core.domain.AbstractEntity |
---|
FIND_ALL, FIND_BY_ID |
Constructor Summary | |
---|---|
I18n()
Create a new I18n. |
|
I18n(String key,
I18nSet lang)
Create a new I18n. |
|
I18n(String moduleName,
String key,
I18nSet lang)
Create a new I18n. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compare the uid property field. |
String |
getCKey()
Get the cKey. |
Long |
getId()
Return the technical key value. |
String |
getKey()
Get the key. |
I18nSet |
getLang()
Get the language set. |
String |
getModuleName()
Get the moduleName. |
long |
getVersion()
Return the value of the optimistic locking field. |
int |
hashCode()
Use the uid to calculate the hashCode. |
boolean |
isNew()
Check whether the instance is a transient or persisted one. |
protected void |
onLoad()
After loading the entity, combine the moduleName field and
the key field. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NQ_FIND_ALL
I18n
entities.
public static final String NQ_FIND_BY_UNIQUE_QUERY
I18n
by
moduleName
and key
.Module
where
the I18n
entity belongs toI18n
to search for
Constructor Detail |
---|
public I18n()
public I18n(String moduleName, String key, I18nSet lang)
moduleName
- The name of the Module
where this entity belongs
tokey
- The key to access this translationlang
- A set of languages
IllegalArgumentException
- when the moduleName
or the key
is
null
or emptypublic I18n(String key, I18nSet lang)
key
- The key to access this translationlang
- A set of languages
IllegalArgumentException
- when the key
is null
or emptyMethod Detail |
---|
protected void onLoad()
moduleName
field and
the key
field. Store the concatenated String in a transient
field cKey
.
public String getCKey()
public boolean isNew()
isNew
in interface DomainObject<Long>
true
if transient (not persisted before), otherwise
false
DomainObject.isNew()
public long getVersion()
getVersion
in interface DomainObject<Long>
DomainObject.getVersion()
public Long getId()
getId
in interface DomainObject<Long>
DomainObject.getId()
public String getKey()
public String getModuleName()
public I18nSet getLang()
public int hashCode()
key
and moduleName
for calculation.
hashCode
in class AbstractEntity
Object.hashCode()
public boolean equals(Object obj)
key
and moduleName
for comparison.
equals
in class AbstractEntity
Object.equals(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |