final MappedSuperclass superclass = new MappedSuperclass(clazz.getName()); for (final Field field : clazz.getDeclaredFields()) { if (!field.isSynthetic()) { superclass.addField(transientField);
throw new IllegalStateException("Primary key field " + fieldName + " is not defined in class " + ejbClassName + " or any super classes"); superclass.addField(new Id(fieldName)); mapping.addField(new AttributeOverride(fieldName)); primaryKeyFields.add(fieldName); superclass.addField(new Id(fieldName)); mapping.addField(new AttributeOverride(fieldName)); primaryKeyFields.add(fieldName); idclass.setIdClass(new IdClass(bean.getPrimKeyClass())); throw new IllegalStateException("CMP field " + fieldName + " is not defined in class " + ejbClassName + " or any super classes"); superclass.addField(new Basic(fieldName)); mapping.addField(new AttributeOverride(fieldName));
/** * Create an instance of {@link MappedSuperclass } */ public MappedSuperclass createMappedSuperclass() { return new MappedSuperclass(); }
/** * Check the user-defined entity mappings for a superclass * mapping for a given named class. If the user mappings exist, * remove them from the user list and return them * for inclusion in our generated mappings. * * @param userMappings The current user mapping set. * @param className The name of the class of interest. * @return Returns the superclass mapping for the named class, or * null if the class is not in the mapping set. */ private MappedSuperclass removeMappedSuperclass(final EntityMappings userMappings, final String className) { final MappedSuperclass mappedSuperclass; mappedSuperclass = userMappings.getMappedSuperclassMap().get(className); if (mappedSuperclass != null) { userMappings.getMappedSuperclassMap().remove(mappedSuperclass.getKey()); } return mappedSuperclass; }
throw new IllegalStateException("Primary key field " + fieldName + " is not defined in class " + ejbClassName + " or any super classes"); superclass.addField(new Id(fieldName)); mapping.addField(new AttributeOverride(fieldName)); primaryKeyFields.add(fieldName); superclass.addField(new Id(fieldName)); mapping.addField(new AttributeOverride(fieldName)); primaryKeyFields.add(fieldName); idclass.setIdClass(new IdClass(bean.getPrimKeyClass())); throw new IllegalStateException("CMP field " + fieldName + " is not defined in class " + ejbClassName + " or any super classes"); superclass.addField(new Basic(fieldName)); mapping.addField(new AttributeOverride(fieldName));
/** * Create an instance of {@link MappedSuperclass } */ public MappedSuperclass createMappedSuperclass() { return new MappedSuperclass(); }
/** * Check the user-defined entity mappings for a superclass * mapping for a given named class. If the user mappings exist, * remove them from the user list and return them * for inclusion in our generated mappings. * * @param userMappings The current user mapping set. * @param className The name of the class of interest. * @return Returns the superclass mapping for the named class, or * null if the class is not in the mapping set. */ private MappedSuperclass removeMappedSuperclass(final EntityMappings userMappings, final String className) { final MappedSuperclass mappedSuperclass; mappedSuperclass = userMappings.getMappedSuperclassMap().get(className); if (mappedSuperclass != null) { userMappings.getMappedSuperclassMap().remove(mappedSuperclass.getKey()); } return mappedSuperclass; }
MappedSuperclass superclass = new MappedSuperclass(clazz.getName()); for (java.lang.reflect.Field field : clazz.getDeclaredFields()) { String fieldName = field.getName(); superclass.addField(transientField);
throw new IllegalStateException("Primary key field " + fieldName + " is not defined in class " + ejbClassName + " or any super classes"); superclass.addField(new Id(fieldName)); mapping.addField(new AttributeOverride(fieldName)); primaryKeyFields.add(fieldName); superclass.addField(new Id(fieldName)); mapping.addField(new AttributeOverride(fieldName)); primaryKeyFields.add(fieldName); idclass.setIdClass(new IdClass(bean.getPrimKeyClass())); throw new IllegalStateException("CMP field " + fieldName + " is not defined in class " + ejbClassName + " or any super classes"); superclass.addField(new Basic(fieldName)); mapping.addField(new AttributeOverride(fieldName));
/** * Create an instance of {@link MappedSuperclass } * */ public MappedSuperclass createMappedSuperclass() { return new MappedSuperclass(); }
/** * Check the user-defined entity mappings for a superclass * mapping for a given named class. If the user mappings exist, * remove them from the user list and return them * for inclusion in our generated mappings. * * @param userMappings * The current user mapping set. * @param className The name of the class of interest. * * @return Returns the superclass mapping for the named class, or * null if the class is not in the mapping set. */ private MappedSuperclass removeMappedSuperclass(EntityMappings userMappings, String className) { MappedSuperclass mappedSuperclass; mappedSuperclass = userMappings.getMappedSuperclassMap().get(className); if (mappedSuperclass != null){ userMappings.getMappedSuperclassMap().remove(mappedSuperclass.getKey()); } return mappedSuperclass; }
final MappedSuperclass superclass = new MappedSuperclass(clazz.getName()); for (final Field field : clazz.getDeclaredFields()) { if (!field.isSynthetic()) { superclass.addField(transientField);
superclass.addField(new Id(fieldName)); if (superclass != null) { superclass.addField(new Id(pkFieldName)); mapping.addField(new AttributeOverride(pkFieldName)); idclass = resolveIdClass(idclass, superclass, beanClass); idclass.setIdClass(new IdClass(bean.getPrimKeyClass())); superclass.addField(new Basic(fieldName)); mapping.addField(new AttributeOverride(fieldName));
superclass.addField(new Id(fieldName)); if (superclass != null) { superclass.addField(new Id(pkFieldName)); mapping.addField(new AttributeOverride(pkFieldName)); idclass = resolveIdClass(idclass, superclass, beanClass); idclass.setIdClass(new IdClass(bean.getPrimKeyClass())); } else { superclass.addField(new Basic(fieldName)); mapping.addField(new AttributeOverride(fieldName)); } else {
logger.warning("openejb-cmp-orm.xml mapping ignored: module="+ejbModule.getModuleId()+": <mapped-superclass class=\""+mapping.getClazz()+"\">");
superclass.addField(new Id(fieldName)); if (superclass != null) { superclass.addField(new Id(pkFieldName)); mapping.addField(new AttributeOverride(pkFieldName)); idclass = resolveIdClass(idclass, superclass, beanClass); idclass.setIdClass(new IdClass(bean.getPrimKeyClass())); } else { superclass.addField(new Basic(fieldName)); mapping.addField(new AttributeOverride(fieldName)); } else {
logger.warning("openejb-cmp-orm.xml mapping ignored: module=" + ejbModule.getModuleId() + ": <mapped-superclass class=\"" + mapping.getClazz() + "\">");