Package org.jboss.windup.config.query
Class Query
- java.lang.Object
-
- org.ocpsoft.rewrite.config.DefaultConditionBuilder
-
- org.jboss.windup.config.condition.GraphCondition
-
- org.jboss.windup.config.query.Query
-
- All Implemented Interfaces:
QueryBuilderAs,QueryBuilderFind,QueryBuilderFrom,QueryBuilderPiped,QueryBuilderWith,org.ocpsoft.rewrite.config.Condition,org.ocpsoft.rewrite.config.ConditionBuilder
public class Query extends GraphCondition implements QueryBuilderFind, QueryBuilderFrom, QueryBuilderWith, QueryBuilderPiped
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.ocpsoft.rewrite.config.ConditionBuilderas(String name)Set the name of the output variable into which results of theQuerywill be stored.booleanevaluate(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)QueryBuilderFindexcludingType(Class<? extends org.jboss.windup.graph.model.WindupVertexFrame> type)Excludes Vertices that are of the provided type.<FRAMETYPE extends org.jboss.windup.graph.model.WindupVertexFrame>
QueryBuilderAsfilteredBy(org.jboss.forge.furnace.util.Predicate<FRAMETYPE> predicate)Narrow the query with the givenPredicatestatic QueryBuilderFromfrom(String sourceVarName)static QueryBuilderFindfromType(Class<? extends org.jboss.windup.graph.model.WindupVertexFrame> type)Begin thisQuerywith allWindupVertexFrameinstances of the given type.Collection<QueryGremlinCriterion>getPipelineCriteria()static QueryBuilderPipedgremlin(QueryGremlinCriterion criterion)Begin thisQuerywith all Frame instances that are the result of the provided GremlinQueryCriterion.QueryBuilderFindincludingType(Class<? extends org.jboss.windup.graph.model.WindupVertexFrame> type)Includes Vertices that are of the provided type.QueryBuilderPipedpiped(QueryGremlinCriterion criterion)Narrow the query via aQueryGremlinCriterionin order to execute Gremlin queries.StringtoString()QueryBuilderWithwithoutProperty(String property)Narrow the query toWindupVertexFrameinstances that satisfy the given property comparison.QueryBuilderWithwithProperty(String property)Narrow the query toWindupVertexFrameinstances that have the given property defined.QueryBuilderWithwithProperty(String property, Iterable<?> values)Narrow the query toWindupVertexFrameinstances that contain any of the given property values.QueryBuilderWithwithProperty(String property, Object searchValue)Narrow the query toWindupVertexFrameinstances that contain the given property value.QueryBuilderWithwithProperty(String property, Object searchValue, Object... searchValues)Narrow the query toWindupVertexFrameinstances that contain any given property value.QueryBuilderWithwithProperty(String property, QueryPropertyComparisonType searchType, Object searchValue)Narrow the query toWindupVertexFrameinstances that satisfy the given property comparison.-
Methods inherited from class org.jboss.windup.config.condition.GraphCondition
evaluate, getInputVariablesName, getOutputVariablesName, setInputVariablesName, setOutputVariablesName, setResults
-
Methods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, or, orNot
-
-
-
-
Method Detail
-
gremlin
public static QueryBuilderPiped gremlin(QueryGremlinCriterion criterion)
Begin thisQuerywith all Frame instances that are the result of the provided GremlinQueryCriterion.
-
fromType
public static QueryBuilderFind fromType(Class<? extends org.jboss.windup.graph.model.WindupVertexFrame> type)
Begin thisQuerywith allWindupVertexFrameinstances of the given type.
-
excludingType
public QueryBuilderFind excludingType(Class<? extends org.jboss.windup.graph.model.WindupVertexFrame> type)
Excludes Vertices that are of the provided type.- Specified by:
excludingTypein interfaceQueryBuilderFind
-
includingType
public QueryBuilderFind includingType(Class<? extends org.jboss.windup.graph.model.WindupVertexFrame> type)
Includes Vertices that are of the provided type.- Specified by:
includingTypein interfaceQueryBuilderFind
-
from
public static QueryBuilderFrom from(String sourceVarName)
-
as
public org.ocpsoft.rewrite.config.ConditionBuilder as(String name)
Description copied from interface:QueryBuilderAsSet the name of the output variable into which results of theQuerywill be stored.- Specified by:
asin interfaceQueryBuilderAs
-
evaluate
public boolean evaluate(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)
- Specified by:
evaluatein classGraphCondition
-
withProperty
public QueryBuilderWith withProperty(String property, Object searchValue)
Description copied from interface:QueryBuilderWithNarrow the query toWindupVertexFrameinstances that contain the given property value.- Specified by:
withPropertyin interfaceQueryBuilderWith
-
withProperty
public QueryBuilderWith withProperty(String property, Iterable<?> values)
Description copied from interface:QueryBuilderWithNarrow the query toWindupVertexFrameinstances that contain any of the given property values.- Specified by:
withPropertyin interfaceQueryBuilderWith
-
withProperty
public QueryBuilderWith withProperty(String property)
Description copied from interface:QueryBuilderWithNarrow the query toWindupVertexFrameinstances that have the given property defined.- Specified by:
withPropertyin interfaceQueryBuilderWith
-
withoutProperty
public QueryBuilderWith withoutProperty(String property)
Description copied from interface:QueryBuilderWithNarrow the query toWindupVertexFrameinstances that satisfy the given property comparison.- Specified by:
withoutPropertyin interfaceQueryBuilderWith
-
withProperty
public QueryBuilderWith withProperty(String property, Object searchValue, Object... searchValues)
Description copied from interface:QueryBuilderWithNarrow the query toWindupVertexFrameinstances that contain any given property value.- Specified by:
withPropertyin interfaceQueryBuilderWith
-
withProperty
public QueryBuilderWith withProperty(String property, QueryPropertyComparisonType searchType, Object searchValue)
Description copied from interface:QueryBuilderWithNarrow the query toWindupVertexFrameinstances that satisfy the given property comparison.- Specified by:
withPropertyin interfaceQueryBuilderWith
-
piped
public QueryBuilderPiped piped(QueryGremlinCriterion criterion)
Description copied from interface:QueryBuilderFromNarrow the query via aQueryGremlinCriterionin order to execute Gremlin queries.- Specified by:
pipedin interfaceQueryBuilderFrom- Specified by:
pipedin interfaceQueryBuilderPiped- Specified by:
pipedin interfaceQueryBuilderWith
-
getPipelineCriteria
public Collection<QueryGremlinCriterion> getPipelineCriteria()
-
filteredBy
public <FRAMETYPE extends org.jboss.windup.graph.model.WindupVertexFrame> QueryBuilderAs filteredBy(org.jboss.forge.furnace.util.Predicate<FRAMETYPE> predicate)
Description copied from interface:QueryBuilderWithNarrow the query with the givenPredicate- Specified by:
filteredByin interfaceQueryBuilderWith
-
-