internal void PutUniquenessConstraint(ConstraintRule rule) { IndexBackedConstraintDescriptor constraintDescriptor = ( IndexBackedConstraintDescriptor )rule.ConstraintDescriptor; _uniquenessConstraintsById.put(rule.Id, constraintDescriptor); _constraintsByLabelThenProperty.add(constraintDescriptor); }
internal void RemoveUniquenessConstraint(long constraintId) { IndexBackedConstraintDescriptor constraint = _uniquenessConstraintsById.remove(constraintId); if (constraint != null) { SelectConstraintsByEntityType(constraint.Schema().entityType()).remove(constraint); } }
private void AddConstraintToLookups(IndexBackedConstraintDescriptor constraint) { SelectConstraintsByEntityType(constraint.Schema().entityType()).add(constraint); }
private static IndexDescriptor GetIndexForIndexBackedConstraint(IndexBackedConstraintDescriptor constraint) { return(constraint.OwnedIndexDescriptor()); }
public override void ConstraintDoAdd(IndexBackedConstraintDescriptor constraint, long indexId) { ConstraintsChangesDiffSets().add(constraint); CreatedConstraintIndexesByConstraint().put(constraint, indexId); Changed(); }
public UniquePropertyValueValidationException(IndexBackedConstraintDescriptor constraint, ConstraintValidationException.Phase phase, Exception cause) : base(constraint, phase, phase == Phase.Verification ? "Existing data" : "New data", cause) { this._conflicts = Collections.emptySet(); }
public UniquePropertyValueValidationException(IndexBackedConstraintDescriptor constraint, ConstraintValidationException.Phase phase, ISet <IndexEntryConflictException> conflicts) : base(constraint, phase, phase == Phase.Verification ? "Existing data" : "New data", BuildCauseChain(conflicts)) { this._conflicts = conflicts; }
public UniquePropertyValueValidationException(IndexBackedConstraintDescriptor constraint, ConstraintValidationException.Phase phase, IndexEntryConflictException conflict) : this(constraint, phase, Collections.singleton(conflict)) { }