org.apache.commons.resources.impl
Class DatabaseBasicMessage

java.lang.Object
  extended by org.apache.commons.resources.impl.BasicMessage
      extended by org.apache.commons.resources.impl.DatabaseBasicMessage
All Implemented Interfaces:
Serializable, Message

public class DatabaseBasicMessage
extends BasicMessage

BasicMessage to allow standard ORM configuration (no complex keys).

Author:
James Mitchell
See Also:
Serialized Form

Constructor Summary
DatabaseBasicMessage()
          Default Constructor.
DatabaseBasicMessage(String locale, String key, Object[] values)
          Construct a message for a specified Locale with the specified replacement values.
 
Method Summary
 boolean equals(Object obj)
          Compare this message to another.
 String getLocale()
          Return the locale for the message.
 String getValue()
          Return the replacement value for the message.
 int hashCode()
          Return the hashcode for the message.
 void setLocale(String locale)
          Set the locale for the message.
 void setValue(String value)
          Set a replacement value for the message.
 
Methods inherited from class org.apache.commons.resources.impl.BasicMessage
getKey, getResourcesName, getValues, setKey, setResourcesName, setValues, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseBasicMessage

public DatabaseBasicMessage()
Default Constructor.


DatabaseBasicMessage

public DatabaseBasicMessage(String locale,
                            String key,
                            Object[] values)
Construct a message for a specified Locale with the specified replacement values.

Parameters:
locale - Locale for this message
key - Message key for this message
values - Array of replacement values
Method Detail

getLocale

public String getLocale()
Return the locale for the message.

Returns:
Returns the locale.

setLocale

public void setLocale(String locale)
Set the locale for the message.

Parameters:
locale - The locale to set.

setValue

public void setValue(String value)
Set a replacement value for the message.

Parameters:
value - The replacement value.

getValue

public String getValue()
Return the replacement value for the message.

Returns:
The replacement value.

equals

public boolean equals(Object obj)
Compare this message to another.

Overrides:
equals in class Object
Parameters:
obj - The message to compare.
Returns:
'true' if the messages are equal.

hashCode

public int hashCode()
Return the hashcode for the message.

Overrides:
hashCode in class Object
Returns:
The message's hash code.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.