Package com.avoka.fc.core.dao
Class GroupDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.GroupDao
-
public class GroupDao extends AbstractDao
Provides a DAO for the Group entity.- See Also:
Group
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description GroupDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addGroupsToSubmission(Collection<String> groupNames, Submission submission)
Add the specified groups to the submission.void
addGroupToSubmission(Group group, Submission submission)
Add the specified group to the submission.Group
createUpdateFormGroup(String groupName, String description, boolean formWorkGroupFlag, boolean newFormFlag, boolean savedFormFlag, boolean completedFormFlag)
Create a Form Group for the given name and group attributes.List<Group>
getCompletedFormGroupsForUser(UserAccount userAccount)
Return the list of completed form groups that a user is a member of.List<Group>
getFormGroupList()
The list of all groups ordered by group nameGroup
getGroupForName(String name)
Return the group with the specified nameGroup
getGroupForPK(Object id)
Return the group with the specified OIDList<Group>
getGroupList()
The list of all groups ordered by group nameList<Group>
getGroupList(String keyword)
Return the list of groups matching the specified search criteria, ordered by group name.List<Group>
getGroupList(String keyword, String type)
Return the list of groups matching the specified search criteria, ordered by group nameList<Group>
getGroupsForUser(UserAccount userAccount, String groupType)
Return the list of form groups that a user is a member of.List<Group>
getJobGroupList()
The list of all job groups ordered by group nameList<Group>
getNewFormGroupsForUser(UserAccount userAccount)
Return the list of new form groups that a user is a member of.List<Group>
getSavedFormGroupsForUser(UserAccount userAccount)
Return the list of saved form groups that a user is a member of.void
loadDefaultGroups()
Load the list of pre-defined groups, unless they already exist.-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Method Detail
-
getGroupForPK
public Group getGroupForPK(Object id)
Return the group with the specified OID- Parameters:
id
- the OID- Returns:
- the matching group, or null if not found
-
loadDefaultGroups
public void loadDefaultGroups()
Load the list of pre-defined groups, unless they already exist.
-
getGroupForName
public Group getGroupForName(String name)
Return the group with the specified name- Parameters:
name
- the group name- Returns:
- the matching group
-
getGroupList
public List<Group> getGroupList(String keyword)
Return the list of groups matching the specified search criteria, ordered by group name.- Parameters:
keyword
- the search keyword- Returns:
- the list of matching groups
-
getGroupList
public List<Group> getGroupList(String keyword, String type)
Return the list of groups matching the specified search criteria, ordered by group name- Parameters:
keyword
- the search keywordtype
- the group type filter- Returns:
- the list of matching groups
- Since:
- 4.1.0
-
getGroupList
public List<Group> getGroupList()
The list of all groups ordered by group name- Returns:
- the list of groups
-
getFormGroupList
public List<Group> getFormGroupList()
The list of all groups ordered by group name- Returns:
- the list of groups
-
getJobGroupList
public List<Group> getJobGroupList()
The list of all job groups ordered by group name- Returns:
- the list of groups
- Since:
- 17.10.0
-
getGroupsForUser
public List<Group> getGroupsForUser(UserAccount userAccount, String groupType)
Return the list of form groups that a user is a member of.- Parameters:
userAccount
- the non-null user accountgroupType
- type of group, i.e. Form, Job, etc- Returns:
- the list of groups for the user
- Since:
- 19.05.0
-
getNewFormGroupsForUser
public List<Group> getNewFormGroupsForUser(UserAccount userAccount)
Return the list of new form groups that a user is a member of.- Parameters:
userAccount
- the non-null user account- Returns:
- the list of groups for the user
- Since:
- 3.6.0
-
getSavedFormGroupsForUser
public List<Group> getSavedFormGroupsForUser(UserAccount userAccount)
Return the list of saved form groups that a user is a member of.- Parameters:
userAccount
- the non-null user account- Returns:
- the list of groups for the user
- Since:
- 3.6.0
-
getCompletedFormGroupsForUser
public List<Group> getCompletedFormGroupsForUser(UserAccount userAccount)
Return the list of completed form groups that a user is a member of.- Parameters:
userAccount
- the non-null user account- Returns:
- the list of groups for the user
- Since:
- 3.6.0
-
addGroupsToSubmission
public boolean addGroupsToSubmission(Collection<String> groupNames, Submission submission)
Add the specified groups to the submission. If any of the specified groups are not configured to 'Form Share With Group' then it will not be added to the submission group. Please note this method will note commit database changes.- Parameters:
groupNames
- the names of the groups to add to the submission (required)submission
- the submission object to add the groups to (required)- Returns:
- true if one or more submission groups was added to the submission, or false otherwise
- Since:
- 3.6.5
-
addGroupToSubmission
public void addGroupToSubmission(Group group, Submission submission)
Add the specified group to the submission. Please note this method will note commit database changes.- Parameters:
group
- the form group to add to the submission (required)submission
- the submission object to add the group to (required)- Since:
- 4.0.0
-
createUpdateFormGroup
public Group createUpdateFormGroup(String groupName, String description, boolean formWorkGroupFlag, boolean newFormFlag, boolean savedFormFlag, boolean completedFormFlag)
Create a Form Group for the given name and group attributes. Please note this method will note commit database changes.- Parameters:
groupName
- the name of the group (required)description
- the group descriptionformWorkGroupFlag
- the form work group flagnewFormFlag
- the new form access control flagsavedFormFlag
- the saved form/task access control flagcompletedFormFlag
- the completed forms access control flag- Returns:
- the created or updated form group
- Since:
- 4.0.0
-
-