use of io.crnk.meta.provider.MetaFilterBase in project crnk-framework by crnk-project.
the class ValidationMetaProvider method getFilters.
@Override
public Collection<MetaFilter> getFilters() {
return Arrays.asList((MetaFilter) new MetaFilterBase() {
@Override
public void onInitialized(MetaElement element) {
if (element instanceof MetaAttribute) {
MetaAttribute attr = (MetaAttribute) element;
NotNull notNull = attr.getAnnotation(NotNull.class);
if (notNull != null) {
attr.setNullable(false);
}
}
}
});
}
Aggregations