示例#1
0
        internal void PutUniquenessConstraint(ConstraintRule rule)
        {
            IndexBackedConstraintDescriptor constraintDescriptor = ( IndexBackedConstraintDescriptor )rule.ConstraintDescriptor;

            _uniquenessConstraintsById.put(rule.Id, constraintDescriptor);
            _constraintsByLabelThenProperty.add(constraintDescriptor);
        }
示例#2
0
        internal void RemoveUniquenessConstraint(long constraintId)
        {
            IndexBackedConstraintDescriptor constraint = _uniquenessConstraintsById.remove(constraintId);

            if (constraint != null)
            {
                SelectConstraintsByEntityType(constraint.Schema().entityType()).remove(constraint);
            }
        }
示例#3
0
 private void AddConstraintToLookups(IndexBackedConstraintDescriptor constraint)
 {
     SelectConstraintsByEntityType(constraint.Schema().entityType()).add(constraint);
 }
示例#4
0
 private static IndexDescriptor GetIndexForIndexBackedConstraint(IndexBackedConstraintDescriptor constraint)
 {
     return(constraint.OwnedIndexDescriptor());
 }
示例#5
0
 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))
 {
 }