本文整理匯總了Java中org.alfresco.repo.search.impl.querymodel.QueryModelFactory.createFunctionalConstraint方法的典型用法代碼示例。如果您正苦於以下問題:Java QueryModelFactory.createFunctionalConstraint方法的具體用法?Java QueryModelFactory.createFunctionalConstraint怎麽用?Java QueryModelFactory.createFunctionalConstraint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.alfresco.repo.search.impl.querymodel.QueryModelFactory
的用法示例。
在下文中一共展示了QueryModelFactory.createFunctionalConstraint方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildPhrase
import org.alfresco.repo.search.impl.querymodel.QueryModelFactory; //導入方法依賴的package包/類
static private Constraint buildPhrase(CommonTree testNode, QueryModelFactory factory,
FunctionEvaluationContext functionEvaluationContext, Selector selector, Map<String, Column> columnMap)
{
String functionName = FTSPhrase.NAME;
Function function = factory.getFunction(functionName);
Map<String, Argument> functionArguments = new LinkedHashMap<String, Argument>();
LiteralArgument larg = factory.createLiteralArgument(FTSPhrase.ARG_PHRASE, DataTypeDefinition.TEXT, getText(testNode.getChild(0)));
functionArguments.put(larg.getName(), larg);
larg = factory.createLiteralArgument(FTSPhrase.ARG_TOKENISATION_MODE, DataTypeDefinition.ANY, AnalysisMode.DEFAULT);
functionArguments.put(larg.getName(), larg);
return factory.createFunctionalConstraint(function, functionArguments);
}
示例2: buildTerm
import org.alfresco.repo.search.impl.querymodel.QueryModelFactory; //導入方法依賴的package包/類
static private Constraint buildTerm(CommonTree testNode, QueryModelFactory factory, FunctionEvaluationContext functionEvaluationContext,
Selector selector, Map<String, Column> columnMap)
{
String functionName = FTSTerm.NAME;
Function function = factory.getFunction(functionName);
Map<String, Argument> functionArguments = new LinkedHashMap<String, Argument>();
LiteralArgument larg = factory.createLiteralArgument(FTSTerm.ARG_TERM, DataTypeDefinition.TEXT, getText(testNode.getChild(0)));
functionArguments.put(larg.getName(), larg);
larg = factory.createLiteralArgument(FTSTerm.ARG_TOKENISATION_MODE, DataTypeDefinition.ANY, AnalysisMode.DEFAULT);
functionArguments.put(larg.getName(), larg);
return factory.createFunctionalConstraint(function, functionArguments);
}