com.endeca.portal.lql
Class LQLBuilder

java.lang.Object
  extended by com.endeca.portal.lql.LQLBuilder

public class LQLBuilder
extends java.lang.Object


Nested Class Summary
static class LQLBuilder.AdditiveOp
          Enum detailing mathematical operations that can be used in LQL queries.
static class LQLBuilder.CompareOp
          Enum detailing operations usable in the LQL ComparisonExpression.
static class LQLBuilder.CubeRollupType
          Enum detailing CubeRollup types that can be used in distinguishing the type when executes rollup/cube function.
static class LQLBuilder.Function
          Enum detailing functions usable in the LQL FunctionCallExpression.
static class LQLBuilder.LQLMDEXType
          Represents types that come from MDEX records generated by LQL.
static class LQLBuilder.MultiplicativeOp
           
 
Constructor Summary
LQLBuilder()
           
 
Method Summary
static com.endeca.mdex.eql_parser.types.GroupingSet getSimpleGroupingSet(com.endeca.mdex.eql_parser.types.Group group)
          Returns the standard GroupBy list grouping set for a given group
static com.endeca.mdex.eql_parser.types.AdditiveExpression makeAdditiveExpression(com.endeca.mdex.eql_parser.types.ExpressionBase left, com.endeca.mdex.eql_parser.types.ExpressionBase right, LQLBuilder.AdditiveOp op)
          Creates an AdditiveExpression with the give left expression and right expression, using the given math operation.
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction, com.endeca.mdex.eql_parser.types.AttributeRefExpression key, boolean isSingleAssign)
          According to the isSingleAssign property, change the aggregation method as the rules below: When apply SET aggregation method on multi-assign attributes, change the aggregation method to SET_UNIONS(key) When apply COUNT_DISTINCT aggregation method on multi-assign attributes, change the aggregation method to CARDINALITY(SET_UNIONS(key))
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction, java.lang.String attributeKey, boolean isSingleAssign)
           
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction, java.lang.String attributeKey, boolean isSingleAssign, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key, java.math.BigInteger depth)
          Creates an ancestor FunctionCallExpression for the given attribute key and a depth.
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key, java.math.BigInteger depth, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key, java.lang.String statementKey, java.math.BigInteger depth)
           
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key, java.lang.String statementKey, java.math.BigInteger depth, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.AndExpression makeAnd(com.endeca.mdex.eql_parser.types.ExpressionBase left, com.endeca.mdex.eql_parser.types.ExpressionBase right)
          Creates an AndExpression representing a logical AND of the two sub expressions.
static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey)
          Creates an AttributeRefExpression that is used when an attribute key is needed.
static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey, java.lang.String statementKey)
          Creates an AttributeRefExpression that is used when an attribute key is needed.
static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey, java.lang.String statementKey, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.BooleanLiteral makeBooleanLiteral(boolean value)
           
static com.endeca.mdex.eql_parser.types.BooleanLiteral makeBooleanLiteral(java.lang.String value)
           
static com.endeca.mdex.eql_parser.types.ComparisonExpression makeComparisonExpression(com.endeca.mdex.eql_parser.types.ExpressionBase left, com.endeca.mdex.eql_parser.types.ExpressionBase right, LQLBuilder.CompareOp op)
          Creates a ComparisonExpression comparing a left expression with a right expression, using the given compare operation.
static com.endeca.mdex.eql_parser.types.ExpressionBase makeComparisonOrQuantifierExpression(SemanticView view, com.endeca.mdex.eql_parser.types.AttributeRefExpression attributeRef, com.endeca.mdex.eql_parser.types.ExpressionBase right, LQLBuilder.CompareOp op, boolean isExistential)
          Create either a ComparisonExpression, a ExistentialQuantifierExpression, or a UniversalQuantifierExpression depending on whether the provided attribute is multi-assign.
static com.endeca.mdex.eql_parser.types.DoubleLiteral makeDoubleLiteral(java.lang.Double value)
          Creates a DoubleLiteral for the given value.
static com.endeca.mdex.eql_parser.types.DoubleLiteral makeDoubleLiteral(java.lang.String d)
           
static com.endeca.mdex.eql_parser.types.ComparisonExpression makeEquals(java.lang.String key, com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
          Convenience function to create a ComparrisonExpression representing "key = " where the type of the attribute represented by key matches the type computed by the expression.
static com.endeca.mdex.eql_parser.types.ComparisonExpression makeEquals(java.lang.String key, com.endeca.mdex.eql_parser.types.ExpressionBase rhs, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.ExistentialQuantifierExpression makeExistentialQuantifierExpression(com.endeca.mdex.eql_parser.types.ExpressionBase universe, com.endeca.mdex.eql_parser.types.ExpressionBase predicate, java.lang.String boundVariable)
          Creates a ExistentialQuantifierExpression, which tests for the existence of some value x in a universe satisfying a condition (predicate).
static com.endeca.mdex.eql_parser.types.From makeFrom(com.endeca.mdex.eql_parser.types.SourceBase source)
          Creates a LQL From object with the given source.
static com.endeca.mdex.eql_parser.types.From makeFrom(java.lang.String statementName)
          Convenience function to create an LQL From denoting a named statement.
static com.endeca.mdex.eql_parser.types.FullJoin makeFullJoin(com.endeca.mdex.eql_parser.types.SourceBase left, com.endeca.mdex.eql_parser.types.SourceBase right, com.endeca.mdex.eql_parser.types.ExpressionBase condition)
          Creates an FullJoin that can be used as part of a From.
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeFunctionCallExpression(LQLBuilder.Function f, com.endeca.mdex.eql_parser.types.ExpressionBase... args)
          Helper method for making FunctionCallExpressions.
static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeFunctionCallExpression(LQLBuilder.Function f, com.endeca.mdex.eql_parser.types.Where w, com.endeca.mdex.eql_parser.types.ExpressionBase... args)
          Helper method for making FunctionCallExpressions.
static com.endeca.mdex.eql_parser.types.Group makeGroupAllGroup()
          Creates a Group containing a single GroupingSet containing an empty GroupBy list which indicates that it is a group all
static com.endeca.mdex.eql_parser.types.GroupBy makeGroupBy(java.lang.String key)
          Creates a GroupBy for the given attribute key.
static com.endeca.mdex.eql_parser.types.GroupBy makeGroupBy(java.lang.String key, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key)
           
static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key, SemanticView view, java.util.Locale currentLocale)
          Creates a GroupByMembers for the given attribute key.
static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key, java.lang.String alias)
           
static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key, java.lang.String alias, SemanticView view, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(SemanticView view, java.util.Locale currentLocale, java.lang.String... groupKeys)
          Creates a GroupingSet containing one groupByMemebers for each key in the list of groupKeys
static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(SemanticView view, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(java.lang.String membersPrefix, SemanticView view, java.util.Locale currentLocale, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(java.lang.String membersPrefix, SemanticView view, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingSet(AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingSet(java.lang.String... groupKeys)
          Creates a GroupingSet containing one GroupBy for each key in the list of groupKeys
static com.endeca.mdex.eql_parser.types.Having makeHaving(com.endeca.mdex.eql_parser.types.ExpressionBase filter)
          Creates a Having object with the given filter.
static com.endeca.mdex.eql_parser.types.InExpression makeInExpression(java.lang.String targetStatementKey, java.util.List<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> lookupValues)
          Creates a InExpression with the given target statement and lookup values.
static com.endeca.mdex.eql_parser.types.InnerJoin makeInnerJoin(com.endeca.mdex.eql_parser.types.SourceBase left, com.endeca.mdex.eql_parser.types.SourceBase right, com.endeca.mdex.eql_parser.types.ExpressionBase condition)
          Creates an InnerJoin that can be used as part of a From.
static com.endeca.mdex.eql_parser.types.IntegerLiteral makeIntegerLiteral(java.math.BigInteger value)
           
static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(com.endeca.mdex.eql_parser.types.AttributeRefExpression attributeKey, boolean isEmpty)
           
static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(java.lang.String attributeKey, boolean isEmpty)
          Creates a SetEmptinessExpression equivalent to IS_EMPTY(operand) or IS_NOT_EMPTY(operand).
static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(java.lang.String attributeKey, boolean isEmpty, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.NullnessExpression makeIsNull(boolean isNull, com.endeca.mdex.eql_parser.types.ExpressionBase operand)
          Creates a NullnessExpression equivalent to IS_NULL(operand).
static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsNullOrEmpty(SemanticView view, java.lang.String attributeKey, boolean isNullOrEmpty)
          Create an IS NULL or IS_EMPTY expression depending on whether the provided attribute is multi-assign
static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsNullOrEmpty(SemanticView view, java.lang.String attributeKey, java.lang.String statementKey, boolean isNullOrEmpty)
           
static com.endeca.mdex.eql_parser.types.LeftJoin makeLeftJoin(com.endeca.mdex.eql_parser.types.SourceBase left, com.endeca.mdex.eql_parser.types.SourceBase right, com.endeca.mdex.eql_parser.types.ExpressionBase condition)
          Creates an InnerJoin that can be used as part of a From.
static com.endeca.mdex.eql_parser.types.ExpressionBase makeLiteral(java.lang.String mdexType, java.lang.String value)
          Create an literal for a value based on its type.
static com.endeca.mdex.eql_parser.types.ExpressionBase makeLiteral(java.lang.String mdexType, java.lang.String value, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.LookupExpression makeLookupExpression(java.lang.String targetStatementKey, java.lang.String targetAttributeKey, java.util.List<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> lookupValues)
          Creates a LookupExpression with the given target statement, target attribute key, and lookup values.
static com.endeca.mdex.eql_parser.types.LookupExpression makeLookupExpression(java.lang.String targetStatementKey, java.lang.String targetAttributeKey, java.util.List<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> lookupValues, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.MultiplicativeExpression makeMultiplicativeExpression(com.endeca.mdex.eql_parser.types.ExpressionBase leftOperand, com.endeca.mdex.eql_parser.types.ExpressionBase rightOperand, LQLBuilder.MultiplicativeOp op)
          Creates a multiplicative expression with the given left hand expression, right hand expression, and the mathematical operation to be performed.
static com.endeca.mdex.eql_parser.types.OrExpression makeOr(com.endeca.mdex.eql_parser.types.ExpressionBase left, com.endeca.mdex.eql_parser.types.ExpressionBase right)
          Creates an ORExpression representing a logical OR of the two sub expressions.
static com.endeca.mdex.eql_parser.types.OrderBy makeOrderBy(java.lang.String attributeKey, boolean isAscending)
          Creates an OrderBy on the given attribute key with the given direction.
static com.endeca.mdex.eql_parser.types.OrderBy makeOrderBy(java.lang.String attributeKey, boolean isAscending, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(com.endeca.mdex.eql_parser.types.OrderBy... orderBys)
          Creates an OrderByList given a set of OrderBy objects
static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(java.lang.String attributeKey, boolean isAscending)
          Creates an OrderByList containing one OrderBy for the given attribute key and direction.
static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(java.lang.String attributeKey, boolean isAscending, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.Paging makePaging(java.math.BigInteger offset, java.math.BigInteger count)
          Creates a Paging object specifying which records should be returned by an LQL query.
static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String attributeKey)
          Convenience function to create a new LQL Select object that selects a particular attribute key.
static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String attributeKey, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String name, com.endeca.mdex.eql_parser.types.ExpressionBase expression)
          Creates a new LQL Select object with the given name and expression.
static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String name, com.endeca.mdex.eql_parser.types.ExpressionBase expression, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.SetMembershipExpression makeSetMembershipExpression(com.endeca.mdex.eql_parser.types.ExpressionBase left, com.endeca.mdex.eql_parser.types.ExpressionBase right)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroup(AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroup(java.lang.String... groupKeys)
          Creates a Group containing a single GroupingSet containing one GroupBy for each key in the list of groupKeys
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(SemanticView view, java.util.Locale currentLocale, java.lang.String... groupKeys)
          Creates a Group containing a single GroupingSet containing one groupByMemebers for each key in the list of groupKeys
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(SemanticView view, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(java.lang.String membersPrefix, SemanticView view, java.util.Locale currentLocale, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(java.lang.String membersPrefix, SemanticView view, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(SemanticView view, java.util.Locale currentLocale, LQLBuilder.CubeRollupType cubeRollUpName, java.lang.String... groupKeys)
          Creates a Group containing a CUBE/ROLLUP GroupingSet containing one GroupingSet for each key in the list of groupKeys and one GroupByMembers for each GroupingSet
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(SemanticView view, LQLBuilder.CubeRollupType cubeRollUpName, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(java.lang.String membersPrefix, SemanticView view, java.util.Locale currentLocale, LQLBuilder.CubeRollupType cubeRollUpName, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(java.lang.String membersPrefix, SemanticView view, LQLBuilder.CubeRollupType cubeRollUpName, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupWithCubeRollUp(AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale, LQLBuilder.CubeRollupType type, java.lang.String... groupKeys)
           
static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupWithCubeRollUp(LQLBuilder.CubeRollupType type, java.lang.String... groupKeys)
          Creates a Group containing a CUBE/ROLLUP GroupingSet containing one GroupingSet for each key in the list of groupKeys and one GroupBy for each GroupingSet
static com.endeca.mdex.eql_parser.types.Statement makeStatement(java.lang.String statementKey, boolean isReturnTable)
          Convenience function to create a new Statement object
static com.endeca.mdex.eql_parser.types.StatementQualifier makeStatementQualifier(java.lang.String statementKey)
          Create a statement qualifier
static com.endeca.mdex.eql_parser.types.StatementSource makeStatementSource(java.lang.String statementKey)
          Creates a StatementSouce to be used in a From or an InnerJoin.
static com.endeca.mdex.eql_parser.types.StatementSource makeStatementSource(java.lang.String statementKey, java.lang.String filter)
           
static com.endeca.mdex.eql_parser.types.StringLiteral makeStringLiteral(java.lang.String value)
           
static com.endeca.mdex.eql_parser.types.StringLiteral makeStringLiteral(java.lang.String value, AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
           
static com.endeca.mdex.eql_parser.types.UniversalQuantifierExpression makeUniversalQuantifierExpression(com.endeca.mdex.eql_parser.types.ExpressionBase universe, com.endeca.mdex.eql_parser.types.ExpressionBase predicate, java.lang.String boundVariable)
          Creates a UniversalQuantifierExpression, which tests for the existence of every value x in a universe satisfying a condition (predicate).
static com.endeca.mdex.eql_parser.types.Where makeWhere(com.endeca.mdex.eql_parser.types.ExpressionBase filter)
          Creates a Where that can be set on an LQL statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LQLBuilder

public LQLBuilder()
Method Detail

makeStatement

public static com.endeca.mdex.eql_parser.types.Statement makeStatement(java.lang.String statementKey,
                                                                       boolean isReturnTable)
Convenience function to create a new Statement object

Parameters:
statementKey -
isReturnTable -
Returns:
a new LQL statement with the given key

makeSelect

public static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String attributeKey)
Convenience function to create a new LQL Select object that selects a particular attribute key. An equivalent string form would be "attributeKey AS attributeKey".

Parameters:
attributeKey - Attribute key to select
Returns:
LQL Select object can be added to an LQL Statement's select list

makeSelect

public static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String attributeKey,
                                                                 AttributeKeyConverter attributeKeyConverter,
                                                                 java.util.Locale currentLocale)

makeSelect

public static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String name,
                                                                 com.endeca.mdex.eql_parser.types.ExpressionBase expression)
Creates a new LQL Select object with the given name and expression. An Equivalent string form would be "expression AS name".

Parameters:
name - Name for the selection. This would be used as an attribute key or if referenced in another statement.
expression - An expression to be selected. This can be any expression that returns a value (e.g. a FunctionCallExpression representing "AVG(P_Price)")
Returns:
LQL Select object can be added to an LQL Statement's select list

makeSelect

public static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String name,
                                                                 com.endeca.mdex.eql_parser.types.ExpressionBase expression,
                                                                 AttributeKeyConverter attributeKeyConverter,
                                                                 java.util.Locale currentLocale)

makeStatementSource

public static com.endeca.mdex.eql_parser.types.StatementSource makeStatementSource(java.lang.String statementKey)
Creates a StatementSouce to be used in a From or an InnerJoin. Represents a named LQL statement.

Parameters:
statementKey - Name of an LQL statement
Returns:
StatementSource that can be used in a From or an InnerJoin

makeStatementSource

public static com.endeca.mdex.eql_parser.types.StatementSource makeStatementSource(java.lang.String statementKey,
                                                                                   java.lang.String filter)

makeAttributeRef

public static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey)
Creates an AttributeRefExpression that is used when an attribute key is needed. Denotes a string as a reference to an attribute key either from the MDEX or defined in another statement.

Parameters:
attributeKey - Attribute key to reference.
Returns:
AttributeRefExpression that can be used in places expecting an ExpressionBase

makeAttributeRef

public static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey,
                                                                                       AttributeKeyConverter attributeKeyConverter,
                                                                                       java.util.Locale currentLocale)

makeAttributeRef

public static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey,
                                                                                       java.lang.String statementKey)
Creates an AttributeRefExpression that is used when an attribute key is needed. Denotes a string as a reference to an attribute key either from the MDEX or defined in another statement.

Parameters:
attributeKey - Attribute key to reference.
Returns:
AttributeRefExpression that can be used in places expecting an ExpressionBase

makeAttributeRef

public static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey,
                                                                                       java.lang.String statementKey,
                                                                                       AttributeKeyConverter attributeKeyConverter,
                                                                                       java.util.Locale currentLocale)

makeLookupExpression

public static com.endeca.mdex.eql_parser.types.LookupExpression makeLookupExpression(java.lang.String targetStatementKey,
                                                                                     java.lang.String targetAttributeKey,
                                                                                     java.util.List<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> lookupValues)
Creates a LookupExpression with the given target statement, target attribute key, and lookup values.

Parameters:
targetStatementKey -
targetAttributeKey -
lookupValues -
Returns:
a lookup expression

makeLookupExpression

public static com.endeca.mdex.eql_parser.types.LookupExpression makeLookupExpression(java.lang.String targetStatementKey,
                                                                                     java.lang.String targetAttributeKey,
                                                                                     java.util.List<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> lookupValues,
                                                                                     AttributeKeyConverter attributeKeyConverter,
                                                                                     java.util.Locale currentLocale)

makeInExpression

public static com.endeca.mdex.eql_parser.types.InExpression makeInExpression(java.lang.String targetStatementKey,
                                                                             java.util.List<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> lookupValues)
Creates a InExpression with the given target statement and lookup values.

Parameters:
targetStatementKey -
lookupValues -
Returns:
an in expression

makeMultiplicativeExpression

public static com.endeca.mdex.eql_parser.types.MultiplicativeExpression makeMultiplicativeExpression(com.endeca.mdex.eql_parser.types.ExpressionBase leftOperand,
                                                                                                     com.endeca.mdex.eql_parser.types.ExpressionBase rightOperand,
                                                                                                     LQLBuilder.MultiplicativeOp op)
Creates a multiplicative expression with the given left hand expression, right hand expression, and the mathematical operation to be performed.

Parameters:
leftOperand -
rightOperand -
op -
Returns:
an expression multiplying left by right operands

makeSetMembershipExpression

public static com.endeca.mdex.eql_parser.types.SetMembershipExpression makeSetMembershipExpression(com.endeca.mdex.eql_parser.types.ExpressionBase left,
                                                                                                   com.endeca.mdex.eql_parser.types.ExpressionBase right)

makeFrom

public static com.endeca.mdex.eql_parser.types.From makeFrom(java.lang.String statementName)
Convenience function to create an LQL From denoting a named statement.

Parameters:
statementName - Name of the statement to use as a source.
Returns:
From object that can be added to a statement's from list.

makeFrom

public static com.endeca.mdex.eql_parser.types.From makeFrom(com.endeca.mdex.eql_parser.types.SourceBase source)
Creates a LQL From object with the given source. Can be a StatementSource or an InnerJoin.

Parameters:
source - Source to use in the From clause. Can be a StatementSource or an InnerJoin
Returns:
From object that can be added to a statement's from list.

makeInnerJoin

public static com.endeca.mdex.eql_parser.types.InnerJoin makeInnerJoin(com.endeca.mdex.eql_parser.types.SourceBase left,
                                                                       com.endeca.mdex.eql_parser.types.SourceBase right,
                                                                       com.endeca.mdex.eql_parser.types.ExpressionBase condition)
Creates an InnerJoin that can be used as part of a From. Performs an inner join between two sources (either StatementSource or another InnerJoin) according to an expression.

Parameters:
left - Source to join
right - Source to join
condition - Expression to join on. (For example a ComparrisonExpression representing "key1 = key2")
Returns:
InnerJoin that can be used as part of another InnerJoin or a From

makeLeftJoin

public static com.endeca.mdex.eql_parser.types.LeftJoin makeLeftJoin(com.endeca.mdex.eql_parser.types.SourceBase left,
                                                                     com.endeca.mdex.eql_parser.types.SourceBase right,
                                                                     com.endeca.mdex.eql_parser.types.ExpressionBase condition)
Creates an InnerJoin that can be used as part of a From. Performs an inner join between two sources (either StatementSource or another InnerJoin) according to an expression.

Parameters:
left - Source to join
right - Source to join
condition - Expression to join on. (For example a ComparrisonExpression representing "key1 = key2")
Returns:
InnerJoin that can be used as part of another InnerJoin or a From

makeFullJoin

public static com.endeca.mdex.eql_parser.types.FullJoin makeFullJoin(com.endeca.mdex.eql_parser.types.SourceBase left,
                                                                     com.endeca.mdex.eql_parser.types.SourceBase right,
                                                                     com.endeca.mdex.eql_parser.types.ExpressionBase condition)
Creates an FullJoin that can be used as part of a From. Performs an full outer join between two sources (either StatementSource or another join) according to an expression.

Parameters:
left - Source to join
right - Source to join
condition - Expression to join on. (For example a ComparrisonExpression representing "key1 = key2")
Returns:
FullJoin that can be used as part of another Join or a From

makeWhere

public static com.endeca.mdex.eql_parser.types.Where makeWhere(com.endeca.mdex.eql_parser.types.ExpressionBase filter)
Creates a Where that can be set on an LQL statement.

Parameters:
filter - Expression to filter by.
Returns:
Where that can be set onto a statement.

makeEquals

public static com.endeca.mdex.eql_parser.types.ComparisonExpression makeEquals(java.lang.String key,
                                                                               com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
Convenience function to create a ComparrisonExpression representing "key = " where the type of the attribute represented by key matches the type computed by the expression. This would normally be used in a Where or a Having.

Parameters:
key - Attribute key to use in the comparison function.
rhs - the expression to compare the attribute to
Returns:
ComparisonExpression to be used where expressions are needed

makeEquals

public static com.endeca.mdex.eql_parser.types.ComparisonExpression makeEquals(java.lang.String key,
                                                                               com.endeca.mdex.eql_parser.types.ExpressionBase rhs,
                                                                               AttributeKeyConverter attributeKeyConverter,
                                                                               java.util.Locale currentLocale)

makeIsNull

public static com.endeca.mdex.eql_parser.types.NullnessExpression makeIsNull(boolean isNull,
                                                                             com.endeca.mdex.eql_parser.types.ExpressionBase operand)
Creates a NullnessExpression equivalent to IS_NULL(operand).

Parameters:
isNull - true for IS_NULL, false for NOT IS_NULL
operand - the operand on which to check nullness
Returns:
NullnessExpression to be used where expressions are needed

makeIsEmpty

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(java.lang.String attributeKey,
                                                                          boolean isEmpty,
                                                                          AttributeKeyConverter attributeKeyConverter,
                                                                          java.util.Locale currentLocale)

makeIsEmpty

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(java.lang.String attributeKey,
                                                                          boolean isEmpty)
Creates a SetEmptinessExpression equivalent to IS_EMPTY(operand) or IS_NOT_EMPTY(operand).

Parameters:
attributeKey - the operand on which to check set-emptiness
isEmpty - true is IS_EMPTY, false for IS_NOT_EMPTY
Returns:
SetEmptinessExpression to be used in situations that check for empty/non-empty set types.

makeIsEmpty

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(com.endeca.mdex.eql_parser.types.AttributeRefExpression attributeKey,
                                                                          boolean isEmpty)

makeIsNullOrEmpty

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsNullOrEmpty(SemanticView view,
                                                                                java.lang.String attributeKey,
                                                                                boolean isNullOrEmpty)
Create an IS NULL or IS_EMPTY expression depending on whether the provided attribute is multi-assign

Parameters:
view -
attributeKey -
isNullOrEmpty -
Returns:

makeIsNullOrEmpty

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsNullOrEmpty(SemanticView view,
                                                                                java.lang.String attributeKey,
                                                                                java.lang.String statementKey,
                                                                                boolean isNullOrEmpty)

makeAnd

public static com.endeca.mdex.eql_parser.types.AndExpression makeAnd(com.endeca.mdex.eql_parser.types.ExpressionBase left,
                                                                     com.endeca.mdex.eql_parser.types.ExpressionBase right)
Creates an AndExpression representing a logical AND of the two sub expressions. String equivalent would be "AND(left, right)".

Parameters:
left - Expression to AND
right - Expression to AND
Returns:
AndExpression that can be used where expressions are needed

makeOr

public static com.endeca.mdex.eql_parser.types.OrExpression makeOr(com.endeca.mdex.eql_parser.types.ExpressionBase left,
                                                                   com.endeca.mdex.eql_parser.types.ExpressionBase right)
Creates an ORExpression representing a logical OR of the two sub expressions. String equivalent would be "OR(left, right)".

Parameters:
left - Expression to OR
right - Expression to OR
Returns:
OrExpression that can be used where expressions are needed

makeGroupingSet

public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingSet(java.lang.String... groupKeys)
Creates a GroupingSet containing one GroupBy for each key in the list of groupKeys

Parameters:
groupKeys -
Returns:
a grouping set assembled from the given keys

makeGroupingSet

public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingSet(AttributeKeyConverter attributeKeyConverter,
                                                                           java.util.Locale currentLocale,
                                                                           java.lang.String... groupKeys)

makeSimpleGroup

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroup(java.lang.String... groupKeys)
Creates a Group containing a single GroupingSet containing one GroupBy for each key in the list of groupKeys

Parameters:
groupKeys -
Returns:
a group with a single grouping set assembled from the given keys

makeSimpleGroup

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroup(AttributeKeyConverter attributeKeyConverter,
                                                                     java.util.Locale currentLocale,
                                                                     java.lang.String... groupKeys)

makeSimpleGroupWithCubeRollUp

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupWithCubeRollUp(LQLBuilder.CubeRollupType type,
                                                                                   java.lang.String... groupKeys)
Creates a Group containing a CUBE/ROLLUP GroupingSet containing one GroupingSet for each key in the list of groupKeys and one GroupBy for each GroupingSet

Parameters:
cubeRollUpName - Identify if it is calling CUBE or ROLLUP function
groupKeys -
Returns:
a Group with a CUBE/ROLLUP GroupingSet containing one or more GroupingSets assembled from the given keys

makeSimpleGroupWithCubeRollUp

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupWithCubeRollUp(AttributeKeyConverter attributeKeyConverter,
                                                                                   java.util.Locale currentLocale,
                                                                                   LQLBuilder.CubeRollupType type,
                                                                                   java.lang.String... groupKeys)

makeGroupAllGroup

public static com.endeca.mdex.eql_parser.types.Group makeGroupAllGroup()
Creates a Group containing a single GroupingSet containing an empty GroupBy list which indicates that it is a group all

Returns:
a group with a single grouping set with an empty GroupBy list which indicates that it is a group all

getSimpleGroupingSet

public static com.endeca.mdex.eql_parser.types.GroupingSet getSimpleGroupingSet(com.endeca.mdex.eql_parser.types.Group group)
Returns the standard GroupBy list grouping set for a given group

Parameters:
group -

makeGroupBy

public static com.endeca.mdex.eql_parser.types.GroupBy makeGroupBy(java.lang.String key)
Creates a GroupBy for the given attribute key.

Parameters:
key - Attribute key to group by
Returns:
GroupBy object that can be added to a GroupingSet

makeGroupBy

public static com.endeca.mdex.eql_parser.types.GroupBy makeGroupBy(java.lang.String key,
                                                                   AttributeKeyConverter attributeKeyConverter,
                                                                   java.util.Locale currentLocale)

makeSimpleGroupByMembers

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(SemanticView view,
                                                                              java.util.Locale currentLocale,
                                                                              java.lang.String... groupKeys)
Creates a Group containing a single GroupingSet containing one groupByMemebers for each key in the list of groupKeys

Parameters:
attributeKeyConverter -
currentLocale -
groupKeys -
Returns:
a group with a single grouping set assembled from the given keys

makeSimpleGroupByMembers

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(SemanticView view,
                                                                              java.lang.String... groupKeys)

makeSimpleGroupByMembers

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(java.lang.String membersPrefix,
                                                                              SemanticView view,
                                                                              java.util.Locale currentLocale,
                                                                              java.lang.String... groupKeys)

makeSimpleGroupByMembers

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(java.lang.String membersPrefix,
                                                                              SemanticView view,
                                                                              java.lang.String... groupKeys)

makeGroupingMembersSet

public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(SemanticView view,
                                                                                  java.util.Locale currentLocale,
                                                                                  java.lang.String... groupKeys)
Creates a GroupingSet containing one groupByMemebers for each key in the list of groupKeys

Parameters:
attributeKeyConverter -
currentLocale -
groupKeys -
Returns:
a grouping set assembled from the given keys

makeGroupingMembersSet

public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(SemanticView view,
                                                                                  java.lang.String... groupKeys)

makeGroupingMembersSet

public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(java.lang.String membersPrefix,
                                                                                  SemanticView view,
                                                                                  java.util.Locale currentLocale,
                                                                                  java.lang.String... groupKeys)

makeGroupingMembersSet

public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(java.lang.String membersPrefix,
                                                                                  SemanticView view,
                                                                                  java.lang.String... groupKeys)

makeGroupByMembers

public static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key,
                                                                                 SemanticView view,
                                                                                 java.util.Locale currentLocale)
Creates a GroupByMembers for the given attribute key.

Parameters:
key -
attributeKeyConverter -
currentLocale -
Returns:
GroupByMembers

makeGroupByMembers

public static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key,
                                                                                 java.lang.String alias,
                                                                                 SemanticView view,
                                                                                 java.util.Locale currentLocale)

makeGroupByMembers

public static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key)

makeGroupByMembers

public static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key,
                                                                                 java.lang.String alias)

makeSimpleGroupByMembersWithCubeRollUp

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(SemanticView view,
                                                                                            java.util.Locale currentLocale,
                                                                                            LQLBuilder.CubeRollupType cubeRollUpName,
                                                                                            java.lang.String... groupKeys)
Creates a Group containing a CUBE/ROLLUP GroupingSet containing one GroupingSet for each key in the list of groupKeys and one GroupByMembers for each GroupingSet

Parameters:
attributeKeyConverter -
currentLocale -
cubeRollUpName - Identify if it is calling CUBE or ROLLUP function
groupKeys -
Returns:
a Group with a CUBE/ROLLUP GroupingSet containing one or more GroupingSets assembled from the given keys

makeSimpleGroupByMembersWithCubeRollUp

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(SemanticView view,
                                                                                            LQLBuilder.CubeRollupType cubeRollUpName,
                                                                                            java.lang.String... groupKeys)

makeSimpleGroupByMembersWithCubeRollUp

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(java.lang.String membersPrefix,
                                                                                            SemanticView view,
                                                                                            java.util.Locale currentLocale,
                                                                                            LQLBuilder.CubeRollupType cubeRollUpName,
                                                                                            java.lang.String... groupKeys)

makeSimpleGroupByMembersWithCubeRollUp

public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(java.lang.String membersPrefix,
                                                                                            SemanticView view,
                                                                                            LQLBuilder.CubeRollupType cubeRollUpName,
                                                                                            java.lang.String... groupKeys)

makeOrderByList

public static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(com.endeca.mdex.eql_parser.types.OrderBy... orderBys)
Creates an OrderByList given a set of OrderBy objects

Parameters:
orderBys -
Returns:
OrderByList to use in an LQL Statement

makeOrderByList

public static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(java.lang.String attributeKey,
                                                                           boolean isAscending)
Creates an OrderByList containing one OrderBy for the given attribute key and direction.

Parameters:
attributeKey -
isAscending -
Returns:
an order by list

makeOrderByList

public static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(java.lang.String attributeKey,
                                                                           boolean isAscending,
                                                                           AttributeKeyConverter attributeKeyConverter,
                                                                           java.util.Locale currentLocale)

makeOrderBy

public static com.endeca.mdex.eql_parser.types.OrderBy makeOrderBy(java.lang.String attributeKey,
                                                                   boolean isAscending)
Creates an OrderBy on the given attribute key with the given direction.

Parameters:
attributeKey - Attribute key to sort on
isAscending - True if the ordering should be ascending, false if descending
Returns:
OrderBy object that can be added to a statement's order by list.

makeOrderBy

public static com.endeca.mdex.eql_parser.types.OrderBy makeOrderBy(java.lang.String attributeKey,
                                                                   boolean isAscending,
                                                                   AttributeKeyConverter attributeKeyConverter,
                                                                   java.util.Locale currentLocale)

makeDoubleLiteral

public static com.endeca.mdex.eql_parser.types.DoubleLiteral makeDoubleLiteral(java.lang.Double value)
Creates a DoubleLiteral for the given value.

Parameters:
value -
Returns:
a literal with the given double value

makeComparisonOrQuantifierExpression

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeComparisonOrQuantifierExpression(SemanticView view,
                                                                                                   com.endeca.mdex.eql_parser.types.AttributeRefExpression attributeRef,
                                                                                                   com.endeca.mdex.eql_parser.types.ExpressionBase right,
                                                                                                   LQLBuilder.CompareOp op,
                                                                                                   boolean isExistential)
Create either a ComparisonExpression, a ExistentialQuantifierExpression, or a UniversalQuantifierExpression depending on whether the provided attribute is multi-assign.

Parameters:
view -
attributeKey -
right -
op -
isExistential - explicitly set whether to use SOME or EVERY for multi-assign attributes
Returns:

makeComparisonExpression

public static com.endeca.mdex.eql_parser.types.ComparisonExpression makeComparisonExpression(com.endeca.mdex.eql_parser.types.ExpressionBase left,
                                                                                             com.endeca.mdex.eql_parser.types.ExpressionBase right,
                                                                                             LQLBuilder.CompareOp op)
Creates a ComparisonExpression comparing a left expression with a right expression, using the given compare operation.

Parameters:
op -
left -
right -
Returns:
an expression comparing left to right by the provided compare operation

makeExistentialQuantifierExpression

public static com.endeca.mdex.eql_parser.types.ExistentialQuantifierExpression makeExistentialQuantifierExpression(com.endeca.mdex.eql_parser.types.ExpressionBase universe,
                                                                                                                   com.endeca.mdex.eql_parser.types.ExpressionBase predicate,
                                                                                                                   java.lang.String boundVariable)
Creates a ExistentialQuantifierExpression, which tests for the existence of some value x in a universe satisfying a condition (predicate). Example: SOME x IN UNION(flavor, otherSet) SATISFIES (x <> 'Oak')

Parameters:
universe -
predicate -
boundVariable - the arbitrary name of a variable, e.g. x
Returns:

makeUniversalQuantifierExpression

public static com.endeca.mdex.eql_parser.types.UniversalQuantifierExpression makeUniversalQuantifierExpression(com.endeca.mdex.eql_parser.types.ExpressionBase universe,
                                                                                                               com.endeca.mdex.eql_parser.types.ExpressionBase predicate,
                                                                                                               java.lang.String boundVariable)
Creates a UniversalQuantifierExpression, which tests for the existence of every value x in a universe satisfying a condition (predicate). Example: EVERY x IN UNION(flavor, otherSet) SATISFIES (x <> 'Oak')

Parameters:
universe -
predicate -
boundVariable - the arbitrary name of a variable, e.g. x
Returns:

makeAdditiveExpression

public static com.endeca.mdex.eql_parser.types.AdditiveExpression makeAdditiveExpression(com.endeca.mdex.eql_parser.types.ExpressionBase left,
                                                                                         com.endeca.mdex.eql_parser.types.ExpressionBase right,
                                                                                         LQLBuilder.AdditiveOp op)
Creates an AdditiveExpression with the give left expression and right expression, using the given math operation.

Parameters:
left -
right -
op -
Returns:
an expression adding left to right

makePaging

public static com.endeca.mdex.eql_parser.types.Paging makePaging(java.math.BigInteger offset,
                                                                 java.math.BigInteger count)
Creates a Paging object specifying which records should be returned by an LQL query.

Parameters:
offset - The offset into the entire record set.
count - The number of records that should be returned.
Returns:
Paging object that can be set on a Statement.

makeHaving

public static com.endeca.mdex.eql_parser.types.Having makeHaving(com.endeca.mdex.eql_parser.types.ExpressionBase filter)
Creates a Having object with the given filter. Used in post-filtering for aggregate functions.

Parameters:
filter - Filter to restrict the results by.
Returns:
Having object that can be added to a statement's having list.

makeAggregationFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction,
                                                                                                            com.endeca.mdex.eql_parser.types.AttributeRefExpression key,
                                                                                                            boolean isSingleAssign)
According to the isSingleAssign property, change the aggregation method as the rules below: When apply SET aggregation method on multi-assign attributes, change the aggregation method to SET_UNIONS(key) When apply COUNT_DISTINCT aggregation method on multi-assign attributes, change the aggregation method to CARDINALITY(SET_UNIONS(key))

Parameters:
aggregationFunction -
key -
isSingleAssign -
Returns:

makeAggregationFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction,
                                                                                                            java.lang.String attributeKey,
                                                                                                            boolean isSingleAssign)

makeAggregationFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction,
                                                                                                            java.lang.String attributeKey,
                                                                                                            boolean isSingleAssign,
                                                                                                            AttributeKeyConverter attributeKeyConverter,
                                                                                                            java.util.Locale currentLocale)

makeFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeFunctionCallExpression(LQLBuilder.Function f,
                                                                                                 com.endeca.mdex.eql_parser.types.Where w,
                                                                                                 com.endeca.mdex.eql_parser.types.ExpressionBase... args)
Helper method for making FunctionCallExpressions. Function call expressions are expressions that use LQLBuilder.Function s. An equivalent string form could be "count(1)"

Parameters:
f - Function to use for the expression
w - Where filter that should be applied to the function
args - ExpressionBase arguments to pass into the function
Returns:
FunctionCallExpression representing a function

makeFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeFunctionCallExpression(LQLBuilder.Function f,
                                                                                                 com.endeca.mdex.eql_parser.types.ExpressionBase... args)
Helper method for making FunctionCallExpressions. Function call expressions are expressions that use LQLBuilder.Function s. An equivalent string form could be "count(1)"

Parameters:
f - Function to use for the expression
args - ExpressionBase arguments to pass into the function
Returns:
FunctionCallExpression representing a function

makeAncestorFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key,
                                                                                                         java.math.BigInteger depth)
Creates an ancestor FunctionCallExpression for the given attribute key and a depth. Used for managed attributes if you want to limit tree depth.

Parameters:
key - Attribute key to group by
depth - Tree depth in a managed attribute to limit the group by value on
Returns:
FunctionCallExpression representing an ancestor function

makeAncestorFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key,
                                                                                                         java.math.BigInteger depth,
                                                                                                         AttributeKeyConverter attributeKeyConverter,
                                                                                                         java.util.Locale currentLocale)

makeAncestorFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key,
                                                                                                         java.lang.String statementKey,
                                                                                                         java.math.BigInteger depth)

makeAncestorFunctionCallExpression

public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAncestorFunctionCallExpression(java.lang.String key,
                                                                                                         java.lang.String statementKey,
                                                                                                         java.math.BigInteger depth,
                                                                                                         AttributeKeyConverter attributeKeyConverter,
                                                                                                         java.util.Locale currentLocale)

makeBooleanLiteral

public static com.endeca.mdex.eql_parser.types.BooleanLiteral makeBooleanLiteral(java.lang.String value)

makeBooleanLiteral

public static com.endeca.mdex.eql_parser.types.BooleanLiteral makeBooleanLiteral(boolean value)

makeIntegerLiteral

public static com.endeca.mdex.eql_parser.types.IntegerLiteral makeIntegerLiteral(java.math.BigInteger value)

