@Test void testValidateEntityTypeNotReferenced() { initializeDataServiceMock(Stream.empty()); defaultValueReferenceValidator.validateEntityTypeNotReferenced(entityType); }
@Override public void validateEntityTypeNotReferenced(EntityType entityType) { if (!getDefaultValueMap(entityType).isEmpty()) { throw new MolgenisValidationException( new ConstraintViolation( String.format( "'%s' entities are referenced as default value by attributes", entityType.getLabel()))); } }
DefaultValueReferenceValidatorImpl implements DefaultValueReferenceValidator { @Override public void validateEntityTypeNotReferenced(EntityType entityType) { if (!getDefaultValueMap(entityType).isEmpty()) { throw new MolgenisValidationException( new ConstraintViolation( String.format( "'%s' entities are referenced as default value by attributes", entityType.getLabel()))); } } }
DefaultValueReferenceValidatorImpl implements DefaultValueReferenceValidator { @Override public void validateEntityTypeNotReferenced(EntityType entityType) { if (!getDefaultValueMap(entityType).isEmpty()) { throw new MolgenisValidationException( new ConstraintViolation( String.format( "'%s' entities are referenced as default value by attributes", entityType.getLabel()))); } } DefaultValueReferenceValidatorImpl(DataService dataService); }
DefaultValueReferenceValidatorImpl implements DefaultValueReferenceValidator { @Override public void validateEntityTypeNotReferenced(EntityType entityType) { if (!getDefaultValueMap(entityType).isEmpty()) { throw new MolgenisValidationException( new ConstraintViolation( String.format( "'%s' entities are referenced as default value by attributes", entityType.getLabel()))); } } DefaultValueReferenceValidatorImpl(DataService dataService); @Override void validateEntityNotReferenced(Entity entity); @Override Stream<Entity> validateEntitiesNotReferenced(
      Stream<Entity> entityStream, EntityType entityType); @Override void validateEntityNotReferencedById(Object entityId, EntityType entityType); @Override Stream<Object> validateEntitiesNotReferencedById(
      Stream<Object> entityIdStream, EntityType entityType); @Override void validateEntityTypeNotReferenced(EntityType entityType); }
DefaultValueReferenceValidatorImpl implements DefaultValueReferenceValidator { @Override public void validateEntityTypeNotReferenced(EntityType entityType) { if (!getDefaultValueMap(entityType).isEmpty()) { throw new MolgenisValidationException( new ConstraintViolation( String.format( "'%s' entities are referenced as default value by attributes", entityType.getLabel()))); } } DefaultValueReferenceValidatorImpl(DataService dataService); @Override void validateEntityNotReferenced(Entity entity); @Override Stream<Entity> validateEntitiesNotReferenced(
      Stream<Entity> entityStream, EntityType entityType); @Override void validateEntityNotReferencedById(Object entityId, EntityType entityType); @Override Stream<Object> validateEntitiesNotReferencedById(
      Stream<Object> entityIdStream, EntityType entityType); @Override void validateEntityTypeNotReferenced(EntityType entityType);  }