Class GcGrouperSyncGroupDao

java.lang.Object
edu.internet2.middleware.grouperClient.jdbc.tableSync.GcGrouperSyncGroupDao

public class GcGrouperSyncGroupDao extends Object
  • Constructor Details

    • GcGrouperSyncGroupDao

      public GcGrouperSyncGroupDao()
  • Method Details

    • groupCreateByGroupId

      public GcGrouperSyncGroup groupCreateByGroupId(String groupId)
      select grouper sync group by group id. Note: this doesnt store to db yet, you do that at the end
      Parameters:
      connectionName -
      groupId -
      Returns:
      the group
    • internal_groupRetrieveFromDbByGroupNameFromGroupId

      public GcGrouperSyncGroup internal_groupRetrieveFromDbByGroupNameFromGroupId(String groupId)
      select grouper sync group by group id
      Parameters:
      connectionName -
      groupId -
      Returns:
      the group
    • internal_groupCreateByGroupIdHelper

      public GcGrouperSyncGroup internal_groupCreateByGroupIdHelper(String groupId)
      select grouper sync group by group id. Note: this doesnt store to db yet, you do that at the end
      Parameters:
      connectionName -
      groupId -
      Returns:
      the group
    • groupDelete

      public int groupDelete(Collection<GcGrouperSyncGroup> gcGrouperSyncGroups, boolean deleteMemberships, boolean deleteLogs)
      delete batch
      Parameters:
      gcGrouperSyncGroups -
      Returns:
      rows deleted (groups and logs)
    • groupDelete

      public int groupDelete(GcGrouperSyncGroup gcGrouperSyncGroup, boolean deleteMemberships, boolean deleteLogs)
      delete sync group
      Parameters:
      gcGrouperSyncGroup -
      Returns:
      rows deleted (groups and logs)
    • groupDeleteAll

      public int groupDeleteAll(boolean deleteMemberships, boolean deleteLogs)
      delete all groups for a sync
      Parameters:
      deleteMemberships - true if delete memberships and logs for memberships too
      deleteLogs - delete logs too
      Returns:
      the syncs
    • groupRetrieveAll

      public List<GcGrouperSyncGroup> groupRetrieveAll()
      select grouper sync group by sync id and group id
      Parameters:
      grouperSyncId -
      provisionerName -
      Returns:
      the syncs
    • groupRetrieveByGroupId

      public GcGrouperSyncGroup groupRetrieveByGroupId(String groupId)
      select grouper sync group by group id
      Parameters:
      connectionName -
      groupId -
      Returns:
      the group
    • groupRetrieveByGroupIds

      public Map<String,GcGrouperSyncGroup> groupRetrieveByGroupIds(Collection<String> grouperGroupIdsCollection)
      select grouper sync group by sync id and group id
      Parameters:
      grouperSyncId -
      grouperGroupIdsCollection -
      provisionerName -
      Returns:
      the groupId to syncGroup map
    • groupRetrieveByIdFromCache

      public GcGrouperSyncGroup groupRetrieveByIdFromCache(String gcGrouperSyncGroupId)
      Parameters:
      gcGrouperSyncGroupId -
      Returns:
    • groupRetrieveById

      public GcGrouperSyncGroup groupRetrieveById(String gcGrouperSyncGroupId)
      select grouper sync group by id
      Parameters:
      gcGrouperSyncGroupId -
      Returns:
      the group
    • groupRetrieveByIds

      public Map<String,GcGrouperSyncGroup> groupRetrieveByIds(Collection<String> gcGrouperSyncGroupIds)
      select grouper sync groups by ids
      Parameters:
      gcGrouperSyncGroupIds -
      Returns:
      map of ids to gcGrouperSyncGroups
    • groupRetrieveOrCreateByGroupId

      public GcGrouperSyncGroup groupRetrieveOrCreateByGroupId(String groupId)
      select grouper sync group by group id. This will make sure there are uuids for new ones
      Parameters:
      connectionName -
      groupId -
      Returns:
      the group
    • groupRetrieveOrCreateByGroupIds

      public Map<String,GcGrouperSyncGroup> groupRetrieveOrCreateByGroupIds(Collection<String> grouperGroupIdsCollection)
      select grouper sync group by group id. this will make sure there are uuids for new ones
      Parameters:
      grouperSyncId -
      grouperGroupIdsCollection -
      provisionerName -
      Returns:
      the groupId to syncGroup map
    • groupCreateLog

      public GcGrouperSyncLog groupCreateLog(GcGrouperSyncGroup gcGrouperSyncGroup)
      Parameters:
      gcGrouperSyncGroupId -
      Returns:
      log
    • internal_groupCacheDelete

      public void internal_groupCacheDelete(GcGrouperSyncGroup gcGrouperSyncGroup)
      Parameters:
      gcGrouperSyncGroup -
    • internal_groupRetrieveFromDbAll

      public List<GcGrouperSyncGroup> internal_groupRetrieveFromDbAll()
      select grouper sync group by sync id and group id
      Parameters:
      grouperSyncId -
      provisionerName -
      Returns:
      the syncs
    • internal_groupRetrieveFromDbByGroupId

      public GcGrouperSyncGroup internal_groupRetrieveFromDbByGroupId(String groupId)
      select grouper sync group by group id
      Parameters:
      connectionName -
      groupId -
      Returns:
      the group
    • internal_groupRetrieveFromDbByGroupIds

      public Map<String,GcGrouperSyncGroup> internal_groupRetrieveFromDbByGroupIds(Collection<String> grouperGroupIdsCollection)
      select grouper sync group by sync id and group id
      Parameters:
      grouperSyncId -
      grouperGroupIdsCollection -
      provisionerName -
      Returns:
      the groupId to syncGroup map
    • internal_groupRetrieveFromDbById

      public GcGrouperSyncGroup internal_groupRetrieveFromDbById(String gcGrouperSyncGroupId)
      select grouper sync group by gcGrouperSyncGroupId id
      Parameters:
      gcGrouperSyncGroupId -
      Returns:
      the gcGrouperSyncGroup
    • internal_groupRetrieveFromDbByIds

      public Map<String,GcGrouperSyncGroup> internal_groupRetrieveFromDbByIds(Collection<String> syncGroupIdsCollection)
      select grouper sync group by sync id and group id
      Parameters:
      grouperSyncId -
      syncGroupIdsCollection -
      provisionerName -
      Returns:
      the id to syncGroup map
    • getGcGrouperSync

      public GcGrouperSync getGcGrouperSync()
      Returns:
    • setGcGrouperSync

      public void setGcGrouperSync(GcGrouperSync gcGrouperSync)
      Parameters:
      gcGrouperSync -
    • internal_groupStoreAll

      public int internal_groupStoreAll()
      Returns:
      number of groups stored
    • retrieveUpdatedCacheSyncGroups

      public Set<GcGrouperSyncGroup> retrieveUpdatedCacheSyncGroups()
      Returns:
      gcGrouperSyncGroups that have been modified
    • internal_groupStore

      public int internal_groupStore(Collection<GcGrouperSyncGroup> gcGrouperSyncGroups)
      store batch, generally call this from store all objects from GcGrouperSync
      Parameters:
      gcGrouperSyncGroups -
      Returns:
      number of changes
    • internal_groupStore

      public void internal_groupStore(GcGrouperSyncGroup gcGrouperSyncGroup)
      store batch, generally call this from store all objects from GcGrouperSync
      Parameters:
      gcGrouperSyncGroups -
    • retrieveGroupIdsWithErrorsAfterMillis

      public List<String> retrieveGroupIdsWithErrorsAfterMillis(Timestamp errorTimestampCheckFrom)
      get group ids with errors after error timestamp
      Parameters:
      errorTimestampCheckFrom - if null get all
      Returns:
      group ids
    • retrieveErrorCountByCode

      public Map<String,Integer> retrieveErrorCountByCode()
      get count of rows per error code
      Returns: