|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.core.AbstractDateStamped
org.davesag.generica.core.AbstractContent
This AbstractContent bean is an abstract Persitable
Content item with created and
lastModified dates and language and country
codes.
| Field Summary | |
protected String |
theCountryCode
the iso code of the country the content is written for |
protected String |
theLanguageCode
the iso code of the language the content is written in |
| Fields inherited from class org.davesag.generica.core.AbstractDateStamped |
theCreated, theId, theLastModified |
| Constructor Summary | |
AbstractContent()
default constructor |
|
AbstractContent(Locale loc)
Constructor takes a locale. |
|
AbstractContent(String lang)
Constructor takes a language code and uses the default country settings. |
|
| Method Summary | |
boolean |
equals(Object o)
Tests if the supplied object is equal to this
AbstractContent, ie do they have the same Id? |
String |
getCountryCode()
get the ISO Country Code of this AbstractContent. |
String |
getLanguageCode()
get the ISO Language Code of this AbstractContent. |
Locale |
getLocale()
get the locale. |
abstract int |
hashcode()
Objects must override the hashcode if they override the equals method. |
void |
setCountryCode(String lang)
Set the AbstractContent's country code. |
void |
setLanguageCode(String lang)
Set the AbstractContent's language code. |
void |
setLocale(Locale loc)
Set the AbstractContent's language and country codes using a
Locale object. |
abstract String |
toString()
Override this to be useful to you. |
| Methods inherited from class org.davesag.generica.core.AbstractDateStamped |
getCreated, getId, getLastModified, setCreated, setId, setLastModified, setTemplateId |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.davesag.generica.core.DateStamped |
getCreated, getLastModified, setCreated, setLastModified |
| Field Detail |
protected String theLanguageCode
protected String theCountryCode
| Constructor Detail |
public AbstractContent()
public AbstractContent(String lang)
lang - The ISO Language Code.public AbstractContent(Locale loc)
loc - The Locale.| Method Detail |
public String getLanguageCode()
AbstractContent.
getLanguageCode in interface LocalisableAbstractContent.public void setLanguageCode(String lang)
AbstractContent's language code.
setLanguageCode in interface Localisablelang - The iso language code of this AbstractContent.public String getCountryCode()
AbstractContent.
getCountryCode in interface LocalisableAbstractContent.public void setCountryCode(String lang)
AbstractContent's country code.
setCountryCode in interface Localisablelang - The iso country code of this AbstractContent.public void setLocale(Locale loc)
AbstractContent's language and country codes using a
Locale object.
setLocale in interface Localisableloc - The locale to use to derive the language code.public Locale getLocale()
getLocale in interface Localisablepublic abstract String toString()
toString in class AbstractDateStampedpublic boolean equals(Object o)
AbstractContent, ie do they have the same Id?
equals in class AbstractDateStampedo - The object to test against this AbstractContent.
Must also be a AbstractContent to make sense.
public abstract int hashcode()
hashcode in class AbstractDateStamped
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||