Class GrouperSqlDataProviderQueryTargetDao

java.lang.Object
edu.internet2.middleware.grouper.app.dataProvider.GrouperDataProviderQueryTargetDao
edu.internet2.middleware.grouper.app.dataProvider.GrouperSqlDataProviderQueryTargetDao

public class GrouperSqlDataProviderQueryTargetDao extends GrouperDataProviderQueryTargetDao
  • Constructor Details

    • GrouperSqlDataProviderQueryTargetDao

      public GrouperSqlDataProviderQueryTargetDao()
  • Method Details

    • selectDistinctSubjectIds

      public List<String> selectDistinctSubjectIds()
      select distinct lowercased subject ids from the source, ordered. for SQL this uses ORDER BY in the query. for LDAP this sorts in Java after retrieval. wraps the configured query as a subquery, projects only the subject id column, and selects distinct lowercased subject ids, ordered by the database: SELECT DISTINCT LOWER(col) FROM (SELECT col FROM (...) innerQuery) outerQuery ORDER BY 1
      Specified by:
      selectDistinctSubjectIds in class GrouperDataProviderQueryTargetDao
      Returns:
      ordered list of distinct lowercased subject ids
    • selectDataBySubjectIdRange

      public List<Object[]> selectDataBySubjectIdRange(Map<String,Integer> lowerColumnNameToZeroIndex, String fromSubjectIdLower, String toSubjectIdLower)
      select data for subjects whose lowercased subject id falls within the given range (inclusive). wraps the configured query as a subquery and filters with WHERE LOWER(col) >= ? AND LOWER(col) <= ? using bind variables for the range bounds
      Specified by:
      selectDataBySubjectIdRange in class GrouperDataProviderQueryTargetDao
      fromSubjectIdLower - lower bound (inclusive), lowercased
      toSubjectIdLower - upper bound (inclusive), lowercased
      Returns:
    • selectDataBySubjectIds

      public List<Object[]> selectDataBySubjectIds(Map<String,Integer> lowerColumnNameToZeroIndex, List<String> subjectIdsLower)
      select data for specific lowercased subject ids. batches internally to avoid exceeding bind variable limits. wraps the configured query as a subquery and filters with WHERE LOWER(col) IN (?,?,...). batches in groups of 800 to stay within database bind variable limits (e.g. Oracle's 1000 limit)
      Specified by:
      selectDataBySubjectIds in class GrouperDataProviderQueryTargetDao
      subjectIdsLower - lowercased subject ids to look up
      Returns:
    • selectData

      public List<Object[]> selectData(Map<String,Integer> lowerColumnNameToZeroIndex)
      Specified by:
      selectData in class GrouperDataProviderQueryTargetDao
    • selectDataByMembers

      public List<Object[]> selectDataByMembers(Map<String,Integer> lowerColumnNameToZeroIndex, Set<Member> members)
      Specified by:
      selectDataByMembers in class GrouperDataProviderQueryTargetDao
    • selectChangeLogData

      public List<Object[]> selectChangeLogData(Map<String,Integer> lowerColumnNameToZeroIndex, Timestamp changesFromTimestamp, Timestamp changesToTimestamp)
      Specified by:
      selectChangeLogData in class GrouperDataProviderQueryTargetDao
      changesFromTimestamp - get changes after this timestamp, could be null
      changesToTimestamp - get changes to and including this timestamp
      Returns: