com.atlassian.confluence.user.crowd.jira.search
Enum QueryBuilder

java.lang.Object
  extended by java.lang.Enum<QueryBuilder>
      extended by com.atlassian.confluence.user.crowd.jira.search.QueryBuilder
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<QueryBuilder>

public enum QueryBuilder
extends java.lang.Enum<QueryBuilder>

Does the heavy work of converting a Crowd search query into an SQL query. There are separate query builders for each query "target": users, groups, user->group membership and group->user membership.


Enum Constant Summary
GROUP
           
GROUP_MEMBERSHIP
           
USER
           
USER_MEMBERSHIP
           
 
Method Summary
abstract  org.springframework.jdbc.core.RowMapper getNameOnlyRowMapper()
           
protected abstract  java.lang.String getNameOnlySqlQuery(WhereClause where)
           
abstract  org.springframework.jdbc.core.RowMapper getObjectRowMapper(long directoryId)
           
protected abstract  java.lang.String getObjectSqlQuery(WhereClause where)
           
protected abstract  java.lang.String getPropertyName(com.atlassian.crowd.search.query.entity.restriction.Property property)
           
protected abstract  boolean isMatchEverything(com.atlassian.crowd.search.query.entity.restriction.TermRestriction restriction)
           
 WhereClause toWhereClause(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction)
           
static QueryBuilder valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static QueryBuilder[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

USER

public static final QueryBuilder USER

GROUP

public static final QueryBuilder GROUP

USER_MEMBERSHIP

public static final QueryBuilder USER_MEMBERSHIP

GROUP_MEMBERSHIP

public static final QueryBuilder GROUP_MEMBERSHIP
Method Detail

values

public static QueryBuilder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (QueryBuilder c : QueryBuilder.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static QueryBuilder valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getNameOnlyRowMapper

public abstract org.springframework.jdbc.core.RowMapper getNameOnlyRowMapper()

getObjectRowMapper

public abstract org.springframework.jdbc.core.RowMapper getObjectRowMapper(long directoryId)

toWhereClause

public WhereClause toWhereClause(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction)

getObjectSqlQuery

protected abstract java.lang.String getObjectSqlQuery(WhereClause where)

getNameOnlySqlQuery

protected abstract java.lang.String getNameOnlySqlQuery(WhereClause where)

getPropertyName

protected abstract java.lang.String getPropertyName(com.atlassian.crowd.search.query.entity.restriction.Property property)

isMatchEverything

protected abstract boolean isMatchEverything(com.atlassian.crowd.search.query.entity.restriction.TermRestriction restriction)


Copyright © 2003-2014 Atlassian. All Rights Reserved.