pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.site.content
Class Localized

java.lang.Object
  extended by org.torweg.pulse.site.content.Localized
All Implemented Interfaces:
java.io.Serializable, INameable, INamed
Direct Known Subclasses:
FilterRule, FilterRuleProperty

@Entity
public abstract class Localized
extends java.lang.Object
implements INameable, java.io.Serializable

represents a Localized in the staindoctor model.

Version:
$Revision: 1822 $
Author:
Thomas Weber, Daniel Dietz
See Also:
Serialized Form

Constructor Summary
protected Localized()
          used by HibernateTM.
  Localized(java.lang.String n)
          builds a new Localized with the given name.
 
Method Summary
 java.lang.Long getId()
          returns the id.
 java.lang.String getLocalization(java.util.Locale l)
          returns the localization for the given Locale.
 java.lang.String getLocalization(java.lang.String lang)
          returns the localization for the given language.
 java.util.Map<java.lang.String,java.lang.String> getLocalizations()
          returns the localizations.
 java.lang.String getName()
          returns the name of the Localization.
 void putLocalization(java.lang.String lang, java.lang.String loc)
          puts a localization to the localizations map.
 void removeLocalization(java.lang.String lang)
          remove the localisation for the given language.
 void setName(java.lang.String n)
          sets the name of the Localization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Localized

protected Localized()
used by HibernateTM.


Localized

public Localized(java.lang.String n)
builds a new Localized with the given name.

Parameters:
n - the internal name
Method Detail

getId

public final java.lang.Long getId()
returns the id.

Returns:
the id

getName

public final java.lang.String getName()
returns the name of the Localization.

Specified by:
getName in interface INamed
Returns:
the name of the Localization

setName

public final void setName(java.lang.String n)
sets the name of the Localization.

Specified by:
setName in interface INameable
Parameters:
n - the name to set

getLocalizations

public final java.util.Map<java.lang.String,java.lang.String> getLocalizations()
returns the localizations.

Returns:
the localizations

getLocalization

public final java.lang.String getLocalization(java.lang.String lang)
returns the localization for the given language.

Parameters:
lang - the language
Returns:
the localization for the given language

getLocalization

public final java.lang.String getLocalization(java.util.Locale l)
returns the localization for the given Locale.

Parameters:
l - the Locale
Returns:
the localization for the given Locale

putLocalization

public final void putLocalization(java.lang.String lang,
                                  java.lang.String loc)
puts a localization to the localizations map.

Parameters:
lang - the language
loc - the localization

removeLocalization

public final void removeLocalization(java.lang.String lang)
remove the localisation for the given language.

Parameters:
lang - the language