private PersistentEntity getOrCreateAssociatedEntity(MappingContext context, Class propType) { PersistentEntity associatedEntity = context.getPersistentEntity(propType.getName()); if (associatedEntity == null) { associatedEntity = context.addPersistentEntity(propType); } return associatedEntity; }
private PersistentEntity getPersistentEntity( Class javaClass, MappingContext context, ClassMapping classMapping) { PersistentEntity entity; if (classMapping != null) { entity = classMapping.getEntity(); } else { entity = context.getPersistentEntity(javaClass.getName()); } return entity; }