|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.subject.provider.BaseSourceAdapter
edu.internet2.middleware.subject.provider.JDBCSourceAdapter
edu.internet2.middleware.subject.provider.JDBCSourceAdapter2
public class JDBCSourceAdapter2
jdbc source adapter based on one table with more complex searches
Constructor Summary | |
---|---|
JDBCSourceAdapter2()
|
|
JDBCSourceAdapter2(String id,
String name)
|
Method Summary | |
---|---|
void |
checkConfig()
make sure the config is ok, and log descriptive errors if not |
String |
getDbTableOrView()
table or view where each row is a subject |
String |
getDefaultSortCol()
search queries will sort by this. |
String |
getDescriptionCol()
|
String |
getLowerSearchCol()
for searches (not by id or identifier), this is the col which holds the search terms, in lower case |
String |
getNameCol()
column which holds the subject name |
Subject |
getSubject(String id,
boolean exceptionIfNull)
Gets a Subject by its ID. |
Map<String,String> |
getSubjectAttributeColToName()
map of col to attribute name // |
Subject |
getSubjectByIdentifier(String id,
boolean exceptionIfNull)
note, you should implement this method since this implementation will become abstract at some point |
String |
getSubjectIdCol()
column which holds the subject id |
Set<String> |
getSubjectIdentifierCols()
cols which are used in a findByIdentifier query |
static void |
main(String[] args)
|
Set<Subject> |
search(String searchValue)
Unstructured search for Subjects. |
void |
setDbTableOrView(String dbTableOrView1)
table or view where each row is a subject |
void |
setDefaultSortCol(String defaultSortCol1)
search queries will sort by this. |
void |
setDescriptionCol(String descriptionCol1)
|
void |
setLowerSearchCol(String lowerSearchCol1)
for searches (not by id or identifier), this is the col which holds the search terms, in lower case |
void |
setNameCol(String nameCol1)
column which holds the subject name |
void |
setSubjectAttributeColToName(Map<String,String> subjectAttributeColToName1)
map of col to attribute name // |
void |
setSubjectIdCol(String subjectIdCol1)
column which holds the subject id |
void |
setSubjectIdentifierCols(Set<String> subjectIdentifierCols1)
cols which are used in a findByIdentifier query |
Methods inherited from class edu.internet2.middleware.subject.provider.JDBCSourceAdapter |
---|
getDescriptionAttributeName, getNameAttributeName, getSubject, getSubjectByIdentifier, getSubjectIDAttributeName, getSubjectTypeString, init, loadDriver, printConfig |
Methods inherited from class edu.internet2.middleware.subject.provider.BaseSourceAdapter |
---|
addAttribute, addInitParam, addSubjectType, equals, getId, getInitParam, getInitParams, getName, getSubjectByIdOrIdentifier, getSubjectsByIdentifiers, getSubjectsByIds, getSubjectsByIdsOrIdentifiers, getSubjectType, getSubjectTypes, hashCode, loadSearch, setId, setName |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDBCSourceAdapter2()
public JDBCSourceAdapter2(String id, String name)
id
- name
- Method Detail |
---|
public void checkConfig()
Source
checkConfig
in interface Source
checkConfig
in class JDBCSourceAdapter
Source.checkConfig()
public String getDbTableOrView()
public Subject getSubject(String id, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
JDBCSourceAdapter
getSubject
in interface Source
getSubject
in class JDBCSourceAdapter
exceptionIfNull
- if SubjectNotFoundException should be
throws if the subject is null, or if null should be returned
SubjectNotFoundException
SubjectNotUniqueException
JDBCSourceAdapter.getSubject(java.lang.String, boolean)
public Set<Subject> search(String searchValue)
JDBCSourceAdapter
search
in interface Source
search
in class JDBCSourceAdapter
JDBCSourceAdapter.search(java.lang.String)
public Subject getSubjectByIdentifier(String id, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
BaseSourceAdapter
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class JDBCSourceAdapter
SubjectNotFoundException
SubjectNotUniqueException
JDBCSourceAdapter.getSubjectByIdentifier(java.lang.String, boolean)
public void setDbTableOrView(String dbTableOrView1)
dbTableOrView1
- public String getSubjectIdCol()
public void setSubjectIdCol(String subjectIdCol1)
subjectIdCol1
- public String getNameCol()
public void setNameCol(String nameCol1)
nameCol1
- public String getDescriptionCol()
public void setDescriptionCol(String descriptionCol1)
descriptionCol1
- public String getLowerSearchCol()
public void setLowerSearchCol(String lowerSearchCol1)
lowerSearchCol1
- public String getDefaultSortCol()
public void setDefaultSortCol(String defaultSortCol1)
defaultSortCol1
- public Set<String> getSubjectIdentifierCols()
public void setSubjectIdentifierCols(Set<String> subjectIdentifierCols1)
subjectIdentifierCols1
- public Map<String,String> getSubjectAttributeColToName()
public void setSubjectAttributeColToName(Map<String,String> subjectAttributeColToName1)
subjectAttributeColToName1
- public static void main(String[] args) throws Exception
args
-
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |