public ConditionQuery neq(HugeKeys key, Object value) { return this.query(Condition.neq(key, value)); }
private static Condition convNotin2And(Relation relation) { assert relation.relation() == Condition.RelationType.NOT_IN; Object key = relation.key(); @SuppressWarnings("unchecked") List<Object> values = (List<Object>) relation.value(); Condition cond; Condition conds = null; for (Object value : values) { if (key instanceof HugeKeys) { cond = Condition.neq((HugeKeys) key, value); } else { cond = Condition.neq((Id) key, value); } conds = conds == null ? cond : Condition.and(conds, cond); } return conds; }
private static Relation convCompare2SyspropRelation(HugeGraph graph, HugeType type, HasContainer has) { BiPredicate<?, ?> bp = has.getPredicate().getBiPredicate(); assert bp instanceof Compare; HugeKeys key = string2HugeKey(has.getKey()); Object value = convSysValueIfNeeded(graph, type, key, has.getValue()); switch ((Compare) bp) { case eq: return Condition.eq(key, value); case gt: return Condition.gt(key, value); case gte: return Condition.gte(key, value); case lt: return Condition.lt(key, value); case lte: return Condition.lte(key, value); case neq: return Condition.neq(key, value); } throw newUnsupportedPredicate(has.getPredicate()); }
private static Relation convCompare2UserpropRelation(HugeGraph graph, HugeType type, HasContainer has) { BiPredicate<?, ?> bp = has.getPredicate().getBiPredicate(); assert bp instanceof Compare; String key = has.getKey(); PropertyKey pkey = graph.propertyKey(key); Id pkeyId = pkey.id(); Object value = validPredicateValue(has.getValue(), pkey); switch ((Compare) bp) { case eq: return Condition.eq(pkeyId, value); case gt: return Condition.gt(pkeyId, value); case gte: return Condition.gte(pkeyId, value); case lt: return Condition.lt(pkeyId, value); case lte: return Condition.lte(pkeyId, value); case neq: return Condition.neq(pkeyId, value); } throw newUnsupportedPredicate(has.getPredicate()); }
public ConditionQuery neq(HugeKeys key, Object value) { return this.query(Condition.neq(key, value)); }
private static Condition convNotin2And(Relation relation) { assert relation.relation() == Condition.RelationType.NOT_IN; Object key = relation.key(); @SuppressWarnings("unchecked") List<Object> values = (List<Object>) relation.value(); Condition cond; Condition conds = null; for (Object value : values) { if (key instanceof HugeKeys) { cond = Condition.neq((HugeKeys) key, value); } else { cond = Condition.neq((Id) key, value); } conds = conds == null ? cond : Condition.and(conds, cond); } return conds; }
private static Relation convCompare2SyspropRelation(HugeGraph graph, HugeType type, HasContainer has) { BiPredicate<?, ?> bp = has.getPredicate().getBiPredicate(); assert bp instanceof Compare; HugeKeys key = string2HugeKey(has.getKey()); Object value = convSysValueIfNeeded(graph, type, key, has.getValue()); switch ((Compare) bp) { case eq: return Condition.eq(key, value); case gt: return Condition.gt(key, value); case gte: return Condition.gte(key, value); case lt: return Condition.lt(key, value); case lte: return Condition.lte(key, value); case neq: return Condition.neq(key, value); } throw newUnsupportedPredicate(has.getPredicate()); }
private static Relation convCompare2UserpropRelation(HugeGraph graph, HugeType type, HasContainer has) { BiPredicate<?, ?> bp = has.getPredicate().getBiPredicate(); assert bp instanceof Compare; String key = has.getKey(); PropertyKey pkey = graph.propertyKey(key); Id pkeyId = pkey.id(); Object value = validPredicateValue(has.getValue(), pkey); switch ((Compare) bp) { case eq: return Condition.eq(pkeyId, value); case gt: return Condition.gt(pkeyId, value); case gte: return Condition.gte(pkeyId, value); case lt: return Condition.lt(pkeyId, value); case lte: return Condition.lte(pkeyId, value); case neq: return Condition.neq(pkeyId, value); } throw newUnsupportedPredicate(has.getPredicate()); }