Class GrouperJdbcSourceAdapter2_5
java.lang.Object
edu.internet2.middleware.subject.provider.BaseSourceAdapter
edu.internet2.middleware.subject.provider.JDBCSourceAdapter
edu.internet2.middleware.subject.provider.JDBCSourceAdapter2
edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2_5
- All Implemented Interfaces:
Source
-
Field Summary
Fields inherited from class edu.internet2.middleware.subject.provider.JDBCSourceAdapter2
dbTableOrView, defaultSortCol, descriptionCol, lowerSearchCol, nameCol, selectCols, subjectIdCol, subjectIdentifierCols
Fields inherited from class edu.internet2.middleware.subject.provider.JDBCSourceAdapter
errorOnMaxResults, failOnSearchForTesting, jdbcConnectionProvider, maxResults, queryCountforTesting, subjectIDAttributeName, subjectTypeString
Fields inherited from class edu.internet2.middleware.subject.provider.BaseSourceAdapter
attributes, descriptionAttributeName, id, internalAttributes, name, nameAttributeName, params, searchAttributes, searches, sortAttributes, subjectIdentifierAttributes, subjectIdentifierAttributesAll, type, types
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Subject
createSubject
(ResultSet resultSet, String query, Collection<String> identifiersForIdentifierToMap, Map<String, Subject> resultIdentifierToSubject) Create a subject from the current row in the resultSetGet the names of attributes used for searching.Get the names of attributes used for sorting.boolean
boolean
loadAttributes
(ResultSet resultSet, String query, ResultSetMetaData resultSetMetaData) Loads source attributes from the result setprotected void
setupDataSource
(Properties props) DataSource connection pool setup.Methods inherited from class edu.internet2.middleware.subject.provider.JDBCSourceAdapter2
checkConfig, dbTableOrView, getDbTableOrView, getDefaultSortCol, getDescriptionCol, getLowerSearchCol, getNameCol, getSubject, getSubject, getSubjectAttributeColToName, getSubjectByIdentifier, getSubjectByIdentifier, getSubjectByIdOrIdentifier, getSubjectByIdOrIdentifier, getSubjectIdCol, getSubjectIdentifierAttributes, getSubjectIdentifierAttributesAll, getSubjectIdentifierCols, getSubjectsByIdentifiers, getSubjectsByIdentifiers, getSubjectsByIds, getSubjectsByIds, getSubjectsByIdsOrIdentifiers, getSubjectsByIdsOrIdentifiers, retrieveAllSubjectIds, retrieveString, search, search, searchPage, searchPage, setDbTableOrView, setDefaultSortCol, setDescriptionCol, setLowerSearchCol, setNameCol, setSubjectAttributeColToName, setSubjectIdCol, setSubjectIdentifierCols
Methods inherited from class edu.internet2.middleware.subject.provider.JDBCSourceAdapter
closeStatement, getDatabaseType, getDescriptionAttributeName, getMaxPage, getNameAttributeName, getSqlResults, getSqlResults, getSubject, getSubjectByIdentifier, getSubjectIDAttributeName, getSubjectTypeString, init, isChangeSearchQueryForMaxResults, isUseInClauseForIdAndIdentifier, loadAttributes, loadDriver, loggingStart, loggingStop, prepareStatement, printConfig, tryToChangeQuery
Methods inherited from class edu.internet2.middleware.subject.provider.BaseSourceAdapter
addAttribute, addInitParam, addInternalAttribute, addSubjectType, attributeNameToViewerGroupName, convertSourceAttributeToSubjectAttribute, convertSubjectAttributeToSourceAttribute, createSubject, equals, exportLabelToAttributeName, getAttributes, getConfigId, getId, getInitParam, getInternalAttributes, getName, getSearch, getSearches, getSourceAttributesToLowerCase, getSubjectStatusConfig, getSubjectType, getSubjectTypes, hashCode, initParams, loadSearch, removeInitParam, resultSetLimit, setConfigId, setId, setName, setSearchAttributes, setSearches, setSortAttributes, setSubjectIdentifierAttributes, setSubjectIdentifierAttributesAll, virtualAttributesForSource, virtualAttributesForSourceLegacy, virtualAttributeVariablesForSourceLegacy
-
Constructor Details
-
GrouperJdbcSourceAdapter2_5
public GrouperJdbcSourceAdapter2_5()
-
-
Method Details
-
isEditable
public boolean isEditable()- Specified by:
isEditable
in interfaceSource
- Overrides:
isEditable
in classBaseSourceAdapter
- Returns:
- true if the source is editable otherwise false
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceSource
- Overrides:
isEnabled
in classBaseSourceAdapter
- Returns:
- true if the source is active otherwise false
-
getSortAttributes
Description copied from interface:Source
Get the names of attributes used for sorting.- Specified by:
getSortAttributes
in interfaceSource
- Overrides:
getSortAttributes
in classBaseSourceAdapter
- Returns:
- sort attributes in lower case
- See Also:
-
getSearchAttributes
Description copied from interface:Source
Get the names of attributes used for searching.- Specified by:
getSearchAttributes
in interfaceSource
- Overrides:
getSearchAttributes
in classBaseSourceAdapter
- Returns:
- search attributes in lower case
- See Also:
-
setupDataSource
Description copied from class:JDBCSourceAdapter2
DataSource connection pool setup.- Overrides:
setupDataSource
in classJDBCSourceAdapter2
- Throws:
SourceUnavailableException
-
loadAttributes
protected Map<String,Set<String>> loadAttributes(ResultSet resultSet, String query, ResultSetMetaData resultSetMetaData) throws SQLException Loads source attributes from the result set- Overrides:
loadAttributes
in classJDBCSourceAdapter2
- Parameters:
resultSet
-query
- for loggingresultSetMetaData
-- Returns:
- attributes
- Throws:
SQLException
-
createSubject
protected Subject createSubject(ResultSet resultSet, String query, Collection<String> identifiersForIdentifierToMap, Map<String, Subject> resultIdentifierToSubject) throws SQLExceptionCreate a subject from the current row in the resultSet- Overrides:
createSubject
in classJDBCSourceAdapter2
- Parameters:
resultSet
-query
-identifiersForIdentifierToMap
-resultIdentifierToSubject
-- Returns:
- subject
- Throws:
SQLException
-