/** * <p>Retrieve owned list of entities for owner. * E.g. invoices lines for invoice</p> * @param pAddParam additional param * @param pIdEntityOwner ID owner * @return owned list of business objects * @throws Exception - an exception */ @Override public final List<T> retrieveOwnedListById( final Map<String, Object> pAddParam, final Object pIdEntityOwner) throws Exception { return getSrvOrm().retrieveEntityOwnedlist(getEntityClass(), this.ownerClass, pIdEntityOwner); }
Class<?> classOwned = Class.forName(className); @SuppressWarnings("unchecked") Object srvEntityOwned = new SrvEntityOwnedSimple(classOwned, entityClass, lazyGetSrvOrm()); this.beansMap.put("srv" + classOwned.getSimpleName(),
/** * <p>Retrieve owned list of entities for owner. * E.g. invoices lines for invoice</p> * @param pAddParam additional param * @param pEntityOwner owner * @return owned list of business objects * @throws Exception - an exception */ @Override public final List<T> retrieveOwnedList(final Map<String, Object> pAddParam, final O pEntityOwner) throws Exception { return getSrvOrm().retrieveEntityOwnedlist(getEntityClass(), this.ownerClass, pEntityOwner.getItsId()); }
/** * <p>Create entity with its owner e.g. invoice line * for invoice.</p> * @param pAddParam additional param * @param pIdEntityOwner entity owner ID * @return entity instance * @throws Exception - an exception **/ @Override public final T createEntityWithOwnerById(final Map<String, Object> pAddParam, final Object pIdEntityOwner) throws Exception { T entity = getSrvOrm().createEntityWithOwner(getEntityClass(), this.ownerClass, pIdEntityOwner); entity.setIsNew(true); return entity; }
/** * <p>Create entity with its owner e.g. invoice line * for invoice.</p> * @param pAddParam additional param * @param pEntityOwner owner * @return entity instance * @throws Exception - an exception **/ @Override public final T createEntityWithOwner(final Map<String, Object> pAddParam, final O pEntityOwner) throws Exception { T entity = getSrvOrm().createEntityWithOwner(getEntityClass(), this.ownerClass, pEntityOwner.getItsId()); entity.setIsNew(true); return entity; }