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 classPrismQueryLanguageParserImpl.FilterArgumentSpec<T>static interfacePrismQueryLanguageParserImpl.ItemFilterFactorystatic classPrismQueryLanguageParserImpl.ValuesArgument<T>
-
Field Summary
Fields Modifier and Type Field Description static StringMATCHING_RULE_NSstatic StringQUERY_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 PrismQueryLanguageParserImplcreate(PrismContext prismContext)booleanisVariablePath(AxiomQueryParser.PathContext path)protected booleanisVariablePath(AxiomQueryParser.SingleValueContext singleValue)ObjectFilterparseFilter(ItemDefinition<?> definition, String query)<T> ObjectFilterparseFilter(Class<T> typeClass, String query)Parses Axiom Query filter with definition derived from the provided type class.ObjectparseLiteral(PrismPropertyDefinition<?> propDef, AxiomQueryParser.LiteralValueContext literalValue)protected <T> TrequireLiteral(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:PrismQueryLanguageParserParses Axiom Query filter with definition derived from the provided type class. For reference search filters use anyReferencableand 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:
parseFilterin interfacePrismQueryLanguageParser- Throws:
SchemaException
-
parseFilter
public ObjectFilter parseFilter(ItemDefinition<?> definition, String query) throws SchemaException
- Specified by:
parseFilterin interfacePrismQueryLanguageParser- Throws:
SchemaException
-
create
public static PrismQueryLanguageParserImpl create(PrismContext prismContext)
-
-