private static <E extends TitanElement> void addConstraint(RelationType type, TitanPredicate predicate, Object value, MultiCondition<E> conditions, StandardTitanTx tx) { if (type.isPropertyKey()) { if (value != null) value = tx.verifyAttribute((PropertyKey) type, value); } else { //t.isEdgeLabel() Preconditions.checkArgument(value instanceof TitanVertex); } PredicateCondition<RelationType, E> pc = new PredicateCondition<RelationType, E>(type, predicate, value); if (!conditions.contains(pc)) conditions.add(pc); }
private static <E extends TitanElement> void addConstraint(RelationType type, TitanPredicate predicate, Object value, MultiCondition<E> conditions, StandardTitanTx tx) { if (type.isPropertyKey()) { if (value != null) value = tx.verifyAttribute((PropertyKey) type, value); } else { //t.isEdgeLabel() Preconditions.checkArgument(value instanceof TitanVertex); } PredicateCondition<RelationType, E> pc = new PredicateCondition<RelationType, E>(type, predicate, value); if (!conditions.contains(pc)) conditions.add(pc); }
private static <E extends TitanElement> void addConstraint(RelationType type, TitanPredicate predicate, Object value, MultiCondition<E> conditions, StandardTitanTx tx) { if (type.isPropertyKey()) { if (value != null) value = tx.verifyAttribute((PropertyKey) type, value); } else { //t.isEdgeLabel() Preconditions.checkArgument(value instanceof TitanVertex); } PredicateCondition<RelationType, E> pc = new PredicateCondition<RelationType, E>(type, predicate, value); if (!conditions.contains(pc)) conditions.add(pc); }