|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.authorization.DBAuthorizationGroup
public class DBAuthorizationGroup
The DBAuthorizationGroup that will load groups and/or permissions with exists from a database. All you have to do is provide: - the names of the key columns - the names of the value columns - the names of the tables - the column to sort
| Constructor Summary | |
|---|---|
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) |
|
| Method Summary | |
|---|---|
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: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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.| Method Detail |
|---|
protected String buildSQL()
public void load(Connection conn)
throws SQLException
conn -
SQLException
public List<Group> loadGroupList(Connection conn)
throws SQLException
conn -
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||