org.openwms.core.domain.system.usermanagement
Class SecurityObject

java.lang.Object
  extended by org.openwms.core.domain.AbstractEntity
      extended by org.openwms.core.domain.system.usermanagement.SecurityObject
All Implemented Interfaces:
Serializable, DomainObject<Long>
Direct Known Subclasses:
Grant, Role

public class SecurityObject
extends AbstractEntity
implements DomainObject<Long>

A SecurityObject is the generalization of Roles and Grants and combines common used properties of both.

Since:
0.1
Version:
$Revision: 1595 $
Author:
Heiko Scherrer
See Also:
Role, Grant, 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 SecurityObjects.
static String NQ_FIND_BY_UNIQUE_QUERY
          Query to find one SecurityObject by its natural key.
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
protected SecurityObject()
          Accessed by persistence provider.
  SecurityObject(String name)
          Create a new SecurityObject with a name.
  SecurityObject(String name, String description)
          Create a new SecurityObject with name and description.
 
Method Summary
 boolean equals(Object obj)
           Compare the uid property field.
 String getDescription()
          Returns the description text.
 Long getId()
          Return the technical key value.
 String getName()
          Returns the name.
 long getVersion()
          Return the value of the optimistic locking field.
 int hashCode()
           Use the uid to calculate the hashCode.
 boolean isNew()
          Check whether the instance is a transient or persisted one.
 void setDescription(String description)
          Set the description for the SecurityObject.
 String toString()
          Return the name.
 
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 SecurityObjects. Name is "SecurityObject.findAll" .

See Also:
Constant Field Values

NQ_FIND_BY_UNIQUE_QUERY

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

  • Name is "SecurityObject.findByRolename" .

    See Also:
    Constant Field Values
    Constructor Detail

    SecurityObject

    protected SecurityObject()
    Accessed by persistence provider.


    SecurityObject

    public SecurityObject(String name)
    Create a new SecurityObject with a name.

    Parameters:
    name - The name of the SecurityObject

    SecurityObject

    public SecurityObject(String name,
                          String description)
    Create a new SecurityObject with name and description.

    Parameters:
    name - The name of the SecurityObject
    description - The description text of the SecurityObject
    Method Detail

    getId

    public Long getId()
    Return the technical key value.

    Specified by:
    getId in interface DomainObject<Long>
    Returns:
    The technical, unique key

    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

    getName

    public String getName()
    Returns the name.

    Returns:
    The name of the SecurityObject

    getDescription

    public String getDescription()
    Returns the description text.

    Returns:
    The description of the SecurityObject as text

    setDescription

    public void setDescription(String description)
    Set the description for the SecurityObject.

    Parameters:
    description - The description of the SecurityObject as text

    getVersion

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

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

    hashCode

    public int hashCode()
    Use the uid to calculate the hashCode.

    Overrides:
    hashCode in class AbstractEntity
    See Also:
    Object.hashCode()

    equals

    public boolean equals(Object obj)
    Compare the uid property field. Compare the name.

    Overrides:
    equals in class AbstractEntity
    See Also:
    Object.equals(java.lang.Object)

    toString

    public String toString()
    Return the name.

    Overrides:
    toString in class Object
    Returns:
    the name


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