public class DBAuthorizationGroup extends Object
| Constructor and Description |
|---|
DBAuthorizationGroup(String sql)
Set the SQL command to load groups and permissions from data base.
|
DBAuthorizationGroup(String tableGroup,
String keyGroup,
String valueGroup)
Get a groups only.
|
DBAuthorizationGroup(String tableGroup,
String keyGroup,
String valueGroup,
String sqlWhere)
Get a groups using a command SQL WHERE
|
DBAuthorizationGroup(String tableGroup,
String keyGroup,
String valueGroup,
String tablePermission,
String valuePermission)
Get a groups and permissions (OneToMany)
|
DBAuthorizationGroup(String tableGroup,
String keyGroup,
String valueGroup,
String tablePermission,
String valuePermission,
String sqlWhere)
Get a groups and permissions (OneToMany) using a command SQL WHERE
|
DBAuthorizationGroup(String tableGroup,
String keyGroup,
String valueGroup,
String tableReference,
String keyPermissionReference,
String keyGroupReference,
String tablePermission,
String keyPermission,
String valuePermission)
Get a groups and permissions (ManyToMany)
|
DBAuthorizationGroup(String tableGroup,
String keyGroup,
String valueGroup,
String tableReference,
String keyPermissionReference,
String keyGroupReference,
String tablePermission,
String keyPermission,
String valuePermission,
String sqlWhere)
Get a groups and permissions (ManyToMany)
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildSQL()
Build the SQL command using the parameters from the DBAuthorizationGroup to get the
groups and permissions (if exists) from database!
|
void |
load(Connection conn)
Call this method passing a db connection to load the groups/permissions from database and
adding in AuthorizationManager using the add(Group);
The SQL statement that will be constructed:
|
List<Group> |
loadGroupList(Connection conn)
Call this method if you need to get a list of groups and permissions (if exists)
The SQL statement that will be constructed:
|
public DBAuthorizationGroup(String sql)
sql - public DBAuthorizationGroup(String tableGroup, String keyGroup, String valueGroup)
tableGroup - name of table.keyGroup - name of field contain a ID (key)valueGroup - name of field contain a Name.public DBAuthorizationGroup(String tableGroup, String keyGroup, String valueGroup, String sqlWhere)
tableGroup - name of table.keyGroup - name of field contain a ID (key)valueGroup - name of field contain a Name.sqlWhere - contain a command SQL WHERE, Ex. WHERE group.id < 5.public DBAuthorizationGroup(String tableGroup, String keyGroup, String valueGroup, String tablePermission, String valuePermission)
tableGroup - name of table.keyGroup - name of field contain a ID (key)valueGroup - name of field contain a Name.tablePermission - name of table contain the permissions.valuePermission - name of field contain the permissions.public DBAuthorizationGroup(String tableGroup, String keyGroup, String valueGroup, String tablePermission, String valuePermission, String sqlWhere)
tableGroup - name of table.keyGroup - name of field contain a ID (key)valueGroup - name of field contain a Name.tablePermission - name of table contain the permissions.valuePermission - name of field contain the name of permission.sqlWhere - contain a command SQL WHERE, Ex. WHERE group.id < 5 and permission < 2.public DBAuthorizationGroup(String tableGroup, String keyGroup, String valueGroup, String tableReference, String keyPermissionReference, String keyGroupReference, String tablePermission, String keyPermission, String valuePermission)
tableGroup - name of table.keyGroup - name of field contain a ID (key)valueGroup - name of field contain a Name.tableReference - name of table contain the IDs groups and permissions.keyPermissionReference - name of field contain the permissions Id.keyGroupReference - name of field contain the groups Id.tablePermission - name of table contain permissions.keyPermission - name of field contain the id of permission.valuePermission - name of field contain the name of permission.public DBAuthorizationGroup(String tableGroup, String keyGroup, String valueGroup, String tableReference, String keyPermissionReference, String keyGroupReference, String tablePermission, String keyPermission, String valuePermission, String sqlWhere)
tableGroup - name of table.keyGroup - name of field contain a ID (key)valueGroup - name of field contain a Name.tableReference - name of table contain the IDs groups and permissions.keyPermissionReference - name of field contain the permissions Id.keyGroupReference - name of field contain the groups Id.tablePermission - name of table contain permissions.keyPermission - name of field contain the id of permission.valuePermission - name of field contain the name of permission.sqlWhere - contain a command SQL WHERE, Ex. WHERE group_permission.group_id = 2.protected String buildSQL()
public void load(Connection conn) throws SQLException
conn - SQLExceptionpublic List<Group> loadGroupList(Connection conn) throws SQLException
conn - SQLExceptionCopyright © 2015. All Rights Reserved.