/** * Create an instance of {@link EntityMappings } */ public EntityMappings createEntityMappings() { return new EntityMappings(); }
public Map<String, Entity> getEntityMap() { return ((KeyedCollection) getEntity()).toMap(); }
public Map<String, MappedSuperclass> getMappedSuperclassMap() { return ((KeyedCollection) getMappedSuperclass()).toMap(); }
cmpMappings = new EntityMappings(); cmpMappings.setVersion("1.0"); appModule.setCmpMappings(cmpMappings); for (Entity entity : cmpMappings.getEntity()) { entitiesByEjbName.put(entity.getEjbName(), entity); for (Entity mapping : userMappings.getEntity()) { logger.warning("openejb-cmp-orm.xml mapping ignored: module="+ejbModule.getModuleId()+": <entity class=\""+mapping.getClazz()+"\">"); for (MappedSuperclass mapping : userMappings.getMappedSuperclass()) { logger.warning("openejb-cmp-orm.xml mapping ignored: module="+ejbModule.getModuleId()+": <mapped-superclass class=\""+mapping.getClazz()+"\">"); if (!cmpMappings.getEntity().isEmpty()) { PersistenceUnit persistenceUnit = getCmpPersistenceUnit(appModule); for (Entity entity : cmpMappings.getEntity()) { persistenceUnit.getClazz().add(entity.getClazz()); for (Entity entity : appModule.getCmpMappings().getEntity()) { if (entity.getAttributes().isEmpty()){ entity.setAttributes(null);
entityMappings.getMappedSuperclass().add(mappedSuperclass); entityMappings.getEntity().add(entity); entityMappings.getEntity().add(entity); entityMappings.getMappedSuperclass().add(mappedSuperclass);
private Entity removeEntity(final EntityMappings userMappings, final String className) { final Entity entity; entity = userMappings.getEntityMap().get(className); if (entity != null) { userMappings.getEntityMap().remove(entity.getKey()); } return entity; }
/** * 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; }
cmpMappings = new EntityMappings(); cmpMappings.setVersion("1.0"); appModule.setCmpMappings(cmpMappings); for (final Entity entity : cmpMappings.getEntity()) { entitiesByEjbName.put(entity.getEjbName(), entity); for (final Entity mapping : userMappings.getEntity()) { logger.warning("openejb-cmp-orm.xml mapping ignored: module=" + ejbModule.getModuleId() + ": <entity class=\"" + mapping.getClazz() + "\">"); for (final MappedSuperclass mapping : userMappings.getMappedSuperclass()) { logger.warning("openejb-cmp-orm.xml mapping ignored: module=" + ejbModule.getModuleId() + ": <mapped-superclass class=\"" + mapping.getClazz() + "\">"); if (!cmpMappings.getEntity().isEmpty()) { final PersistenceUnit persistenceUnit = getCmpPersistenceUnit(appModule); for (final Entity entity : cmpMappings.getEntity()) { persistenceUnit.getClazz().add(entity.getClazz()); for (final Entity entity : appModule.getCmpMappings().getEntity()) { if (entity.getAttributes() != null && entity.getAttributes().isEmpty()) { entity.setAttributes(null);
entityMappings.getMappedSuperclass().add(mappedSuperclass); entityMappings.getEntity().add(entity); entityMappings.getEntity().add(entity); entityMappings.getMappedSuperclass().add(mappedSuperclass);
private Entity removeEntity(final EntityMappings userMappings, final String className) { final Entity entity; entity = userMappings.getEntityMap().get(className); if (entity != null) { userMappings.getEntityMap().remove(entity.getKey()); } return entity; }
/** * 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; }
cmpMappings = new EntityMappings(); cmpMappings.setVersion("1.0"); appModule.setCmpMappings(cmpMappings); for (final Entity entity : cmpMappings.getEntity()) { entitiesByEjbName.put(entity.getEjbName(), entity); for (final Entity mapping : userMappings.getEntity()) { logger.warning("openejb-cmp-orm.xml mapping ignored: module=" + ejbModule.getModuleId() + ": <entity class=\"" + mapping.getClazz() + "\">"); for (final MappedSuperclass mapping : userMappings.getMappedSuperclass()) { logger.warning("openejb-cmp-orm.xml mapping ignored: module=" + ejbModule.getModuleId() + ": <mapped-superclass class=\"" + mapping.getClazz() + "\">"); if (!cmpMappings.getEntity().isEmpty()) { final PersistenceUnit persistenceUnit = getCmpPersistenceUnit(appModule); for (final Entity entity : cmpMappings.getEntity()) { persistenceUnit.getClazz().add(entity.getClazz()); for (final Entity entity : appModule.getCmpMappings().getEntity()) { if (entity.getAttributes() != null && entity.getAttributes().isEmpty()) { entity.setAttributes(null);
entityMappings.getMappedSuperclass().add(mappedSuperclass); entityMappings.getEntity().add(entity); entityMappings.getEntity().add(entity); entityMappings.getMappedSuperclass().add(mappedSuperclass);
public Map<String, Entity> getEntityMap() { return ((KeyedCollection) getEntity()).toMap(); }
/** * Create an instance of {@link EntityMappings } */ public EntityMappings createEntityMappings() { return new EntityMappings(); }
public Map<String, MappedSuperclass> getMappedSuperclassMap() { return ((KeyedCollection)getMappedSuperclass()).toMap(); }
private Entity removeEntity(EntityMappings userMappings, String className) { Entity entity; entity = userMappings.getEntityMap().get(className); if (entity != null){ userMappings.getEntityMap().remove(entity.getKey()); } return entity; }
/** * 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; }
public Map<String, Entity> getEntityMap() { return ((KeyedCollection)getEntity()).toMap(); }
/** * Create an instance of {@link EntityMappings } * */ public EntityMappings createEntityMappings() { return new EntityMappings(); }