com.thinkaurelius.titan.graphdb.query.QueryUtil.addConstraint()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中com.thinkaurelius.titan.graphdb.query.QueryUtil.addConstraint方法的一些代码示例,展示了QueryUtil.addConstraint的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryUtil.addConstraint方法的具体详情如下:
包路径:com.thinkaurelius.titan.graphdb.query.QueryUtil
类名称:QueryUtil
方法名:addConstraint

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);

相关文章