/** * Check that the inherited classes are the same as the entity bean (aka all * enhanced or all dynamically subclassed). */ private void checkInheritedClasses(Class<?> beanClass) { Class<?> superclass = beanClass.getSuperclass(); if (Object.class.equals(superclass)) { // we got to the top of the inheritance return; } if (Model.class.equals(superclass)) { // top of the inheritance. Not enhancing Model at this stage return; } if (!EntityBean.class.isAssignableFrom(superclass)) { if (isMappedSuperWithNoProperties(superclass)) { // ok to stop and treat just the same as Object.class return; } throw new BeanNotEnhancedException("Super type " + superclass + " is not enhanced? Check the packages specified in ebean.mf See https://ebean.io/docs/trouble-shooting#not-enhanced"); } // recursively continue up the inheritance hierarchy checkInheritedClasses(superclass); }
/** * Test the bean type to see if it implements EntityBean interface already. */ private void setEntityBeanClass(DeployBeanDescriptor<?> desc) { Class<?> beanClass = desc.getBeanType(); if (!hasEntityBeanInterface(beanClass)) { String msg = "Bean " + beanClass + " is not enhanced? Check packages specified in ebean.mf. If you are running in IDEA or " + "Eclipse check that the enhancement plugin is installed. See https://ebean.io/docs/trouble-shooting#not-enhanced"; throw new BeanNotEnhancedException(msg); } // the bean already implements EntityBean checkInheritedClasses(beanClass); entityBeanCount++; }
/** * Check that the inherited classes are the same as the entity bean (aka all * enhanced or all dynamically subclassed). */ private void checkInheritedClasses(Class<?> beanClass) { Class<?> superclass = beanClass.getSuperclass(); if (Object.class.equals(superclass)) { // we got to the top of the inheritance return; } if (Model.class.equals(superclass)) { // top of the inheritance. Not enhancing Model at this stage return; } if (!EntityBean.class.isAssignableFrom(superclass)) { if (isMappedSuperWithNoProperties(superclass)) { // ok to stop and treat just the same as Object.class return; } throw new BeanNotEnhancedException("Super type " + superclass + " is not enhanced? Check the packages specified in ebean.mf See https://ebean.io/docs/trouble-shooting#not-enhanced"); } // recursively continue up the inheritance hierarchy checkInheritedClasses(superclass); }
/** * Test the bean type to see if it implements EntityBean interface already. */ private void setEntityBeanClass(DeployBeanDescriptor<?> desc) { Class<?> beanClass = desc.getBeanType(); if (!hasEntityBeanInterface(beanClass)) { String msg = "Bean " + beanClass + " is not enhanced? Check packages specified in ebean.mf. If you are running in IDEA or " + "Eclipse check that the enhancement plugin is installed. See https://ebean.io/docs/trouble-shooting#not-enhanced"; throw new BeanNotEnhancedException(msg); } // the bean already implements EntityBean checkInheritedClasses(beanClass); entityBeanCount++; }