public final class ACLGroup extends DBPersist
Security Role Groups
Modifier and Type | Field and Description |
---|---|
static short |
ClassId |
Constructor and Description |
---|
ACLGroup()
Default constructor.
|
ACLGroup(java.lang.String sGroupUId)
Construct object and set gu_acl_group field.
|
Modifier and Type | Method and Description |
---|---|
int |
addACLUser(JDCConnection oConn,
java.lang.String sIdUser)
Add User to Group.
|
int |
addACLUsers(JDCConnection oConn,
java.lang.String sUserList)
Add Users to Group.
|
int |
clearACLUsers(JDCConnection oConn)
Remove all users from this group.
|
static boolean |
delete(JDCConnection oConn,
java.lang.String sGroupGUID)
Delete Group
Call k_sp_del_group stored procedure
|
DBSubset |
getACLUsers(JDCConnection oConn)
Get users that belong to this group
|
static java.lang.String |
getIdFromName(java.sql.Connection oConn,
int iDomainId,
java.lang.String sGroupNm)
Get Group Unique Id. from its name.
|
static java.lang.String |
getIdFromName(JDCConnection oConn,
int iDomainId,
java.lang.String sGroupNm)
Get Group Unique Id. from its name.
|
int |
removeACLUser(JDCConnection oConn,
java.lang.String sIdUser)
Remove User from Group.
|
boolean |
store(JDCConnection oConn)
Store a register at database representing this instance of DBPersist
Insertions and updates : The store method automatically manages
register insertions and updates.
|
allcaps, allcaps, clear, clone, columns, containsKey, containsValue, delete, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getIntArray, getInteger, getIntegerArray, getIntervalPart, getItemMap, getItems, getMoney, getPrimaryKey, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTime, getTimeOfDay, getTimestamp, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, setPrimaryKey, size, toLowerCase, toUpperCase, toXML, toXML, toXML, values
public static final short ClassId
public ACLGroup()
public ACLGroup(java.lang.String sGroupUId)
sGroupUId
- Group Unique Identifierpublic boolean store(JDCConnection oConn) throws java.sql.SQLException
DBPersist
Store a register at database representing this instance of DBPersist
Insertions and updates : The store method automatically manages register insertions and updates. If the stored object already exists at database then it is updated, if it does not exists then it is inserted. A primary key violation error is never thrown so ther is no need to call delete() method before re-writing an existing object.
NULL fields : All values not set calling put() methods for DBPersist
will be assumed to be NULL. If a not nullable field is not set then an
SQLException will be raised.
On storing an already existing object all values will we overwrited,
so is a DBPersist is not fully loaded before storing it, values not set
by calling put() methods that already were present at database will be lost.
public int addACLUser(JDCConnection oConn, java.lang.String sIdUser) throws java.sql.SQLException
Add User to Group.
Insert new register at k_x_group_user table.
oConn
- Database ConnectionsIdUser
- User Unique Identifier.java.sql.SQLException
- May throw a primary key constraint violation is user already belongs to group.public int addACLUsers(JDCConnection oConn, java.lang.String sUserList) throws java.sql.SQLException
Add Users to Group.
Insert new registers at k_x_group_user table.
oConn
- Database ConnectionsUserList
- A string of comma delimited User GUIDs that must be added to this ACLGroup.java.sql.SQLException
- May throw a primary key constraint violation is user already belongs to group.public int removeACLUser(JDCConnection oConn, java.lang.String sIdUser) throws java.sql.SQLException
Remove User from Group.
remove register from k_x_group_user table.
oConn
- Database ConnectionsIdUser
- User Unique Identifier.java.sql.SQLException
public int clearACLUsers(JDCConnection oConn) throws java.sql.SQLException
Remove all users from this group.
Delete registers from k_x_group_user
oConn
- Database connectionjava.sql.SQLException
public DBSubset getACLUsers(JDCConnection oConn) throws java.sql.SQLException
oConn
- JDCConnectionjava.sql.SQLException
public static java.lang.String getIdFromName(java.sql.Connection oConn, int iDomainId, java.lang.String sGroupNm) throws java.sql.SQLException
Get Group Unique Id. from its name.
This method executes a SQL query with a ResultSet
oConn
- Connection Database ConnectioniDomainId
- int Domain Identifier to with Group belongssGroupNm
- String Group Namejava.sql.SQLException
public static java.lang.String getIdFromName(JDCConnection oConn, int iDomainId, java.lang.String sGroupNm) throws java.sql.SQLException
Get Group Unique Id. from its name.
This method calls k_sp_get_group_id stored procedure.
oConn
- JDCConnectioniDomainId
- int Domain Identifier to with Group belongssGroupNm
- Group Namejava.sql.SQLException
public static boolean delete(JDCConnection oConn, java.lang.String sGroupGUID) throws java.sql.SQLException
Delete Group
Call k_sp_del_group stored procedure
oConn
- Database ConnectionsGroupGUID
- Group Unique Identifierjava.sql.SQLException