|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kew.docsearch.StandardDocumentSearchGenerator
public class StandardDocumentSearchGenerator
Field Summary |
---|
Fields inherited from interface org.kuali.rice.kew.docsearch.DocumentSearchGenerator |
---|
DEFAULT_SEARCH_RESULT_CAP |
Constructor Summary | |
---|---|
StandardDocumentSearchGenerator()
|
|
StandardDocumentSearchGenerator(List<SearchableAttribute> searchableAttributes)
|
Method Summary | |
---|---|
void |
addChildDocumentTypes(StringBuffer whereSql,
Collection<DocumentType> childDocumentTypes)
|
void |
addDocumentTypeLikeNameToSearchOn(StringBuffer whereSql,
String documentTypeName,
String clause)
|
void |
addDocumentTypeNameToSearchOn(StringBuffer whereSql,
String documentTypeName)
|
void |
addDocumentTypeNameToSearchOn(StringBuffer whereSql,
String documentTypeName,
String clause)
|
void |
addErrorMessageToList(List<WorkflowServiceError> errors,
String message)
|
void |
addExtraDocumentTypesToSearch(StringBuffer whereSql,
DocumentType docType)
|
DocSearchCriteriaDTO |
clearSearch(DocSearchCriteriaDTO searchCriteria)
|
StringBuffer |
constructWhereClauseDateElement(String clauseStarter,
String queryTableColumnName,
boolean inclusive,
boolean valueIsLowerBound,
String dateValueToSearch)
|
StringBuffer |
constructWhereClauseDateElement(String clauseStarter,
String queryTableColumnName,
boolean inclusive,
boolean valueIsLowerBound,
String dateValueToSearch,
boolean isAllowInlineRange)
|
StringBuffer |
constructWhereClauseElement(String clauseStarter,
String queryTableColumnName,
String operand,
String valueToSearch,
String valuePrefix,
String valueSuffix)
|
String |
establishDateString(String fromDate,
String toDate,
String tableName,
String tableAlias,
String colName,
String whereStatementClause)
|
void |
filterOutNonQueryAttributes()
TODO we should probably clean this up some, but we are going to exclude those KeyLabelPairs that have a null label. |
String |
generateFinalSQL(QueryComponent searchSQL,
String docHeaderTableAlias,
String standardSqlPrefix,
String standardSqlSuffix)
Deprecated. As of version 0.9.3 this method is no longer used. This method had been used to create multiple SQL queries if using searchable attributes and use the sql UNION function to join the queries. The replacement method #generateFinalSQL(QueryComponent, String, String) is now used instead. |
StringBuilder |
generateSearchableAttributeDefaultWhereSql(SearchAttributeCriteriaComponent criteriaComponent,
String queryTableColumnName)
|
StringBuffer |
generateSearchableAttributeFromSql(SearchableAttributeValue attributeValue,
String tableIdentifier)
|
QueryComponent |
generateSearchableAttributeRangeSql(String searchAttributeKeyName,
List<SearchAttributeCriteriaComponent> criteriaComponents,
String whereSqlStarter,
int tableIndex)
|
QueryComponent |
generateSearchableAttributeSql(SearchAttributeCriteriaComponent criteriaComponent,
String whereSqlStarter,
int tableIndex)
|
StringBuffer |
generateSearchableAttributeWhereClauseJoin(String whereSqlStarter,
String tableIdentifier,
String attributeTableKeyColumnName)
|
String |
generateSearchSql(DocSearchCriteriaDTO searchCriteria)
|
QueryComponent |
generateSqlForSearchableAttributeValue(SearchableAttributeValue attributeValue,
List<String> tableAliasComponentNames,
String docHeaderTableAlias)
Deprecated. As of version 0.9.3 this method is no longer used. This method had been used to generate SQL to return searchable attributes using left outer joins. The new mechanism to get search attributes from the database is to call each search attribute table individually in the populateRowSearchableAttributes(DocSearchDTO, Statement, ResultSet)
method. |
String |
getAppDocIdSql(String appDocId,
String whereClausePredicatePrefix)
|
String |
getAppDocStatusSql(String appDocStatus,
String whereClausePredicatePrefix,
int statusTransitionWhereClauseLength)
This method generates the where clause fragment related to Application Document Status. |
String |
getApproverSql(String approver,
String whereClausePredicatePrefix)
|
DocSearchCriteriaDTO |
getCriteria()
|
String |
getDateApprovedSql(String fromDateApproved,
String toDateApproved,
String whereClausePredicatePrefix)
|
String |
getDateCreatedSql(String fromDateCreated,
String toDateCreated,
String whereClausePredicatePrefix)
|
String |
getDateFinalizedSql(String fromDateFinalized,
String toDateFinalized,
String whereClausePredicatePrefix)
|
String |
getDateLastModifiedSql(String fromDateLastModified,
String toDateLastModified,
String whereClausePredicatePrefix)
|
DatabasePlatform |
getDbPlatform()
|
String |
getDocRouteNodeSql(String documentTypeFullName,
String docRouteLevel,
String docRouteLevelLogic,
String whereClausePredicatePrefix)
|
String |
getDocRouteStatusSql(String docRouteStatuses,
String whereClausePredicatePrefix)
|
String |
getDocSearchSQL()
|
String |
getDocTitleSql(String docTitle,
String whereClausePredicatePrefix)
|
String |
getDocTypeFullNameWhereSql(String docTypeFullName,
String whereClausePredicatePrefix)
|
int |
getDocumentSearchResultSetLimit()
|
String |
getGeneratedPredicatePrefix(int whereClauseSize)
|
String |
getInitiatorSql(String initiator,
String whereClausePredicatePrefix)
|
MessageMap |
getMessageMap(DocSearchCriteriaDTO searchCriteria)
|
String |
getRouteHeaderIdSql(String routeHeaderId,
String whereClausePredicatePrefix,
String tableAlias)
|
SearchAttributeCriteriaComponent |
getSearchableAttributeByFieldName(String name)
|
QueryComponent |
getSearchableAttributeJoinSql(SearchableAttributeValue attributeValue,
String tableIdentifier,
String whereSqlStarter,
String attributeTableKeyColumnName)
|
List<SearchableAttribute> |
getSearchableAttributes()
|
QueryComponent |
getSearchableAttributeSql(List<SearchAttributeCriteriaComponent> searchableAttributes,
String whereClausePredicatePrefix)
|
String |
getSearchingUser()
|
SqlBuilder |
getSqlBuilder()
|
String |
getSqlOperand(boolean rangeSearch,
boolean inclusive,
boolean valueIsLowerBound,
boolean usingWildcards)
For the following we first check for a ranged search because a ranged search does not allow for wildcards |
String |
getStatusTransitionDateSql(String fromStatusTransitionDate,
String toStatusTransitionDate,
String whereClausePredicatePrefix)
|
DocumentType |
getValidDocumentType(String documentTypeFullName)
|
String |
getViewerSql(String viewer,
String whereClausePredicatePrefix)
|
String |
getWorkgroupViewerSql(String id,
String workgroupName,
String whereClausePredicatePrefix)
|
void |
handleMultipleDocumentRows(DocSearchDTO existingRow,
DocSearchDTO newRow)
Handles multiple document rows by collapsing them and their data into the searchable attribute columns. |
boolean |
isProcessResultSet()
This method returns if processResultSet should be called. |
protected boolean |
isUsingAtLeastOneSearchAttribute()
A helper method for determining whether any searchable attributes are in use for the search. |
List<WorkflowServiceError> |
performPreSearchConditions(String principalId,
DocSearchCriteriaDTO searchCriteria)
|
void |
populateRowSearchableAttributes(DocSearchDTO docCriteriaDTO,
Statement searchAttributeStatement)
This method performs searches against the search attribute value tables (see classes implementing SearchableAttributeValue ) to get data to fill in search attribute values on the given docCriteriaDTO parameter |
void |
populateRowSearchableAttributes(DocSearchDTO docCriteriaDTO,
Statement searchAttributeStatement,
ResultSet rs)
Deprecated. As of version 0.9.3 this method is no longer used. Method populateRowSearchableAttributes(DocSearchDTO, Statement) is being used instead. |
List<DocSearchDTO> |
processResultSet(Statement searchAttributeStatement,
ResultSet resultSet,
DocSearchCriteriaDTO searchCriteria)
Deprecated. Removed as of version 0.9.3. Use processResultSet(Statement, ResultSet, DocSearchCriteriaDTO, String) instead. |
List<DocSearchDTO> |
processResultSet(Statement searchAttributeStatement,
ResultSet resultSet,
DocSearchCriteriaDTO searchCriteria,
String principalId)
This method processes search results in the given resultSet into DocSearchDTO objects |
DocSearchDTO |
processRow(Statement searchAttributeStatement,
ResultSet rs)
|
void |
setCriteria(DocSearchCriteriaDTO criteria)
|
void |
setProcessResultSet(boolean isProcessResultSet)
|
void |
setSearchableAttributes(List<SearchableAttribute> searchableAttributes)
|
void |
setSearchingUser(String searchingUser)
|
void |
setSqlBuilder(SqlBuilder sqlBuilder)
|
List<WorkflowAttributeValidationError> |
validateSearchableAttribute(SearchableAttribute searchableAttribute,
Map searchAttributesParameterMap,
DocumentSearchContext documentSearchContext)
|
List<WorkflowServiceError> |
validateSearchableAttributes(DocSearchCriteriaDTO searchCriteria)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardDocumentSearchGenerator()
public StandardDocumentSearchGenerator(List<SearchableAttribute> searchableAttributes)
searchableAttributes
- in a listMethod Detail |
---|
public DocSearchCriteriaDTO getCriteria()
public void setCriteria(DocSearchCriteriaDTO criteria)
public List<SearchableAttribute> getSearchableAttributes()
public void setSearchableAttributes(List<SearchableAttribute> searchableAttributes)
public String getSearchingUser()
public void setSearchingUser(String searchingUser)
setSearchingUser
in interface DocumentSearchGenerator
public DocSearchCriteriaDTO clearSearch(DocSearchCriteriaDTO searchCriteria)
clearSearch
in interface DocumentSearchGenerator
public List<WorkflowServiceError> performPreSearchConditions(String principalId, DocSearchCriteriaDTO searchCriteria)
performPreSearchConditions
in interface DocumentSearchGenerator
public SearchAttributeCriteriaComponent getSearchableAttributeByFieldName(String name)
public void addErrorMessageToList(List<WorkflowServiceError> errors, String message)
public String generateSearchSql(DocSearchCriteriaDTO searchCriteria)
generateSearchSql
in interface DocumentSearchGenerator
public DocumentType getValidDocumentType(String documentTypeFullName)
public List<WorkflowServiceError> validateSearchableAttributes(DocSearchCriteriaDTO searchCriteria)
validateSearchableAttributes
in interface DocumentSearchGenerator
public List<WorkflowAttributeValidationError> validateSearchableAttribute(SearchableAttribute searchableAttribute, Map searchAttributesParameterMap, DocumentSearchContext documentSearchContext)
public QueryComponent getSearchableAttributeSql(List<SearchAttributeCriteriaComponent> searchableAttributes, String whereClausePredicatePrefix)
public QueryComponent generateSearchableAttributeSql(SearchAttributeCriteriaComponent criteriaComponent, String whereSqlStarter, int tableIndex)
public QueryComponent generateSearchableAttributeRangeSql(String searchAttributeKeyName, List<SearchAttributeCriteriaComponent> criteriaComponents, String whereSqlStarter, int tableIndex)
public StringBuilder generateSearchableAttributeDefaultWhereSql(SearchAttributeCriteriaComponent criteriaComponent, String queryTableColumnName)
public QueryComponent getSearchableAttributeJoinSql(SearchableAttributeValue attributeValue, String tableIdentifier, String whereSqlStarter, String attributeTableKeyColumnName)
public StringBuffer generateSearchableAttributeWhereClauseJoin(String whereSqlStarter, String tableIdentifier, String attributeTableKeyColumnName)
public StringBuffer generateSearchableAttributeFromSql(SearchableAttributeValue attributeValue, String tableIdentifier)
public StringBuffer constructWhereClauseDateElement(String clauseStarter, String queryTableColumnName, boolean inclusive, boolean valueIsLowerBound, String dateValueToSearch)
public StringBuffer constructWhereClauseDateElement(String clauseStarter, String queryTableColumnName, boolean inclusive, boolean valueIsLowerBound, String dateValueToSearch, boolean isAllowInlineRange)
public StringBuffer constructWhereClauseElement(String clauseStarter, String queryTableColumnName, String operand, String valueToSearch, String valuePrefix, String valueSuffix)
public String getSqlOperand(boolean rangeSearch, boolean inclusive, boolean valueIsLowerBound, boolean usingWildcards)
public List<DocSearchDTO> processResultSet(Statement searchAttributeStatement, ResultSet resultSet, DocSearchCriteriaDTO searchCriteria) throws SQLException
processResultSet(Statement, ResultSet, DocSearchCriteriaDTO, String)
instead.
processResultSet
in interface DocumentSearchGenerator
SQLException
public List<DocSearchDTO> processResultSet(Statement searchAttributeStatement, ResultSet resultSet, DocSearchCriteriaDTO searchCriteria, String principalId) throws SQLException
DocumentSearchGenerator
resultSet
into DocSearchDTO
objects
processResultSet
in interface DocumentSearchGenerator
resultSet
- criteria
-
SQLException
public void handleMultipleDocumentRows(DocSearchDTO existingRow, DocSearchDTO newRow)
public DocSearchDTO processRow(Statement searchAttributeStatement, ResultSet rs) throws SQLException
SQLException
public void populateRowSearchableAttributes(DocSearchDTO docCriteriaDTO, Statement searchAttributeStatement) throws SQLException
SearchableAttributeValue
) to get data to fill in search attribute values on the given docCriteriaDTO parameter
docCriteriaDTO
- - document search result object getting search attributes added to itsearchAttributeStatement
- - statement being used to call the database for queries
SQLException
@Deprecated public void populateRowSearchableAttributes(DocSearchDTO docCriteriaDTO, Statement searchAttributeStatement, ResultSet rs) throws SQLException
populateRowSearchableAttributes(DocSearchDTO, Statement)
is being used instead.
SQLException
public String getDocSearchSQL()
@Deprecated public String generateFinalSQL(QueryComponent searchSQL, String docHeaderTableAlias, String standardSqlPrefix, String standardSqlSuffix)
#generateFinalSQL(QueryComponent, String, String)
is now used instead.
@Deprecated public QueryComponent generateSqlForSearchableAttributeValue(SearchableAttributeValue attributeValue, List<String> tableAliasComponentNames, String docHeaderTableAlias)
populateRowSearchableAttributes(DocSearchDTO, Statement, ResultSet)
method.
public String getRouteHeaderIdSql(String routeHeaderId, String whereClausePredicatePrefix, String tableAlias)
public String getInitiatorSql(String initiator, String whereClausePredicatePrefix)
public String getDocTitleSql(String docTitle, String whereClausePredicatePrefix)
public String getAppDocIdSql(String appDocId, String whereClausePredicatePrefix)
public String getDateCreatedSql(String fromDateCreated, String toDateCreated, String whereClausePredicatePrefix)
public String getDateApprovedSql(String fromDateApproved, String toDateApproved, String whereClausePredicatePrefix)
public String getDateFinalizedSql(String fromDateFinalized, String toDateFinalized, String whereClausePredicatePrefix)
public String getDateLastModifiedSql(String fromDateLastModified, String toDateLastModified, String whereClausePredicatePrefix)
public String getStatusTransitionDateSql(String fromStatusTransitionDate, String toStatusTransitionDate, String whereClausePredicatePrefix)
public String getViewerSql(String viewer, String whereClausePredicatePrefix)
public String getWorkgroupViewerSql(String id, String workgroupName, String whereClausePredicatePrefix)
public String getApproverSql(String approver, String whereClausePredicatePrefix)
public String getDocTypeFullNameWhereSql(String docTypeFullName, String whereClausePredicatePrefix)
public void addChildDocumentTypes(StringBuffer whereSql, Collection<DocumentType> childDocumentTypes)
public void addExtraDocumentTypesToSearch(StringBuffer whereSql, DocumentType docType)
public void addDocumentTypeNameToSearchOn(StringBuffer whereSql, String documentTypeName)
public void addDocumentTypeNameToSearchOn(StringBuffer whereSql, String documentTypeName, String clause)
public void addDocumentTypeLikeNameToSearchOn(StringBuffer whereSql, String documentTypeName, String clause)
public String getDocRouteNodeSql(String documentTypeFullName, String docRouteLevel, String docRouteLevelLogic, String whereClausePredicatePrefix)
public String getDocRouteStatusSql(String docRouteStatuses, String whereClausePredicatePrefix)
public String getAppDocStatusSql(String appDocStatus, String whereClausePredicatePrefix, int statusTransitionWhereClauseLength)
appDocStatus
- whereClausePredicatePrefix
- statusTransitionWhereClauseLength
-
public void filterOutNonQueryAttributes()
public String getGeneratedPredicatePrefix(int whereClauseSize)
public String establishDateString(String fromDate, String toDate, String tableName, String tableAlias, String colName, String whereStatementClause)
public int getDocumentSearchResultSetLimit()
getDocumentSearchResultSetLimit
in interface DocumentSearchGenerator
public boolean isProcessResultSet()
DocumentSearchGenerator
isProcessResultSet
in interface DocumentSearchGenerator
public void setProcessResultSet(boolean isProcessResultSet)
setProcessResultSet
in interface DocumentSearchGenerator
public DatabasePlatform getDbPlatform()
public MessageMap getMessageMap(DocSearchCriteriaDTO searchCriteria)
getMessageMap
in interface DocumentSearchGenerator
public SqlBuilder getSqlBuilder()
public void setSqlBuilder(SqlBuilder sqlBuilder)
sqlBuilder
- the sqlBuilder to setprotected boolean isUsingAtLeastOneSearchAttribute()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |