public class GroupDAO
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private org.hibernate.Session |
ss |
Constructor and Description |
---|
GroupDAO()
Constructor of the class - only thing to do here is to open session to DB
|
Modifier and Type | Method and Description |
---|---|
void |
closeSession()
Method for closing the session - it flushes database connection
|
void |
deleteGroup(Group group)
Method providing functionality for deleting a particular group
|
Group |
findGroup(java.lang.String groupid)
Method returning a Group object based on search by group name
|
java.util.List<Group> |
getAllGroups()
Method returning unfiltered List of all groups in the system
|
java.lang.Boolean |
newGroup(Group group)
Method providing functionality for adding new Group
|
void |
updateGroup(Group group)
Method providing functionality of updating an object
|
void |
updateGroupName(java.lang.String oldName,
java.lang.String newName)
method providing functionality for updating group name
|
public GroupDAO()
public java.util.List<Group> getAllGroups()
public Group findGroup(java.lang.String groupid)
groupid
- public java.lang.Boolean newGroup(Group group)
group
- public void updateGroup(Group group)
group
- group that should be updatedpublic void updateGroupName(java.lang.String oldName, java.lang.String newName)
oldName
- Old name of the groupnewName
- New name of the grouppublic void deleteGroup(Group group)
group
- group that is to be deletedpublic void closeSession()