makeDoubleLiteral

public static com.endeca.mdex.eql_parser.types.DoubleLiteral makeDoubleLiteral(java.lang.String d)

makeStringLiteral

public static com.endeca.mdex.eql_parser.types.StringLiteral makeStringLiteral(java.lang.String value)

makeStringLiteral

public static com.endeca.mdex.eql_parser.types.StringLiteral makeStringLiteral(java.lang.String value,
                                                                               AttributeKeyConverter attributeKeyConverter,
                                                                               java.util.Locale currentLocale)

makeLiteral

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeLiteral(java.lang.String mdexType,
                                                                          java.lang.String value)
Create an literal for a value based on its type.

Parameters:
mdexType - the string form of the mdex:type, for example: mdex:long
value - the string form of value
Returns:
ExpressionBase of the literal

makeLiteral

public static com.endeca.mdex.eql_parser.types.ExpressionBase makeLiteral(java.lang.String mdexType,
                                                                          java.lang.String value,
                                                                          AttributeKeyConverter attributeKeyConverter,
                                                                          java.util.Locale currentLocale)

makeStatementQualifier

public static com.endeca.mdex.eql_parser.types.StatementQualifier makeStatementQualifier(java.lang.String statementKey)
Create a statement qualifier

Parameters:
statementKey - the name of the statement
Returns:
StatementQualifier