}
else {
// HelperBean__Amber -> HelperBean
String className = cl.getSuperclass().getName();
AmberEntityHome entityHome = _persistenceUnit.getEntityHome(className);
if (entityHome == null) {
if (log.isLoggable(Level.FINER))
log.log(Level.FINER, L.l("Amber.addNewEntity: home not found for entity (class: '{0}' PK: '{1}')",
className, key));
return null;
}
EntityFactory factory = entityHome.getEntityFactory();
// TestBean__EJB
Object value = factory.getEntity(key);
Method cauchoGetBeanMethod = entityHome.getCauchoGetBeanMethod();
if (cauchoGetBeanMethod != null) {
try {
// Bean
entity = (Entity) cauchoGetBeanMethod.invoke(value, new Object[0]);
// entity.__caucho_makePersistent(aConn, item);