Examples of NonNullValidationException


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

Examples of org.mongodb.morphia.callbacks.TestSimpleValidationViaInterceptor.NonNullValidation.NonNullValidationException

        public void prePersist(final Object ent, final DBObject dbObj, final Mapper mapper) {
            final MappedClass mc = mapper.getMappedClass(ent);
            final List<MappedField> fieldsToTest = mc.getFieldsAnnotatedWith(NonNull.class);
            for (final MappedField mf : fieldsToTest) {
                if (mf.getFieldValue(ent) == null) {
                    throw new NonNullValidationException(mf);
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.