Package com.github.jmkgreen.morphia.callbacks.TestSimpleValidationViaInterceptor.NonNullValidation

Examples of com.github.jmkgreen.morphia.callbacks.TestSimpleValidationViaInterceptor.NonNullValidation.NonNullValidationException


    public void prePersist(Object ent, DBObject dbObj, Mapper mapr) {
      MappedClass mc = mapr.getMappedClass(ent);
      List<MappedField> fieldsToTest = mc.getFieldsAnnotatedWith(NonNull.class);
      for (MappedField mf : fieldsToTest) {
        if (mf.getFieldValue(ent) == null)
          throw new NonNullValidationException(mf);
      }
    }
View Full Code Here

TOP

Related Classes of com.github.jmkgreen.morphia.callbacks.TestSimpleValidationViaInterceptor.NonNullValidation.NonNullValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.