public class LQLBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
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 |
static class |
LQLBuilder.SystemMetric |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AGGREGATOR_APPROXCOUNT_ENABLED |
static java.lang.String |
STATEMENT_PREFIX |
static int |
THRESHOLD_NUMBER_OF_SET |
static java.lang.String |
UNFILTERED_SUFFIX |
Constructor and Description |
---|
LQLBuilder() |
Modifier and Type | Method and Description |
---|---|
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 void |
hotUpdateAggregatorSettings()
Apply the current value of the framework setting "df.countApproxEnabled" instantly
|
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.ExpressionBase |
makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction,
com.endeca.mdex.eql_parser.types.AttributeRefExpression key,
boolean isSingleAssign,
SemanticView view,
boolean useApproximate)
There are two parameters isSingleAssign and view to assembly an expression with aggregation inside: 1.
|
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.ExpressionBase |
makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction,
java.lang.String attributeKey,
boolean isSingleAssign,
SemanticView view,
boolean useApproximate) |
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,
java.lang.String statementKey)
Creates an AttributeRefExpression that is used when an attribute key is needed.
|
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.CaseClause |
makeCaseClause(com.endeca.mdex.eql_parser.types.ExpressionBase condition,
com.endeca.mdex.eql_parser.types.ExpressionBase consequence)
Create case clause
|
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.CrossJoin |
makeCrossJoin(com.endeca.mdex.eql_parser.types.SourceBase left,
com.endeca.mdex.eql_parser.types.SourceBase right)
Creates a CrossJoin that can be used as part of a From.
|
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.ElseClause |
makeElseClause(com.endeca.mdex.eql_parser.types.ExpressionBase consequence)
Create else clause
|
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 =
|
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.ExpressionBase |
makeFunctionCallExpression(LQLBuilder.Function f,
SemanticView view,
boolean useApproximate,
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.ExpressionBase |
makeFunctionCallExpression(LQLBuilder.Function f,
com.endeca.mdex.eql_parser.types.Where w,
SemanticView view,
boolean useApproximate,
com.endeca.mdex.eql_parser.types.ExpressionBase... args)
Helper method for making FunctionCallExpressions.
|
static com.endeca.mdex.eql_parser.types.ComparisonExpression |
makeGreatThanAndEqual(java.lang.String key,
com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
Convenience function to create a ComparrisonExpression representing "key >=
|
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.GroupByMembers |
makeGroupByMembers(java.lang.String 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,
java.lang.String statementKey) |
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.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.NullnessExpression |
makeIsNotNull(com.endeca.mdex.eql_parser.types.ExpressionBase operand)
Makes an IS_NOT_NULL check.
|
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.NullnessExpression |
makeIsNull(com.endeca.mdex.eql_parser.types.ExpressionBase operand)
Makes an IS_NULL check.
|
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.ComparisonExpression |
makeLessThan(java.lang.String key,
com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
Convenience function to create a ComparrisonExpression representing "key <
|
static com.endeca.mdex.eql_parser.types.ComparisonExpression |
makeLessThanAndEqual(java.lang.String key,
com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
Convenience function to create a ComparrisonExpression representing "key <=
|
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.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.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.NotExpression |
makeNot(com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
Wraps an expression in
NotExpression . |
static com.endeca.mdex.eql_parser.types.NotExpression |
makeNotEquals(java.lang.String key,
com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
Convenience method to make an equals comparison expression, and negate that with NOT, so key !
|
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.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.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 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.SetConstructor |
makeSetConstructor(java.util.Collection<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> setContents) |
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(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.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,
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(java.lang.String membersPrefix,
SemanticView view,
LQLBuilder.CubeRollupType cubeRollUpName,
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.Statement |
makeStatement(java.lang.String statementKey,
boolean isReturnTable,
boolean withUnpagedRecCount)
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.StringLiteral |
makeStringLiteral(java.lang.String value) |
static java.util.Collection<com.endeca.mdex.eql_parser.types.StringLiteral> |
makeStringLiterals(java.lang.String... values) |
static com.endeca.mdex.eql_parser.types.StatementSource |
makeUnfilteredCollectionSource(java.lang.String collectionKey)
Creates a StatementSouce to be used in a From or a Join.
|
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.
|
public static final int THRESHOLD_NUMBER_OF_SET
public static final java.lang.String STATEMENT_PREFIX
public static final java.lang.String UNFILTERED_SUFFIX
public static final java.lang.String AGGREGATOR_APPROXCOUNT_ENABLED
public static void hotUpdateAggregatorSettings()
public static com.endeca.mdex.eql_parser.types.Statement makeStatement(java.lang.String statementKey, boolean isReturnTable)
makeStatement(String, boolean, boolean)
.statementKey
- isReturnTable
- true if this statement's results should be *returned* in the EQL results as opposed to used only as a statement source for
other statementspublic static com.endeca.mdex.eql_parser.types.Statement makeStatement(java.lang.String statementKey, boolean isReturnTable, boolean withUnpagedRecCount)
statementKey
- isReturnTable
- true if this statement's results should be *returned* in the EQL results as opposed to used only as a statement source for
other statementswithUnpagedRecCount
- true if the total number of result records (numRecords) should be returned with this paged statement's result records; only
applicable if this is a return statement with a PAGE clausepublic static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String attributeKey)
attributeKey
- Attribute key to selectpublic static com.endeca.mdex.eql_parser.types.Select makeSelect(java.lang.String name, com.endeca.mdex.eql_parser.types.ExpressionBase expression)
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)")public static com.endeca.mdex.eql_parser.types.StatementSource makeStatementSource(java.lang.String statementKey)
statementKey
- Name of an LQL statementpublic static com.endeca.mdex.eql_parser.types.StatementSource makeUnfilteredCollectionSource(java.lang.String collectionKey)
collectionKey
- a collection Key, not another statementpublic static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey)
attributeKey
- Attribute key to reference.public static com.endeca.mdex.eql_parser.types.AttributeRefExpression makeAttributeRef(java.lang.String attributeKey, java.lang.String statementKey)
attributeKey
- Attribute key to reference.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)
targetStatementKey
- targetAttributeKey
- lookupValues
- 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)
targetStatementKey
- lookupValues
- 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)
leftOperand
- rightOperand
- op
- 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)
public static com.endeca.mdex.eql_parser.types.SetConstructor makeSetConstructor(java.util.Collection<? extends com.endeca.mdex.eql_parser.types.ExpressionBase> setContents)
public static com.endeca.mdex.eql_parser.types.From makeFrom(java.lang.String statementName)
statementName
- Name of the statement to use as a source.public static com.endeca.mdex.eql_parser.types.From makeFrom(com.endeca.mdex.eql_parser.types.SourceBase source)
source
- Source to use in the From clause. Can be a StatementSource or an InnerJoinpublic 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)
left
- Source to joinright
- Source to joincondition
- Expression to join on. (For example a ComparrisonExpression representing "key1 = key2")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)
left
- Source to joinright
- Source to joincondition
- Expression to join on. (For example a ComparrisonExpression representing "key1 = key2")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)
left
- Source to joinright
- Source to joincondition
- Expression to join on. (For example a ComparrisonExpression representing "key1 = key2")public static com.endeca.mdex.eql_parser.types.CrossJoin makeCrossJoin(com.endeca.mdex.eql_parser.types.SourceBase left, com.endeca.mdex.eql_parser.types.SourceBase right)
left
- source to joinright
- source to joinpublic static com.endeca.mdex.eql_parser.types.Where makeWhere(com.endeca.mdex.eql_parser.types.ExpressionBase filter)
filter
- Expression to filter by.public static com.endeca.mdex.eql_parser.types.ComparisonExpression makeEquals(java.lang.String key, com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
key
- Attribute key to use in the comparison function.rhs
- the expression to compare the attribute topublic static com.endeca.mdex.eql_parser.types.ComparisonExpression makeGreatThanAndEqual(java.lang.String key, com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
key
- Attribute key to use in the comparison function.rhs
- the expression to compare the attribute topublic static com.endeca.mdex.eql_parser.types.ComparisonExpression makeLessThanAndEqual(java.lang.String key, com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
key
- Attribute key to use in the comparison function.rhs
- the expression to compare the attribute topublic static com.endeca.mdex.eql_parser.types.ComparisonExpression makeLessThan(java.lang.String key, com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
key
- Attribute key to use in the comparison function.rhs
- the expression to compare the attribute topublic static com.endeca.mdex.eql_parser.types.NotExpression makeNot(com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
NotExpression
.rhs
- the expression to negateNotExpression
public static com.endeca.mdex.eql_parser.types.NotExpression makeNotEquals(java.lang.String key, com.endeca.mdex.eql_parser.types.ExpressionBase rhs)
key
- the keyrhs
- the expression to negateNotExpression
public static com.endeca.mdex.eql_parser.types.NullnessExpression makeIsNull(boolean isNull, com.endeca.mdex.eql_parser.types.ExpressionBase operand)
isNull
- true for IS_NULL, false for NOT IS_NULLoperand
- the operand on which to check nullnesspublic static com.endeca.mdex.eql_parser.types.NullnessExpression makeIsNull(com.endeca.mdex.eql_parser.types.ExpressionBase operand)
#makeIsNull(true, ExpressionBase)
.operand
- expression to check for nullmakeIsNull(boolean, ExpressionBase)
public static com.endeca.mdex.eql_parser.types.NullnessExpression makeIsNotNull(com.endeca.mdex.eql_parser.types.ExpressionBase operand)
#makeIsNull(false, ExpressionBase)
.operand
- expression to check for not nullmakeIsNull(boolean, ExpressionBase)
public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(java.lang.String attributeKey, boolean isEmpty)
attributeKey
- the operand on which to check set-emptinessisEmpty
- true is IS_EMPTY, false for IS_NOT_EMPTYpublic static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsEmpty(com.endeca.mdex.eql_parser.types.AttributeRefExpression attributeKey, boolean isEmpty)
public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsNullOrEmpty(SemanticView view, java.lang.String attributeKey, boolean isNullOrEmpty)
view
- attributeKey
- isNullOrEmpty
- public static com.endeca.mdex.eql_parser.types.ExpressionBase makeIsNullOrEmpty(SemanticView view, java.lang.String attributeKey, java.lang.String statementKey, boolean isNullOrEmpty)
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)
left
- Expression to ANDright
- Expression to ANDpublic 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)
left
- Expression to ORright
- Expression to ORpublic static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingSet(java.lang.String... groupKeys)
groupKeys
- public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroup(java.lang.String... groupKeys)
groupKeys
- public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupWithCubeRollUp(LQLBuilder.CubeRollupType type, java.lang.String... groupKeys)
cubeRollUpName
- Identify if it is calling CUBE or ROLLUP functiongroupKeys
- public static com.endeca.mdex.eql_parser.types.Group makeGroupAllGroup()
public static com.endeca.mdex.eql_parser.types.GroupingSet getSimpleGroupingSet(com.endeca.mdex.eql_parser.types.Group group)
group
- public static com.endeca.mdex.eql_parser.types.GroupBy makeGroupBy(java.lang.String key)
key
- Attribute key to group bypublic static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(SemanticView view, java.lang.String... groupKeys)
public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembers(java.lang.String membersPrefix, SemanticView view, java.lang.String... groupKeys)
public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(SemanticView view, java.lang.String... groupKeys)
public static com.endeca.mdex.eql_parser.types.GroupingSet makeGroupingMembersSet(java.lang.String membersPrefix, SemanticView view, java.lang.String... groupKeys)
public static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key)
public static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key, java.lang.String alias)
public static com.endeca.mdex.eql_parser.types.GroupByMembers makeGroupByMembers(java.lang.String key, java.lang.String alias, java.lang.String statementKey)
public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(SemanticView view, LQLBuilder.CubeRollupType cubeRollUpName, java.lang.String... groupKeys)
attributeKeyConverter
- cubeRollUpName
- Identify if it is calling CUBE or ROLLUP functiongroupKeys
- public static com.endeca.mdex.eql_parser.types.Group makeSimpleGroupByMembersWithCubeRollUp(java.lang.String membersPrefix, SemanticView view, LQLBuilder.CubeRollupType cubeRollUpName, java.lang.String... groupKeys)
public static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(com.endeca.mdex.eql_parser.types.OrderBy... orderBys)
orderBys
- public static com.endeca.mdex.eql_parser.types.OrderByList makeOrderByList(java.lang.String attributeKey, boolean isAscending)
attributeKey
- isAscending
- public static com.endeca.mdex.eql_parser.types.OrderBy makeOrderBy(java.lang.String attributeKey, boolean isAscending)
attributeKey
- Attribute key to sort onisAscending
- True if the ordering should be ascending, false if descendingpublic static com.endeca.mdex.eql_parser.types.DoubleLiteral makeDoubleLiteral(java.lang.Double value)
value
- 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)
view
- attributeKey
- right
- op
- isExistential
- explicitly set whether to use SOME or EVERY for multi-assign attributespublic 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)
op
- left
- right
- 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)
universe
- predicate
- boundVariable
- the arbitrary name of a variable, e.g. xpublic 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)
universe
- predicate
- boundVariable
- the arbitrary name of a variable, e.g. xpublic 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)
left
- right
- op
- public static com.endeca.mdex.eql_parser.types.Paging makePaging(java.math.BigInteger offset, java.math.BigInteger count)
offset
- The offset into the entire record set.count
- The number of records that should be returned.public static com.endeca.mdex.eql_parser.types.Having makeHaving(com.endeca.mdex.eql_parser.types.ExpressionBase filter)
filter
- Filter to restrict the results by.public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction, com.endeca.mdex.eql_parser.types.AttributeRefExpression key, boolean isSingleAssign)
aggregationFunction
- key
- isSingleAssign
- public static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction, java.lang.String attributeKey, boolean isSingleAssign)
public static com.endeca.mdex.eql_parser.types.ExpressionBase makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction, com.endeca.mdex.eql_parser.types.AttributeRefExpression key, boolean isSingleAssign, SemanticView view, boolean useApproximate)
aggregationFunction
- key
- isSingleAssign
- view
- public static com.endeca.mdex.eql_parser.types.ExpressionBase makeAggregationFunctionCallExpression(LQLBuilder.Function aggregationFunction, java.lang.String attributeKey, boolean isSingleAssign, SemanticView view, boolean useApproximate)
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)
LQLBuilder.Function
s. An equivalent string form could be "count(1)"f
- Function to use for the expressionw
- Where filter that should be applied to the functionargs
- ExpressionBase arguments to pass into the functionpublic static com.endeca.mdex.eql_parser.types.FunctionCallExpression makeFunctionCallExpression(LQLBuilder.Function f, com.endeca.mdex.eql_parser.types.ExpressionBase... args)
LQLBuilder.Function
s. An equivalent string form could be "count(1)"f
- Function to use for the expressionargs
- ExpressionBase arguments to pass into the functionpublic static com.endeca.mdex.eql_parser.types.ExpressionBase makeFunctionCallExpression(LQLBuilder.Function f, com.endeca.mdex.eql_parser.types.Where w, SemanticView view, boolean useApproximate, com.endeca.mdex.eql_parser.types.ExpressionBase... args)
LQLBuilder.Function
s. An equivalent string form could be "count(1)"f
- Function to use for the expressionw
- Where filter that should be applied to the functionview
- the related viewargs
- ExpressionBase arguments to pass into the functionpublic static com.endeca.mdex.eql_parser.types.ExpressionBase makeFunctionCallExpression(LQLBuilder.Function f, SemanticView view, boolean useApproximate, com.endeca.mdex.eql_parser.types.ExpressionBase... args)
LQLBuilder.Function
s. An equivalent string form could be "count(1)"f
- Function to use for the expressionview
- the related viewargs
- ExpressionBase arguments to pass into the functionpublic static com.endeca.mdex.eql_parser.types.BooleanLiteral makeBooleanLiteral(java.lang.String value)
public static com.endeca.mdex.eql_parser.types.BooleanLiteral makeBooleanLiteral(boolean value)
public static com.endeca.mdex.eql_parser.types.IntegerLiteral makeIntegerLiteral(java.math.BigInteger value)
public static com.endeca.mdex.eql_parser.types.DoubleLiteral makeDoubleLiteral(java.lang.String d)
public static com.endeca.mdex.eql_parser.types.StringLiteral makeStringLiteral(java.lang.String value)
public static java.util.Collection<com.endeca.mdex.eql_parser.types.StringLiteral> makeStringLiterals(java.lang.String... values)
public static com.endeca.mdex.eql_parser.types.CaseClause makeCaseClause(com.endeca.mdex.eql_parser.types.ExpressionBase condition, com.endeca.mdex.eql_parser.types.ExpressionBase consequence)
condition
- consequence
- public static com.endeca.mdex.eql_parser.types.ElseClause makeElseClause(com.endeca.mdex.eql_parser.types.ExpressionBase consequence)
consequence
- public static com.endeca.mdex.eql_parser.types.ExpressionBase makeLiteral(java.lang.String mdexType, java.lang.String value)
mdexType
- the string form of the mdex:type, for example: mdex:longvalue
- the string form of valuepublic static com.endeca.mdex.eql_parser.types.StatementQualifier makeStatementQualifier(java.lang.String statementKey)
statementKey
- the name of the statementCopyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.