static Optional < String > validateRelationHasRolePlayers ( Relation relation ) { if ( ! relation . rolePlayers ( ) . findAny ( ) . isPresent ( ) ) { return Optional . of ( ErrorMessage . VALIDATION_RELATION_WITH_NO_ROLE_PLAYERS . getMessage ( relation . id ( ) , relation . type ( ) . label ( ) ) ) ; } return Optional . empty ( ) ; }
Checks if a Relation has at least one role player .