public class PermissionDAODbFacadeImpl extends BaseDAODbFacade implements PermissionDAO
PermissionsDAODbFacadeImpl
provides a concrete implementation of PermissionDAO
using code from
DbFacade.dbFacade, dialect, jdbcTemplate, RETURN_VALUE_PARAMETER
Constructor and Description |
---|
PermissionDAODbFacadeImpl() |
Modifier and Type | Method and Description |
---|---|
permissions |
get(Guid id)
Retrieves the entity with the given id.
|
List<permissions> |
getAll()
Retrieves all the entities of type
T . |
List<permissions> |
getAllDirectPermissionsForAdElement(Guid id)
Gets all permissions for the specified AD element only, excluding permissions of groups that it is in.
|
List<permissions> |
getAllForAdElement(Guid id)
Gets all permissions for the specified AD element, including permissions of groups that it is in.
|
List<permissions> |
getAllForEntity(Guid id)
Retrieves all permissions for the specified entity.
|
List<permissions> |
getAllForRole(Guid id)
Gets all permissions for the specified role.
|
List<permissions> |
getAllForRoleAndAdElement(Guid roleid,
Guid elementid)
Retrieves all permissions for the specified role and element.
|
List<permissions> |
getAllForRoleAndObject(Guid roleid,
Guid objectid)
Retrieves all permissions for the specified role and object.
|
permissions |
getForRoleAndAdElementAndObject(Guid roleid,
Guid elementid,
Guid objectid)
Retrieves the permission for the specified role, element and object.
|
permissions |
getForRoleAndAdElementAndObjectWithGroupCheck(Guid roleid,
Guid elementid,
Guid objectid)
Retrieves the permission for the specified role, element and object,
considering the user's group's permissions as well.
|
List<permissions> |
getTreeForEntity(Guid id,
VdcObjectType type) |
void |
remove(Guid id)
Removes the entity with the given id from the underlying store of data.
|
void |
removeForEntity(Guid id)
Removes all permissions for the given entity.
|
void |
save(permissions permission)
Persist a new instance of the entity.
|
void |
update(permissions entity)
Update an existing entity with data from the given instance.
|
getCallsHandler, getCustomMapSqlParameterSource, setDbFacade, setDialect, setTemplate
public permissions get(Guid id)
ReadDao
get
in interface ReadDao<permissions,Guid>
id
- The id to look by (can't be null
).null
if not found.public permissions getForRoleAndAdElementAndObject(Guid roleid, Guid elementid, Guid objectid)
PermissionDAO
getForRoleAndAdElementAndObject
in interface PermissionDAO
roleid
- the roleelementid
- the elementobjectid
- the objectpublic permissions getForRoleAndAdElementAndObjectWithGroupCheck(Guid roleid, Guid elementid, Guid objectid)
PermissionDAO
getForRoleAndAdElementAndObjectWithGroupCheck
in interface PermissionDAO
roleid
- the roleelementid
- the elementobjectid
- the objectpublic List<permissions> getAllForAdElement(Guid id)
PermissionDAO
getAllForAdElement
in interface PermissionDAO
id
- the AD elementpublic List<permissions> getAllDirectPermissionsForAdElement(Guid id)
PermissionDAO
getAllDirectPermissionsForAdElement
in interface PermissionDAO
id
- the AD elementpublic List<permissions> getAllForRole(Guid id)
PermissionDAO
getAllForRole
in interface PermissionDAO
id
- the rolepublic List<permissions> getAllForRoleAndAdElement(Guid roleid, Guid elementid)
PermissionDAO
getAllForRoleAndAdElement
in interface PermissionDAO
roleid
- the roleelementid
- the elementpublic List<permissions> getAllForRoleAndObject(Guid roleid, Guid objectid)
PermissionDAO
getAllForRoleAndObject
in interface PermissionDAO
roleid
- the roleobjectid
- the objectpublic List<permissions> getAllForEntity(Guid id)
PermissionDAO
getAllForEntity
in interface PermissionDAO
id
- the entitypublic List<permissions> getTreeForEntity(Guid id, VdcObjectType type)
getTreeForEntity
in interface PermissionDAO
public void save(permissions permission)
ModificationDao
save
in interface ModificationDao<permissions,Guid>
permission
- The entity to persist (can't be null
).public void remove(Guid id)
ModificationDao
remove
in interface ModificationDao<permissions,Guid>
id
- The id of the entity to remove (can't be null
).public void removeForEntity(Guid id)
PermissionDAO
removeForEntity
in interface PermissionDAO
id
- the entitypublic List<permissions> getAll()
ReadDao
T
.getAll
in interface ReadDao<permissions,Guid>
public void update(permissions entity)
ModificationDao
update
in interface ModificationDao<permissions,Guid>
entity
- The entity instance, containing data to update (can't be null
).Copyright © 2012. All Rights Reserved.