Class PrismQueryLanguageParserImpl
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.query.lang.PrismQueryLanguageParserImpl
-
- All Implemented Interfaces:
PrismQueryLanguageParser
public class PrismQueryLanguageParserImpl extends Object implements PrismQueryLanguageParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrismQueryLanguageParserImpl.FilterArgumentSpec<T>
static interface
PrismQueryLanguageParserImpl.ItemFilterFactory
static class
PrismQueryLanguageParserImpl.ValuesArgument<T>
-
Field Summary
Fields Modifier and Type Field Description static String
MATCHING_RULE_NS
static String
QUERY_NS
-
Constructor Summary
Constructors Constructor Description PrismQueryLanguageParserImpl(PrismContext context)
PrismQueryLanguageParserImpl(PrismContext context, Map<String,String> namespaceContext)
PrismQueryLanguageParserImpl(PrismContext context, Map<String,String> namespaceContext, PrismQueryExpressionFactory expressionParser)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrismQueryLanguageParserImpl
create(PrismContext prismContext)
boolean
isVariablePath(AxiomQueryParser.PathContext path)
protected boolean
isVariablePath(AxiomQueryParser.SingleValueContext singleValue)
ObjectFilter
parseFilter(ItemDefinition<?> definition, String query)
<T> ObjectFilter
parseFilter(Class<T> typeClass, String query)
Parses Axiom Query filter with definition derived from the provided type class.Object
parseLiteral(PrismPropertyDefinition<?> propDef, AxiomQueryParser.LiteralValueContext literalValue)
protected <T> T
requireLiteral(Class<T> type, String filterName, AxiomQueryParser.SingleValueContext value)
protected <T> Collection<T>
requireLiterals(Class<T> type, String filterName, AxiomQueryParser.SubfilterOrValueContext subfilterOrValue)
-
-
-
Field Detail
-
QUERY_NS
public static final String QUERY_NS
- See Also:
- Constant Field Values
-
MATCHING_RULE_NS
public static final String MATCHING_RULE_NS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PrismQueryLanguageParserImpl
public PrismQueryLanguageParserImpl(PrismContext context)
-
PrismQueryLanguageParserImpl
public PrismQueryLanguageParserImpl(PrismContext context, Map<String,String> namespaceContext)
-
PrismQueryLanguageParserImpl
public PrismQueryLanguageParserImpl(PrismContext context, Map<String,String> namespaceContext, PrismQueryExpressionFactory expressionParser)
-
-
Method Detail
-
isVariablePath
protected boolean isVariablePath(AxiomQueryParser.SingleValueContext singleValue)
-
isVariablePath
public boolean isVariablePath(AxiomQueryParser.PathContext path)
-
parseLiteral
public Object parseLiteral(PrismPropertyDefinition<?> propDef, AxiomQueryParser.LiteralValueContext literalValue)
-
requireLiterals
protected <T> Collection<T> requireLiterals(Class<T> type, String filterName, AxiomQueryParser.SubfilterOrValueContext subfilterOrValue) throws SchemaException
- Throws:
SchemaException
-
requireLiteral
protected <T> T requireLiteral(Class<T> type, String filterName, AxiomQueryParser.SingleValueContext value) throws SchemaException
- Throws:
SchemaException
-
parseFilter
public <T> ObjectFilter parseFilter(Class<T> typeClass, String query) throws SchemaException
Description copied from interface:PrismQueryLanguageParser
Parses Axiom Query filter with definition derived from the provided type class. For reference search filters use anyReferencable
and follow the rules for reference search filter: * exactly one ownedBy to define the reference context, * any number of additional REF on the SELF path, that is `. matches (...)`.- Specified by:
parseFilter
in interfacePrismQueryLanguageParser
- Throws:
SchemaException
-
parseFilter
public ObjectFilter parseFilter(ItemDefinition<?> definition, String query) throws SchemaException
- Specified by:
parseFilter
in interfacePrismQueryLanguageParser
- Throws:
SchemaException
-
create
public static PrismQueryLanguageParserImpl create(PrismContext prismContext)
-
-