public class Language extends BusinessEntity
| Modifier and Type | Class and Description |
|---|---|
static class |
Language.Columns
A utility class that contains various strings to be used as keys to communicate with the
remote server.
|
| Constructor and Description |
|---|
Language()
Default empty constructor.
|
Language(org.json.JSONObject jsonObject)
Language's constructor.
|
Language(java.lang.String json)
Language's constructor.
|
Language(java.lang.String code,
java.lang.String name)
Create a new language by specifying its values.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Check if two languages are the same language.
|
java.lang.String |
getCode()
Get the language's code.
|
java.lang.String |
getName()
Get the language's name.
|
static java.util.Set<Language> |
getSetFromJSONArray(org.json.JSONArray jsonArray)
Convert a JSONArray to a Set.
|
int |
hashCode()
Generate an hash code for the object.
|
protected void |
loadFromJSONObject(org.json.JSONObject language)
Create a new language by using a JSONObject.
|
void |
setCode(java.lang.String code)
Set the language's code.
|
void |
setName(java.lang.String name)
Set the language's name.
|
org.json.JSONObject |
toJSONObject()
Convert a BusinessEntity to JSONObject.
|
getJSONObject, toStringpublic Language()
public Language(java.lang.String code,
java.lang.String name)
code - The language's code.name - The language's name.public Language(org.json.JSONObject jsonObject)
jsonObject - The JSONObject.public Language(java.lang.String json)
json - The json string.public static java.util.Set<Language> getSetFromJSONArray(org.json.JSONArray jsonArray)
jsonArray - The JSONArray.protected void loadFromJSONObject(org.json.JSONObject language)
loadFromJSONObject in class BusinessEntitylanguage - The language's code.public org.json.JSONObject toJSONObject()
BusinessEntitytoJSONObject in class BusinessEntityBusinessEntity.toJSONObject()public java.lang.String getCode()
public void setCode(java.lang.String code)
code - The new language's code.public java.lang.String getName()
public void setName(java.lang.String name)
name - The new language's name.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The other language Object.public int hashCode()
hashCode in class java.lang.Object