Exemplo n.º 1
0
 @Override
 public Long indexGetOwningUniquenessConstraintId(IndexDescriptor index)
     throws SchemaRuleNotFoundException {
   return schemaStorage
       .indexRule(index.getLabelId(), index.getPropertyKeyId())
       .getOwningConstraint();
 }
Exemplo n.º 2
0
 @Override
 public Iterator<UniquenessConstraint> constraintsGetAll() {
   return schemaStorage.schemaRules(
       UNIQUENESS_CONSTRAINT_TO_RULE,
       SchemaRule.Kind.UNIQUENESS_CONSTRAINT,
       Predicates.<UniquenessConstraintRule>TRUE());
 }
Exemplo n.º 3
0
 @Override
 public Iterator<UniquenessConstraint> constraintsGetForLabel(int labelId) {
   return schemaStorage.schemaRules(
       UNIQUENESS_CONSTRAINT_TO_RULE,
       UniquenessConstraintRule.class,
       labelId,
       Predicates.<UniquenessConstraintRule>TRUE());
 }
Exemplo n.º 4
0
 private long indexId(IndexDescriptor descriptor) throws IndexNotFoundKernelException {
   try {
     return schemaStorage
         .indexRule(descriptor.getLabelId(), descriptor.getPropertyKeyId())
         .getId();
   } catch (SchemaRuleNotFoundException e) {
     throw new IndexNotFoundKernelException(e.getMessage(), e);
   }
 }
Exemplo n.º 5
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);
         }
       });
 }
Exemplo n.º 6
0
 @Override
 public long indexGetCommittedId(IndexDescriptor index, SchemaStorage.IndexRuleKind kind)
     throws SchemaRuleNotFoundException {
   return schemaStorage.indexRule(index.getLabelId(), index.getPropertyKeyId()).getId();
 }
Exemplo n.º 7
0
 @Override
 public IndexDescriptor indexesGetForLabelAndPropertyKey(int labelId, int propertyKey)
     throws SchemaRuleNotFoundException {
   return descriptor(schemaStorage.indexRule(labelId, propertyKey));
 }