当前位置: 首页>>代码示例>>Java>>正文


Java Column类代码示例

本文整理汇总了Java中org.alfresco.repo.search.impl.querymodel.Column的典型用法代码示例。如果您正苦于以下问题:Java Column类的具体用法?Java Column怎么用?Java Column使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Column类属于org.alfresco.repo.search.impl.querymodel包,在下文中一共展示了Column类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildDisjunction

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
/**
 * @param orNode CommonTree
 * @param factory QueryModelFactory
 * @param functionEvaluationContext FunctionEvaluationContext
 * @param selectors Map<String, Selector>
 * @param columnMap HashMap<String, Column>
 * @return Constraint
 */
private Constraint buildDisjunction(CommonTree orNode, QueryModelFactory factory,
        FunctionEvaluationContext functionEvaluationContext, Map<String, Selector> selectors,
        HashMap<String, Column> columnMap)
{
    List<Constraint> constraints = new ArrayList<Constraint>(orNode.getChildCount());
    for (int i = 0; i < orNode.getChildCount(); i++)
    {
        CommonTree andNode = (CommonTree) orNode.getChild(i);
        Constraint constraint = buildConjunction(andNode, factory, functionEvaluationContext, selectors, columnMap);
        constraints.add(constraint);
    }
    if (constraints.size() == 1)
    {
        return constraints.get(0);
    } else
    {
        return factory.createDisjunction(constraints);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:28,代码来源:CMISQueryParser.java

示例2: buildConjunction

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
/**
 * @param andNode CommonTree
 * @param factory QueryModelFactory
 * @param functionEvaluationContext FunctionEvaluationContext
 * @param selectors Map<String, Selector>
 * @param columnMap HashMap<String, Column>
 * @return Constraint
 */
private Constraint buildConjunction(CommonTree andNode, QueryModelFactory factory,
        FunctionEvaluationContext functionEvaluationContext, Map<String, Selector> selectors,
        HashMap<String, Column> columnMap)
{
    List<Constraint> constraints = new ArrayList<Constraint>(andNode.getChildCount());
    for (int i = 0; i < andNode.getChildCount(); i++)
    {
        CommonTree notNode = (CommonTree) andNode.getChild(i);
        Constraint constraint = buildNegation(notNode, factory, functionEvaluationContext, selectors, columnMap);
        constraints.add(constraint);
    }
    if (constraints.size() == 1 && constraints.get(0).getOccur() != Occur.EXCLUDE)
    {
        return constraints.get(0);
    } else
    {
        return factory.createConjunction(constraints);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:28,代码来源:CMISQueryParser.java

示例3: buildNegation

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
/**
 * @param notNode CommonTree
 * @param factory QueryModelFactory
 * @param functionEvaluationContext FunctionEvaluationContext
 * @param selectors Map<String, Selector>
 * @param columnMap HashMap<String, Column>
 * @return Constraint
 */
private Constraint buildNegation(CommonTree notNode, QueryModelFactory factory,
        FunctionEvaluationContext functionEvaluationContext, Map<String, Selector> selectors,
        HashMap<String, Column> columnMap)
{
    if (notNode.getType() == CMISParser.NEGATION)
    {
        Constraint constraint = buildTest((CommonTree) notNode.getChild(0), factory, functionEvaluationContext,
                selectors, columnMap);
        constraint.setOccur(Occur.EXCLUDE);
        return constraint;
    } else
    {
        return buildTest(notNode, factory, functionEvaluationContext, selectors, columnMap);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:24,代码来源:CMISQueryParser.java

示例4: buildFTSTest

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
static private Constraint buildFTSTest(CommonTree argNode, QueryModelFactory factory, FunctionEvaluationContext functionEvaluationContext,
        Selector selector, Map<String, Column> columnMap, String defaultField)
{
    CommonTree testNode = argNode;
    switch (testNode.getType())
    {
    case CMIS_FTSParser.DISJUNCTION:
    case CMIS_FTSParser.CONJUNCTION:
        return buildFTSConnective(testNode, factory, functionEvaluationContext, selector, columnMap, defaultField);
    case CMIS_FTSParser.TERM:
        return buildTerm(testNode, factory, functionEvaluationContext, selector, columnMap);
    case CMIS_FTSParser.PHRASE:
        return buildPhrase(testNode, factory, functionEvaluationContext, selector, columnMap);
    default:
        throw new FTSQueryException("Unsupported FTS option " + testNode.getText());
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:18,代码来源:CMISFTSQueryParser.java

示例5: BaseQuery

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
public BaseQuery(List<Column> columns, Source source, Constraint constraint, List<Ordering> orderings)
{
    this.columns = columns;
    this.source = source;
    this.constraint = constraint;
    this.orderings = orderings;
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:8,代码来源:BaseQuery.java

示例6: buildTest

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
/**
 * @param testNode CommonTree
 * @param factory QueryModelFactory
 * @param functionEvaluationContext FunctionEvaluationContext
 * @param selectors Map<String, Selector>
 * @param columnMap HashMap<String, Column>
 * @return Constraint
 */
private Constraint buildTest(CommonTree testNode, QueryModelFactory factory,
        FunctionEvaluationContext functionEvaluationContext, Map<String, Selector> selectors,
        HashMap<String, Column> columnMap)
{
    if (testNode.getType() == CMISParser.DISJUNCTION)
    {
        return buildDisjunction(testNode, factory, functionEvaluationContext, selectors, columnMap);
    } else
    {
        return buildPredicate(testNode, factory, functionEvaluationContext, selectors, columnMap);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:21,代码来源:CMISQueryParser.java

示例7: checkPredicateConditionsForLike

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
private void checkPredicateConditionsForLike(Map<String, Argument> functionArguments,
        FunctionEvaluationContext functionEvaluationContext, Map<String, Column> columnMap)
{
    if (options.getQueryMode() == CMISQueryMode.CMS_STRICT)
    {
        PropertyArgument propertyArgument = (PropertyArgument) functionArguments.get(Like.ARG_PROPERTY);

        boolean isMultiValued = functionEvaluationContext.isMultiValued(propertyArgument.getPropertyName());

        if (isMultiValued)
        {
            throw new QueryModelException("Like is not supported for multi-valued properties");
        }

        String cmisPropertyName = propertyArgument.getPropertyName();

        Column column = columnMap.get(cmisPropertyName);
        if (column != null)
        {
            // check for function type
            if (column.getFunction().getName().equals(PropertyAccessor.NAME))
            {
                PropertyArgument arg = (PropertyArgument) column.getFunctionArguments().get(
                        PropertyAccessor.ARG_PROPERTY);
                cmisPropertyName = arg.getPropertyName();
            } else
            {
                throw new CmisInvalidArgumentException("Complex column reference not supoprted in LIKE "
                        + cmisPropertyName);
            }
        }

        PropertyDefinitionWrapper propDef = cmisDictionaryService.findPropertyByQueryName(cmisPropertyName);
        if (propDef.getPropertyDefinition().getPropertyType() != PropertyType.STRING)
        {
            throw new CmisInvalidArgumentException("LIKE is only supported against String types" + cmisPropertyName);
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:40,代码来源:CMISQueryParser.java

示例8: buildFTS

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
@SuppressWarnings("unused")
static public Constraint buildFTS(String ftsExpression, QueryModelFactory factory, FunctionEvaluationContext functionEvaluationContext, Selector selector,
        Map<String, Column> columnMap, String defaultField)
{
    // TODO: Decode sql escape for '' should do in CMIS layer

    // parse templates to trees ...

    CMIS_FTSParser parser = null;
    try
    {
        CharStream cs = new ANTLRStringStream(ftsExpression);
        CMIS_FTSLexer lexer = new CMIS_FTSLexer(cs);
        CommonTokenStream tokens = new CommonTokenStream(lexer);
        parser = new CMIS_FTSParser(tokens);
        CommonTree ftsNode = (CommonTree) parser.cmisFtsQuery().getTree();
        return buildFTSConnective(ftsNode, factory, functionEvaluationContext, selector, columnMap, defaultField);
    }
    catch (RecognitionException e)
    {
        if (parser != null)
        {
            String[] tokenNames = parser.getTokenNames();
            String hdr = parser.getErrorHeader(e);
            String msg = parser.getErrorMessage(e, tokenNames);
            throw new FTSQueryException(hdr + "\n" + msg, e);
        }
        return null;
    }

}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:32,代码来源:CMISFTSQueryParser.java

示例9: buildPhrase

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的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);
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:13,代码来源:CMISFTSQueryParser.java

示例10: buildTerm

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的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);
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:13,代码来源:CMISFTSQueryParser.java

示例11: DBQuery

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
/**
 * @param source Source
 * @param constraint Constraint
 */
public DBQuery(List<Column> columns, Source source, Constraint constraint, List<Ordering> orderings)
{
    super(columns, source, constraint, orderings);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:DBQuery.java

示例12: DBOrdering

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
/**
 * @param column Column
 * @param order Order
 */
public DBOrdering(Column column, Order order)
{
    super(column, order);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:DBOrdering.java

示例13: createQuery

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
@Override
public Query createQuery(List<Column> columns, Source source, Constraint constraint, List<Ordering> orderings)
{
    return new DBQuery(columns, source, constraint, orderings);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:DBQueryModelFactory.java

示例14: createColumn

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
@Override
public Column createColumn(Function function, Map<String, Argument> functionArguments, String alias)
{
   return new DBColumn(function, functionArguments, alias);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:DBQueryModelFactory.java

示例15: createOrdering

import org.alfresco.repo.search.impl.querymodel.Column; //导入依赖的package包/类
@Override
public Ordering createOrdering(Column column, Order order)
{
    return new DBOrdering(column, order);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:DBQueryModelFactory.java


注:本文中的org.alfresco.repo.search.impl.querymodel.Column类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。