public Object next() { verifyIteratorIsValid(); try { currentId = idIterator.next(); return localFactory.getEntityEJBLocalObject(currentId); } catch(ConcurrentModificationException e) { throw new IllegalStateException("Underlying collection has " + "been modified"); } }
public Object[] toArray() { Set value = state.getLoadedValue(ctx); Object[] result = (Object[])Array.newInstance(relatedEntity.getLocalInterface(), value.size()); LocalProxyFactory relatedPF = relatedContainer.getLocalProxyFactory(); int i = 0; for(Iterator iter = value.iterator(); iter.hasNext();) { Object id = iter.next(); result[i++] = relatedPF.getEntityEJBLocalObject(id); } return result; }
public Object next() { try { curId = idIter.next(); } catch(ConcurrentModificationException e) { throw new IllegalStateException(e.getMessage()); } return relatedContainer.getLocalProxyFactory().getEntityEJBLocalObject(curId); } };
public Object[] toArray(Object a[]) { Set value = state.getLoadedValue(ctx); if(a == null || a.length < value.size()) { a = (Object[])Array.newInstance(entity.getLocalInterface(), value.size()); } LocalProxyFactory relatedPF = relatedContainer.getLocalProxyFactory(); int i = 0; for(Iterator iter = value.iterator(); iter.hasNext();) { Object id = iter.next(); a[i++] = relatedPF.getEntityEJBLocalObject(id); } return a; }
public Object getValue(EntityEnterpriseContext ctx) { Object value = getLoadedValue(ctx); if(value == null) { localObject = null; } else if(localObject == null) { localObject = relatedContainer.getLocalProxyFactory().getEntityEJBLocalObject(value); } return localObject; }
public EJBLocalObject getEJBLocalObject() { if(ejbLocalObject == null && con.getLocalHomeClass() != null) { ejbLocalObject = ((EntityContainer)con).getLocalProxyFactory().getEntityEJBLocalObject(id); } return ejbLocalObject; }
public EJBLocalObject getEJBLocalObject() { AllowedOperationsAssociation.assertAllowedIn("getEJBLocalObject", IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); if (con.getLocalHomeClass()==null) throw new IllegalStateException( "No local interface for bean." ); if (ejbLocalObject == null) { Object cacheKey = ((EntityCache)((EntityContainer)con).getInstanceCache()).createCacheKey(id); ejbLocalObject = ((EntityContainer)con).getLocalProxyFactory().getEntityEJBLocalObject(cacheKey); } return ejbLocalObject; }
/** * Local home interface implementation */ public EJBLocalObject createLocalHome(Invocation mi) throws Exception { // The persistence manager takes care of the wiring and creating the EJBLocalObject final EntityEnterpriseContext ctx = (EntityEnterpriseContext)mi.getEnterpriseContext(); getPersistenceManager().createEntity(mi.getMethod(), mi.getArguments(), ctx); // The context implicitely carries the EJBObject createCount++; return localProxyFactory.getEntityEJBLocalObject(ctx.getId(), true); }
relatedLocalObject = relatedContainer.getLocalProxyFactory().getEntityEJBLocalObject(fk);
final EJBLocalObject ejbObject = container.getLocalProxyFactory().getEntityEJBLocalObject(relatedId); ejbObject.remove();