本文整理了Java中com.thinkaurelius.titan.graphdb.query.QueryUtil.addConstraint
方法的一些代码示例,展示了QueryUtil.addConstraint
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryUtil.addConstraint
方法的具体详情如下:
包路径:com.thinkaurelius.titan.graphdb.query.QueryUtil
类名称:QueryUtil
方法名:addConstraint
暂无
代码示例来源:origin: thinkaurelius/titan
if (values.isEmpty()) continue; //Simply ignore since trivially satisfied
for (Object invalue : values)
addConstraint(type, Cmp.NOT_EQUAL, invalue, conditions, tx);
} else {
Preconditions.checkArgument(predicate == Contain.IN);
return null; //Cannot be satisfied
} if (values.size() == 1) {
addConstraint(type, Cmp.EQUAL, values.iterator().next(), conditions, tx);
} else {
Or<E> nested = new Or<E>(values.size());
for (Object invalue : values)
addConstraint(type, Cmp.EQUAL, invalue, nested, tx);
conditions.add(nested);
addConstraint(type, predicate, value, conditions, tx);
代码示例来源:origin: com.thinkaurelius.titan/titan-core
if (values.isEmpty()) continue; //Simply ignore since trivially satisfied
for (Object invalue : values)
addConstraint(type, Cmp.NOT_EQUAL, invalue, conditions, tx);
} else {
Preconditions.checkArgument(predicate == Contain.IN);
return null; //Cannot be satisfied
} if (values.size() == 1) {
addConstraint(type, Cmp.EQUAL, values.iterator().next(), conditions, tx);
} else {
Or<E> nested = new Or<E>(values.size());
for (Object invalue : values)
addConstraint(type, Cmp.EQUAL, invalue, nested, tx);
conditions.add(nested);
addConstraint(type, predicate, value, conditions, tx);
代码示例来源:origin: org.hawkular.titan/titan-core
if (predicate == Contain.NOT_IN) {
for (Object invalue : values)
addConstraint(type, Cmp.NOT_EQUAL, invalue, conditions, tx);
} else {
Preconditions.checkArgument(predicate == Contain.IN);
if (values.size() == 1) {
addConstraint(type, Cmp.EQUAL, values.iterator().next(), conditions, tx);
} else {
Or<E> nested = new Or<E>(values.size());
for (Object invalue : values)
addConstraint(type, Cmp.EQUAL, invalue, nested, tx);
conditions.add(nested);
addConstraint(type, predicate, value, conditions, tx);
内容来源于网络,如有侵权,请联系作者删除!