Package com.logicaldoc.core.security.dao
Interface GroupDAO
-
- All Superinterfaces:
PersistentObjectDAO<Group>
- All Known Implementing Classes:
HibernateGroupDAO
public interface GroupDAO extends PersistentObjectDAO<Group>
-
-
Field Summary
-
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
count()
Counts the total number of groupsCollection<String>
findAllGroupNames(long tenantId)
This method selects all group namesCollection<Group>
findByLikeName(String name, long tenantId)
This method finds a Group by name.Group
findByName(String name, long tenantId)
Finds a group by name.void
fixGuestPermissions(Group group)
void
inheritACLs(Group group, long parentGroupId)
This method replicates all ACLs of the parent group to another group.void
initialize(Group group)
Initialize the group collectionsboolean
insert(Group group, long parentGroupId)
This method persists a new group object.-
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
insert
boolean insert(Group group, long parentGroupId)
This method persists a new group object. All permissions and extended attributes of the parent group will be replicated.- Parameters:
group
- Group which should be stored in a database.parentGroupId
- ID of the group this group inherits ACLs from- Returns:
- True if successful stored in a database.
-
inheritACLs
void inheritACLs(Group group, long parentGroupId)
This method replicates all ACLs of the parent group to another group.Attention: The group(groupId) ACLs will be discarded.
- Parameters:
group
- The group to be altered.parentGroupId
- The group whose ACLs will be inherited.
-
findByName
Group findByName(String name, long tenantId)
Finds a group by name.- Parameters:
name
- name of wanted group.tenantId
- ID of the owning tenant- Returns:
- Wanted group or null.
-
findAllGroupNames
Collection<String> findAllGroupNames(long tenantId)
This method selects all group names- Parameters:
tenantId
- identifier of the tenant- Returns:
- collection of all the group names
-
findByLikeName
Collection<Group> findByLikeName(String name, long tenantId)
This method finds a Group by name.- Parameters:
name
- The name of wanted Group.tenantId
- ID of the owning tenant- Returns:
- Collection of selected groups.
-
count
int count()
Counts the total number of groups- Returns:
- total number of groups
-
initialize
void initialize(Group group)
Initialize the group collections- Specified by:
initialize
in interfacePersistentObjectDAO<Group>
- Parameters:
group
- The entity to be initialised
-
fixGuestPermissions
void fixGuestPermissions(Group group)
-
-