public class GroupMembershipCache extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GroupMembershipCache.IdList
Encapsulates a List of IDs, providing synchronization and a little
convenience (but not much).
|
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_TEMP_TABLE_NAME
The name of the Global temporary table used to hold sets of IDs.
|
protected static int |
JDBC_BATCH_SIZE_THRESHHOLD
The maximum number of SQL Statement executed in one batch when using
JDBC batching.
|
Constructor and Description |
---|
GroupMembershipCache()
Constructs a GroupMembershipCache.
|
Modifier and Type | Method and Description |
---|---|
void |
addGroupRelationship(Long groupId,
Long memberId)
Adds a group member relationship to the cache.
|
protected void |
deleteTemporaryIds(LibraryConnection lconn)
Delete all IDs from the Global temporary table.
|
void |
dispose()
Disposes this instance.
|
Long[] |
getDirectAncestorIds(Long memberId)
Gets the direct ancestors of the specified DIRECTORYOBJECT member ID.
|
Long[] |
getDirectMemberIds(Long groupId)
Gets the direct members of the specified DIRECTORYGROUP ID.
|
protected void |
initialize(LibraryConnection lconn)
Initialize the cache.
|
protected void |
insertTemporaryIds(LibraryConnection lconn,
Long[] ids)
Insert specified IDs into the Global temporary table.
|
void |
removeGroupRelationship(Long groupId,
Long memberId)
Removes a group member relationship from the cache.
|
public static final String GLOBAL_TEMP_TABLE_NAME
protected static int JDBC_BATCH_SIZE_THRESHHOLD
public GroupMembershipCache()
public void dispose()
public Long[] getDirectMemberIds(Long groupId)
groupId
- ID of the grouppublic Long[] getDirectAncestorIds(Long memberId)
memberId
- ID of the memberpublic void addGroupRelationship(Long groupId, Long memberId)
groupId
- ID of the groupmemberId
- ID of the memberpublic void removeGroupRelationship(Long groupId, Long memberId)
groupId
- ID of the groupmemberId
- ID of the memberprotected void initialize(LibraryConnection lconn) throws IfsException
lconn
- the connection contextIfsException
- if the operation failsprotected void insertTemporaryIds(LibraryConnection lconn, Long[] ids) throws IfsException
lconn
- the connection contextids
- the IDs to insertIfsException
- if the operation failsprotected void deleteTemporaryIds(LibraryConnection lconn) throws IfsException
lconn
- the connection contextIfsException
- if the operation failsCopyright © 2023. All rights reserved.