net.sf.sail.webapp.domain.group.impl
Class PersistentGroup

java.lang.Object
  extended by net.sf.sail.webapp.domain.group.impl.PersistentGroup
All Implemented Interfaces:
Serializable, Comparable<Group>, Group, Persistable

public class PersistentGroup
extends Object
implements Group

This implementation of group

Version:
$Id$
Author:
Cynick Young
See Also:
Serialized Form

Field Summary
static String COLUMN_NAME_NAME
           
static String COLUMN_NAME_PARENT_FK
           
static String DATA_STORE_NAME
           
static String GROUPS_JOIN_COLUMN_NAME
           
static String USERS_JOIN_COLUMN_NAME
           
static String USERS_JOIN_TABLE_NAME
           
 
Constructor Summary
PersistentGroup()
           
 
Method Summary
 void addMember(User member)
          Add a single member to the group.
 int compareTo(Group o)
           
 boolean equals(Object obj)
           
 Long getId()
          Gets the id for this object.
 Set<User> getMembers()
          Get the list of members of this group.
 String getName()
          Gets the name of this group.
 Group getParent()
          Gets the parent group for this group.
 int hashCode()
           
 void removeMember(User member)
          Removes a single member from the group.
 void setMembers(Set<User> members)
          Replace any existing list of members with the new list.
 void setName(String name)
          Sets the name of this group.
 void setParent(Group parent)
          Sets the parent group for this group.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_STORE_NAME

public static final String DATA_STORE_NAME
See Also:
Constant Field Values

USERS_JOIN_TABLE_NAME

public static final String USERS_JOIN_TABLE_NAME
See Also:
Constant Field Values

COLUMN_NAME_NAME

public static final String COLUMN_NAME_NAME
See Also:
Constant Field Values

COLUMN_NAME_PARENT_FK

public static final String COLUMN_NAME_PARENT_FK
See Also:
Constant Field Values

USERS_JOIN_COLUMN_NAME

public static final String USERS_JOIN_COLUMN_NAME
See Also:
Constant Field Values

GROUPS_JOIN_COLUMN_NAME

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

PersistentGroup

public PersistentGroup()
Method Detail

addMember

public void addMember(User member)
Description copied from interface: Group
Add a single member to the group.

Specified by:
addMember in interface Group
Parameters:
member - single member to add
See Also:
Group.addMember(net.sf.sail.webapp.domain.User)

removeMember

public void removeMember(User member)
Description copied from interface: Group
Removes a single member from the group.

Specified by:
removeMember in interface Group
Parameters:
member - single member to remove
See Also:
Group.removeMember(net.sf.sail.webapp.domain.User)

getMembers

public Set<User> getMembers()
Description copied from interface: Group
Get the list of members of this group.

Specified by:
getMembers in interface Group
Returns:
List of User objects that belong to this group.
See Also:
Group.getMembers()

setMembers

public void setMembers(Set<User> members)
Description copied from interface: Group
Replace any existing list of members with the new list.

Specified by:
setMembers in interface Group
Parameters:
members - new List of members to set
See Also:
net.sf.sail.webapp.domain.group.Group#setMembers(java.util.List)

getId

public Long getId()
Description copied from interface: Group
Gets the id for this object.

Specified by:
getId in interface Group
Specified by:
getId in interface Persistable
Returns:
the id
See Also:
Group.getId()

getName

public String getName()
Description copied from interface: Group
Gets the name of this group.

Specified by:
getName in interface Group
Returns:
the name of the current group
See Also:
Group.getName()

setName

public void setName(String name)
Description copied from interface: Group
Sets the name of this group.

Specified by:
setName in interface Group
Parameters:
name - the name to set for this group.
See Also:
Group.setName(java.lang.String)

getParent

public Group getParent()
Description copied from interface: Group
Gets the parent group for this group. If is the group at the top of the group hierarchy, then null is returned.

Specified by:
getParent in interface Group
Returns:
the parent
See Also:
Group.getParent()

setParent

public void setParent(Group parent)
Description copied from interface: Group
Sets the parent group for this group.

Specified by:
setParent in interface Group
Parameters:
parent - the parent to set
See Also:
Group.setParent(net.sf.sail.webapp.domain.group.Group)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

compareTo

public int compareTo(Group o)
Specified by:
compareTo in interface Comparable<Group>


Copyright © 2012. All Rights Reserved.