Interface ValidatingRelationDescriptor<S extends Relatable,T extends Relatable>

All Superinterfaces:
RelationDescriptor<S,T>
All Known Implementing Classes:
AuthenticatedUserRelationDescriptor, DefaultValidatingRelationDescriptor

@ExperimentalSpi public interface ValidatingRelationDescriptor<S extends Relatable,T extends Relatable> extends RelationDescriptor<S,T>
A RelationDescriptor which provides a method to perform validation on descriptor operations.
Since:
5.11
  • Method Details

    • canRelate

      ValidationResult canRelate(S source, T target)
      Returns ValidationResult, which indicates if two given entities may form a relation, described by this RelationDescriptor object
      Parameters:
      source - entity
      target - entity
      Returns:
      validation result