Exemple #1
0
 @Override
 public Iterator<UniquenessConstraint> constraintsGetAll() {
   return schemaStorage.schemaRules(
       UNIQUENESS_CONSTRAINT_TO_RULE,
       SchemaRule.Kind.UNIQUENESS_CONSTRAINT,
       Predicates.<UniquenessConstraintRule>TRUE());
 }
Exemple #2
0
 @Override
 public Iterator<UniquenessConstraint> constraintsGetForLabel(int labelId) {
   return schemaStorage.schemaRules(
       UNIQUENESS_CONSTRAINT_TO_RULE,
       UniquenessConstraintRule.class,
       labelId,
       Predicates.<UniquenessConstraintRule>TRUE());
 }
Exemple #3
0
 @Override
 public Iterator<UniquenessConstraint> constraintsGetForLabelAndPropertyKey(
     int labelId, final int propertyKeyId) {
   return schemaStorage.schemaRules(
       UNIQUENESS_CONSTRAINT_TO_RULE,
       UniquenessConstraintRule.class,
       labelId,
       new Predicate<UniquenessConstraintRule>() {
         @Override
         public boolean accept(UniquenessConstraintRule rule) {
           return rule.containsPropertyKeyId(propertyKeyId);
         }
       });
 }