/** * <p>Retrieve a list of all entities.</p> * @param pAddParam additional param * @return list of all business objects * @throws Exception - an exception */ @Override public final List<AccSettings> retrieveList( final Map<String, Object> pAddParam) throws Exception { return getSrvOrm().retrieveList(this.entityClass); }
/** * <p>Retrieve a page of entities.</p> * @param pAddParam additional param * @param pFirst number of the first record * @param pPageSize page size (max records) * @return list of business objects * @throws Exception - an exception */ @Override public final List<AccSettings> retrievePage( final Map<String, Object> pAddParam, final Integer pFirst, final Integer pPageSize) throws Exception { return getSrvOrm().retrievePage(this.entityClass, pFirst, pPageSize); }
/** * <p>Retrieve a list of entities.</p> * @param pAddParam additional param * @param pQueryConditions Not NULL e.g. "where name='U1' ORDER BY id" * or "where ITSDATE>21313211 order by ITSID" * @return list of business objects * @throws Exception - an exception */ @Override public final List<AccSettings> retrieveListWithConditions( final Map<String, Object> pAddParam, final String pQueryConditions) throws Exception { return getSrvOrm() .retrieveListWithConditions(this.entityClass, pQueryConditions); }
/** * <p>Retrieve a page of entities.</p> * @param pAddParam additional param * @param pQueryConditions Not NULL e.g. "where name='U1' ORDER BY id" * @param pFirst number of the first record * @param pPageSize page size (max records) * @return list of business objects * @throws Exception - an exception */ @Override public final List<AccSettings> retrievePageWithConditions( final Map<String, Object> pAddParam, final String pQueryConditions, final Integer pFirst, final Integer pPageSize) throws Exception { return getSrvOrm().retrievePageWithConditions(this.entityClass, pQueryConditions, pFirst, pPageSize); } /**
/** * <p>Retrieve Accounting settings from database.</p> * @throws Exception - an exception **/ public final synchronized void retrieveAccSettings() throws Exception { this.accSettings = getSrvOrm().retrieveEntityById(this.entityClass, 1L); if (this.accSettings == null) { throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE, "There is no accounting settings!!!"); } List<DrawMaterialSourcesLine> drawMaterialSources = getSrvOrm() .retrieveEntityOwnedlist(DrawMaterialSourcesLine.class, AccSettings.class, 1L); this.accSettings.setDrawMaterialSources(drawMaterialSources); List<CogsItemSourcesLine> cogsItemSources = getSrvOrm() .retrieveEntityOwnedlist(CogsItemSourcesLine.class, AccSettings.class, 1L); this.accSettings.setCogsItemSources(cogsItemSources); List<AccEntriesSourcesLine> accEntriesSources = getSrvOrm() .retrieveEntityOwnedlist(AccEntriesSourcesLine.class, AccSettings.class, 1L); this.accSettings.setAccEntriesSources(accEntriesSources); }
/** * <p>Retrieve Accounting settings from database.</p> * @param pAddParam additional param * @throws Exception - an exception **/ public final synchronized void retrieveAccSettings( final Map<String, Object> pAddParam) throws Exception { this.accSettings = new AccSettings(); this.accSettings.setItsId(1L); this.accSettings = getSrvOrm().retrieveEntity(pAddParam, this.accSettings); if (this.accSettings == null) { throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE, "There is no accounting settings!!!"); } DrawMaterialSourcesLine dmsl = new DrawMaterialSourcesLine(); dmsl.setItsOwner(this.accSettings); List<DrawMaterialSourcesLine> drawMaterialSources = getSrvOrm() .retrieveListForField(pAddParam, dmsl, "itsOwner"); this.accSettings.setDrawMaterialSources(drawMaterialSources); CogsItemSourcesLine cisl = new CogsItemSourcesLine(); cisl.setItsOwner(this.accSettings); List<CogsItemSourcesLine> cogsItemSources = getSrvOrm() .retrieveListForField(pAddParam, cisl, "itsOwner"); this.accSettings.setCogsItemSources(cogsItemSources); AccEntriesSourcesLine aesl = new AccEntriesSourcesLine(); aesl.setItsOwner(this.accSettings); List<AccEntriesSourcesLine> accEntriesSources = getSrvOrm() .retrieveListForField(pAddParam, aesl, "itsOwner"); this.accSettings.setAccEntriesSources(accEntriesSources); }
"precision_must_be_from_0_to_4"); getSrvOrm().updateEntity(pEntity); retrieveAccSettings();
"precision_must_be_from_0_to_4"); getSrvOrm().updateEntity(pAddParam, pEntity); retrieveAccSettings(pAddParam);