com.arsdigita.globalization
Class MessageCatalog

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.globalization.MessageCatalog
All Implemented Interfaces:
Serializable

public class MessageCatalog
extends DomainObject
implements Serializable

MessageCatalog DomainObject comprised of:

Version:
$Revision: #13 $ $Date: 2004/04/07 $
See Also:
Serialized Form

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String versionId
           
 
Constructor Summary
MessageCatalog(String name)
           Constructor for a new root MessageCatalog.
MessageCatalog(String name, Locale locale)
           Constructor for a new MessageCatalog associated with a particular Locale.
 
Method Summary
protected  void beforeSave()
           
 String getBaseDataObjectType()
           Returns the appropriate object type for a MessageCatalog so that the proper type validation can take place when retrieving MessageCatalogs by OID.
 BigDecimal getID()
           Return ID.
 Date getLastModified()
           Get the date that this MessageCatalog was last modified.
 Locale getLocale()
           Get the locale associated with this MessageCatalog.
 Map getMap()
           De-serialize the MessageCatalog from the database into a Map object.
 String getName()
           Get the name of this MessageCatalog.
protected  void initialize()
          Called from all of the DomainObject constructors to initalize or validate the new domain object or its encapsulated data object.
 boolean isReadOnly()
           Check whether or not this MessageCatalog is read-only or not.
static MessageCatalog retrieve(String name)
           Retrieve the MessageCatalog from persistent storage.
static MessageCatalog retrieve(String name, Locale locale)
           Retrieve the MessageCatalog from persistent storage.
static MessageCatalog retrieveForEdit(String name)
           Retrieve the MessageCatalog from persistent storage for edit.
static MessageCatalog retrieveForEdit(String name, Locale locale)
           Retrieve the MessageCatalog from persistent storage for edit.
 void setLocale(Locale locale)
           Set the locale associated with this MessageCatalog.
 void setLocale(Locale locale)
           Set the locale associated with this MessageCatalog.
 void setMap(Map catalog)
           Serialize the MessageCatalog to the database from a Map object.
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values
Constructor Detail

MessageCatalog

public MessageCatalog(String name)

Constructor for a new root MessageCatalog.

Parameters:
name - The name for this new MessageCatalog

MessageCatalog

public MessageCatalog(String name,
                      Locale locale)
               throws GlobalizationException

Constructor for a new MessageCatalog associated with a particular Locale.

Parameters:
name - The name for this new MessageCatalog
locale - The locale associated with this MessageCatalog
Method Detail

initialize

protected void initialize()
Description copied from class: DomainObject
Called from all of the DomainObject constructors to initalize or validate the new domain object or its encapsulated data object. This was introduced in order to support efficient validation of the encapsualted data object's type. If the validation is typically performed in class constructors, then redundant validation is performed in superclass constructors. This validation now occurs here.

Overrides:
initialize in class DomainObject

getBaseDataObjectType

public String getBaseDataObjectType()

Returns the appropriate object type for a MessageCatalog so that the proper type validation can take place when retrieving MessageCatalogs by OID.

Overrides:
getBaseDataObjectType in class DomainObject
Returns:
String The fully qualified name of the base data object type for the MessageCatalog DataObject.

getID

public BigDecimal getID()

Return ID.

Returns:
BigDecimal The ID of this DataObject

getLastModified

public Date getLastModified()

Get the date that this MessageCatalog was last modified.

Returns:
Date representing the date this MessageCatalog was last modified.

getLocale

public Locale getLocale()

Get the locale associated with this MessageCatalog.

Returns:
java.util.Locale representing the language, country, and variant associated with this MessageCatalog

setLocale

public void setLocale(Locale locale)
               throws GlobalizationException

Set the locale associated with this MessageCatalog.

Parameters:
locale - java.util.Locale representing the language, country, and variant associated with this MessageCatalog.
Throws:
GlobalizationException

setLocale

public void setLocale(Locale locale)

Set the locale associated with this MessageCatalog.

Parameters:
locale - representing the language, country, and variant associated with this MessageCatalog.

getMap

public Map getMap()

De-serialize the MessageCatalog from the database into a Map object.

Returns:
Map representing the MessageCatalog

setMap

public void setMap(Map catalog)
            throws GlobalizationException

Serialize the MessageCatalog to the database from a Map object.

Parameters:
catalog - representing the MessageCatalog
Throws:
GlobalizationException

getName

public String getName()

Get the name of this MessageCatalog.

Returns:
String representing the MessageCatalog's name

isReadOnly

public boolean isReadOnly()

Check whether or not this MessageCatalog is read-only or not.

Returns:
boolean true if it is read-only

retrieve

public static MessageCatalog retrieve(String name)
                               throws GlobalizationException

Retrieve the MessageCatalog from persistent storage.

Parameters:
name - The name of the MessageCatalog to retrieve.
Returns:
MessageCatalog
Throws:
GlobalizationException

retrieve

public static MessageCatalog retrieve(String name,
                                      Locale locale)
                               throws GlobalizationException

Retrieve the MessageCatalog from persistent storage.

Parameters:
name - The name of the MessageCatalog to retrieve.
locale - The locale of the MessageCatalog to retrieve.
Returns:
MessageCatalog
Throws:
GlobalizationException

retrieveForEdit

public static MessageCatalog retrieveForEdit(String name)
                                      throws GlobalizationException

Retrieve the MessageCatalog from persistent storage for edit.

Parameters:
name - The name of the MessageCatalog to retrieve.
Returns:
MessageCatalog
Throws:
GlobalizationException

retrieveForEdit

public static MessageCatalog retrieveForEdit(String name,
                                             Locale locale)
                                      throws GlobalizationException

Retrieve the MessageCatalog from persistent storage for edit.

Parameters:
name - The name of the MessageCatalog to retrieve.
locale - The locale of the MessageCatalog to retrieve.
Returns:
MessageCatalog
Throws:
GlobalizationException

beforeSave

protected void beforeSave()
Overrides:
beforeSave in class DomainObject


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC