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


Java In类代码示例

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


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

示例1: DBQueryModelFactory

import org.alfresco.repo.search.impl.querymodel.impl.functions.In; //导入依赖的package包/类
public DBQueryModelFactory()
{
    functions.put(Equals.NAME, new DBEquals());
    functions.put(PropertyAccessor.NAME, new DBPropertyAccessor());
    functions.put(Score.NAME, new DBScore());
    functions.put(Upper.NAME, new DBUpper());
    functions.put(Lower.NAME, new DBLower());

    functions.put(NotEquals.NAME, new DBNotEquals());
    functions.put(LessThan.NAME, new DBLessThan());
    functions.put(LessThanOrEquals.NAME, new DBLessThanOrEquals());
    functions.put(GreaterThan.NAME, new DBGreaterThan());
    functions.put(GreaterThanOrEquals.NAME, new DBGreaterThanOrEquals());

    functions.put(In.NAME, new DBIn());
    functions.put(Like.NAME, new DBLike());
    functions.put(Exists.NAME, new DBExists());

    functions.put(Child.NAME, new DBChild());
    functions.put(Descendant.NAME, new DBDescendant());

    functions.put(FTSTerm.NAME, new DBFTSTerm());
    functions.put(FTSPhrase.NAME, new DBFTSPhrase());
    functions.put(FTSProximity.NAME, new DBFTSProximity());
    functions.put(FTSRange.NAME, new DBFTSRange());
    functions.put(FTSPrefixTerm.NAME, new DBFTSPrefixTerm());
    functions.put(FTSWildTerm.NAME, new DBFTSWildTerm());
    functions.put(FTSFuzzyTerm.NAME, new DBFTSFuzzyTerm());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:30,代码来源:DBQueryModelFactory.java

示例2: LuceneQueryModelFactory

import org.alfresco.repo.search.impl.querymodel.impl.functions.In; //导入依赖的package包/类
/**
 * Default lucene query model factory and functions
 */
public LuceneQueryModelFactory()
{
    functions.put(Equals.NAME, new LuceneEquals<Q, S, E>());
    functions.put(PropertyAccessor.NAME, new LucenePropertyAccessor<Q, S, E>());
    functions.put(Score.NAME, new LuceneScore<Q, S, E>());
    functions.put(Upper.NAME, new LuceneUpper<Q, S, E>());
    functions.put(Lower.NAME, new LuceneLower<Q, S, E>());

    functions.put(NotEquals.NAME, new LuceneNotEquals<Q, S, E>());
    functions.put(LessThan.NAME, new LuceneLessThan<Q, S, E>());
    functions.put(LessThanOrEquals.NAME, new LuceneLessThanOrEquals<Q, S, E>());
    functions.put(GreaterThan.NAME, new LuceneGreaterThan<Q, S, E>());
    functions.put(GreaterThanOrEquals.NAME, new LuceneGreaterThanOrEquals<Q, S, E>());

    functions.put(In.NAME, new LuceneIn<Q, S, E>());
    functions.put(Like.NAME, new LuceneLike<Q, S, E>());
    functions.put(Exists.NAME, new LuceneExists<Q, S, E>());

    functions.put(Child.NAME, new LuceneChild<Q, S, E>());
    functions.put(Descendant.NAME, new LuceneDescendant<Q, S, E>());

    functions.put(FTSTerm.NAME, new LuceneFTSTerm<Q, S, E>());
    functions.put(FTSPhrase.NAME, new LuceneFTSPhrase<Q, S, E>());
    functions.put(FTSProximity.NAME, new LuceneFTSProximity<Q, S, E>());
    functions.put(FTSRange.NAME, new LuceneFTSRange<Q, S, E>());
    functions.put(FTSPrefixTerm.NAME, new LuceneFTSPrefixTerm<Q, S, E>());
    functions.put(FTSWildTerm.NAME, new LuceneFTSWildTerm<Q, S, E>());
    functions.put(FTSFuzzyTerm.NAME, new LuceneFTSFuzzyTerm<Q, S, E>());
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:33,代码来源:LuceneQueryModelFactory.java

示例3: checkPredicateConditionsForIn

import org.alfresco.repo.search.impl.querymodel.impl.functions.In; //导入依赖的package包/类
private void checkPredicateConditionsForIn(Map<String, Argument> functionArguments,
        FunctionEvaluationContext functionEvaluationContext, Map<String, Column> columnMap)
{
    if (options.getQueryMode() == CMISQueryMode.CMS_STRICT)
    {
        PropertyArgument propertyArgument = (PropertyArgument) functionArguments.get(In.ARG_PROPERTY);
        LiteralArgument modeArgument = (LiteralArgument) functionArguments.get(In.ARG_MODE);
        String modeString = DefaultTypeConverter.INSTANCE.convert(String.class,
                modeArgument.getValue(functionEvaluationContext));
        PredicateMode mode = PredicateMode.valueOf(modeString);
        String propertyName = propertyArgument.getPropertyName();

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

        boolean isMultiValued = functionEvaluationContext.isMultiValued(propertyName);

        switch (mode)
        {
        case ANY:
            if (isMultiValued)
            {
                break;
            } else
            {
                throw new QueryModelException("Predicate mode " + PredicateMode.ANY
                        + " is not supported for IN and single valued properties");
            }
        case SINGLE_VALUED_PROPERTY:
            if (isMultiValued)
            {
                throw new QueryModelException("Predicate mode " + PredicateMode.SINGLE_VALUED_PROPERTY
                        + " is not supported for IN and multi-valued properties");
            } else
            {
                break;
            }
        default:
            throw new QueryModelException("Unsupported predicate mode " + mode);
        }

        PropertyDefinitionWrapper propDef = cmisDictionaryService.findPropertyByQueryName(propertyName);
        if (propDef.getPropertyDefinition().getPropertyType() == PropertyType.BOOLEAN)
        {
            throw new QueryModelException("In is not supported for properties of type Boolean");
        }
    }

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


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