org.openwms.core.domain
Class Module

java.lang.Object
  extended by org.openwms.core.domain.AbstractEntity
      extended by org.openwms.core.domain.Module
All Implemented Interfaces:
Serializable, DomainObject<Long>

public class Module
extends AbstractEntity
implements DomainObject<Long>

A Module represents an Adobe Flex Module and is used to store some basic information about that module, i.e. a name, an URL where the module from, or whether the Adobe Flex Module should be loaded on application startup.

Since:
0.1
Version:
$Revision: 1595 $
Author:
Heiko Scherrer
See Also:
AbstractEntity, DomainObject, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity
AbstractEntity.AbstractEntityListener
 
Field Summary
static String NQ_FIND_ALL
          Query to find all Modules.
static String NQ_FIND_BY_UNIQUE_QUERY
          Query to find one Module by its natural key.
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
protected Module()
          Create a new Module.
  Module(String moduleName, String url)
          Create a new Module.
 
Method Summary
 String getDescription()
          Get the description.
 Long getId()
          Get the id.
 String getModuleName()
          Get the moduleName.
 int getStartupOrder()
          Get the startupOrder.
 String getUrl()
          Get the url.
 long getVersion()
          Return the value of the optimistic locking field.
 boolean isLoaded()
          Is the Module currently loaded.
 boolean isLoadOnStartup()
          Should the Module be loaded on application startup.
 boolean isNew()
          Check whether the instance is a transient or persisted one.
 void setDescription(String description)
          Set the description.
 void setLoaded(boolean loaded)
          Set the loaded flag.
 void setLoadOnStartup(boolean loadOnStartup)
          Set the loadOnStartup flag.
 void setModuleName(String moduleName)
          Set the moduleName.
 void setStartupOrder(int startupOrder)
          Set the startupOrder.
 void setUrl(String url)
          Set the url.
 String toString()
          Returns the moduleName.
 
Methods inherited from class org.openwms.core.domain.AbstractEntity
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NQ_FIND_ALL

public static final String NQ_FIND_ALL
Query to find all Modules. Name is "Module.findAll" .

See Also:
Constant Field Values

NQ_FIND_BY_UNIQUE_QUERY

public static final String NQ_FIND_BY_UNIQUE_QUERY
Query to find one Module by its natural key.
  • Query parameter index 1 : The moduleName of the Module to search for

  • Name is "Module.findByModuleName" .

    See Also:
    Constant Field Values
    Constructor Detail

    Module

    protected Module()
    Create a new Module.


    Module

    public Module(String moduleName,
                  String url)
    Create a new Module.

    Parameters:
    moduleName - The unique Module name
    url - The unique URL
    Throws:
    IllegalArgumentException - in case the new moduleName is null or empty
    Method Detail

    isNew

    public boolean isNew()
    Check whether the instance is a transient or persisted one.

    Specified by:
    isNew in interface DomainObject<Long>
    Returns:
    true if transient (not persisted before), otherwise false

    getModuleName

    public String getModuleName()
    Get the moduleName.

    Returns:
    the moduleName.

    setModuleName

    public void setModuleName(String moduleName)
    Set the moduleName.

    Parameters:
    moduleName - The moduleName to set
    Throws:
    IllegalArgumentException - in case the new moduleName is null or empty

    getUrl

    public String getUrl()
    Get the url.

    Returns:
    the url

    setUrl

    public void setUrl(String url)
    Set the url.

    Parameters:
    url - The url to set
    Throws:
    IllegalArgumentException - in case the new url is null or empty

    getId

    public Long getId()
    Get the id.

    Specified by:
    getId in interface DomainObject<Long>
    Returns:
    the id

    isLoaded

    public boolean isLoaded()
    Is the Module currently loaded.

    Returns:
    true if loaded, otherwise false

    setLoaded

    public void setLoaded(boolean loaded)
    Set the loaded flag.

    Parameters:
    loaded - The loaded to set

    getDescription

    public String getDescription()
    Get the description.

    Returns:
    the description

    setDescription

    public void setDescription(String description)
    Set the description.

    Parameters:
    description - The description to set

    isLoadOnStartup

    public boolean isLoadOnStartup()
    Should the Module be loaded on application startup.

    Returns:
    true if the Module should be loaded on application startup, otherwise false

    setLoadOnStartup

    public void setLoadOnStartup(boolean loadOnStartup)
    Set the loadOnStartup flag.

    Parameters:
    loadOnStartup - The loadOnStartup to set

    getStartupOrder

    public int getStartupOrder()
    Get the startupOrder.

    Returns:
    the startupOrder

    setStartupOrder

    public void setStartupOrder(int startupOrder)
    Set the startupOrder.

    Parameters:
    startupOrder - The startupOrder to set

    getVersion

    public long getVersion()
    Return the value of the optimistic locking field.

    Specified by:
    getVersion in interface DomainObject<Long>
    Returns:
    the version number

    toString

    public String toString()
    Returns the moduleName.

    Overrides:
    toString in class Object
    Returns:
    The moduleName
    See Also:
    Object.toString()


    Copyright © 2005-2011 openwms.org. All Rights Reserved.