DateFormat.MEDIUM, DateFormat.SHORT, new Locale(langDef)); String strWho = getSrvI18n().getMsg(pEntity.getClass().getSimpleName() + "short", langDef) + " #" + getSrvOrm().getIdDatabase() + "-"//only local + pEntity.getItsId(); if (pEntity.getOwnerId() == null) { strWho += " " + getSrvI18n().getMsg("in", langDef) + " " + getSrvI18n() .getMsg(getSrvTypeCode().getTypeCodeMap().get(pEntity.getOwnerType()) .getSimpleName() + "short", langDef) + " #" + getSrvOrm().getIdDatabase() + "-" + pEntity.getOwnerId() + ", " + dateFormat.format(pEntity.getDocumentDate()); + getSrvI18n().getMsg(getSrvTypeCode().getTypeCodeMap() .get(pSource.getSourceType()).getSimpleName() + "short", langDef) + " #" + getSrvOrm().getIdDatabase() + "-" + pSource.getSourceId(); return getSrvI18n().getMsg("made_at", langDef) + " " + dateFormat.format( new Date()) + " " + getSrvI18n().getMsg("by", langDef)
/** * <p>Make description for warehouse entry.</p> * @param pEntity movement * @param pSource source of item * @return description **/ public final String makeDescription(final IMakingWarehouseEntry pEntity, final ADrawItemEntry pSource) { String strWho = getSrvI18n().getMsg(pEntity.getClass().getSimpleName() + "short") + " #" + getSrvOrm().getIdDatabase() + "-" //only local + pEntity.getItsId(); if (pEntity.getOwnerId() == null) { strWho += ", " + getDateFormatter().format(pEntity .getDocumentDate()); } else { strWho += " " + getSrvI18n().getMsg("in") + " " + getSrvI18n() .getMsg(getSrvTypeCode().getTypeCodeMap().get(pEntity.getOwnerType()) .getSimpleName() + "short") + " #" + getSrvOrm().getIdDatabase() + "-" + pEntity.getOwnerId() + ", " + getDateFormatter().format(pEntity.getDocumentDate()); } String strFrom = " " + getSrvI18n().getMsg("from") + " " + getSrvI18n() .getMsg(getSrvTypeCode().getTypeCodeMap().get(pSource.getSourceType()) .getSimpleName() + "short") + " #" + getSrvOrm().getIdDatabase() + "-" + pSource.getSourceId(); return getSrvI18n().getMsg("made_at") + " " + getDateFormatter().format( new Date()) + " " + getSrvI18n().getMsg("by") + " " + strWho + strFrom; }
result = getSrvOrm().retrieveListWithConditions(pAddParam, getDrawItemEntryClass(), where); where = null; result = getSrvOrm().retrieveListWithConditions(pAddParam, getDrawItemEntryClass(), where); } else { result.addAll(getSrvOrm().retrieveListWithConditions(pAddParam, getDrawItemEntryClass(), where)); result = getSrvOrm().retrieveListWithConditions(pAddParam, getDrawItemEntryClass(), where); } else { result.addAll(getSrvOrm().retrieveListWithConditions(pAddParam, getDrawItemEntryClass(), where));
result = getSrvOrm().retrieveListWithConditions( getDrawItemEntryClass(), where); where = null; result = getSrvOrm().retrieveListWithConditions( getDrawItemEntryClass(), where); } else { result.addAll(getSrvOrm().retrieveListWithConditions( getDrawItemEntryClass(), where)); result = getSrvOrm().retrieveListWithConditions( getDrawItemEntryClass(), where); } else { result.addAll(getSrvOrm().retrieveListWithConditions( getDrawItemEntryClass(), where));
final Long pDrawingOwnerId) throws Exception { if (!pEntity.getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_make_di_entry_for_foreign_src"); if (drawItemSourceLine.getIsUsed()) { String query = lazyGetQuery(drawItemSourceLine.getFileName()); query = query.replace(":IDDATABASEBIRTH", String.valueOf(getSrvOrm() .getIdDatabase())); query = query.replace(":INVITEM", pEntity.getInvItem()
final Long pDrawingOwnerId) throws Exception { if (!pEntity.getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_make_di_entry_for_foreign_src"); List<T> diel = getSrvOrm().retrieveListWithConditions(pAddParam, getDrawItemEntryClass(), " where DRAWINGTYPE=" + pEntity.constTypeCode() + " and " + tblNm + ".IDDATABASEBIRTH=" + getSrvOrm().getIdDatabase() + " and DRAWINGID=" + pEntity.getReversedId()); BigDecimal quantityToLeaveRst = pEntity.getItsQuantity(); die.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); die.setSourceType(dies.getSourceType()); die.setSourceId(dies.getSourceId()); die.setDescription(makeDescription(pAddParam, pEntity, dies) + " " + getSrvI18n().getMsg("reversed_entry_n", langDef) + getSrvOrm().getIdDatabase() + "-" + dies.getItsId()); getSrvOrm().insertEntity(pAddParam, die); die.setIsNew(false); @SuppressWarnings("unchecked") dies.setDescription(dies.getDescription() + " " + getSrvI18n().getMsg("reversing_entry_n", langDef) + getSrvOrm().getIdDatabase() + "-" + die.getItsId()); //only local getSrvOrm().updateEntity(pAddParam, dies);
final Long pDrawingOwnerId) throws Exception { if (!pEntity.getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_make_di_entry_for_foreign_src"); List<T> diel = getSrvOrm().retrieveListWithConditions( getDrawItemEntryClass(), " where DRAWINGTYPE=" + pEntity.constTypeCode() + " and " + tblNm + ".IDDATABASEBIRTH=" + getSrvOrm().getIdDatabase() + " and DRAWINGID=" + pEntity.getReversedId()); BigDecimal quantityToLeaveRst = pEntity.getItsQuantity(); die.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); die.setSourceType(dies.getSourceType()); die.setSourceId(dies.getSourceId()); die.setDescription(makeDescription(pEntity, dies) + " " + getSrvI18n().getMsg("reversed_entry_n") + getSrvOrm().getIdDatabase() + "-" + dies.getItsId()); getSrvOrm().insertEntity(die); IDrawItemSource drawed = (IDrawItemSource) srvOrm .retrieveEntityById(srvTypeCode.getTypeCodeMap() dies.setDescription(dies.getDescription() + " " + getSrvI18n().getMsg("reversing_entry_n") + getSrvOrm().getIdDatabase() + "-" + die.getItsId()); //only local getSrvOrm().updateEntity(dies);
final Long pDrawingOwnerId) throws Exception { if (!pEntity.getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_make_di_entry_for_foreign_src"); if (drawItemSourceLine.getIsUsed()) { String query = lazyGetQuery(drawItemSourceLine.getFileName()); query = query.replace(":IDDATABASEBIRTH", String.valueOf(getSrvOrm() .getIdDatabase())); query = query.replace(":INVITEM", pEntity.getInvItem()
final BigDecimal pQuantityToDraw) throws Exception { if (!pEntity.getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_make_di_entry_for_foreign_src"); die.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); die.setSourceType(pSource.constTypeCode()); die.setSourceId(pSource.getItsId());
final BigDecimal pQuantityToDraw) throws Exception { if (!pEntity.getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_make_di_entry_for_foreign_src"); die.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); die.setSourceType(pSource.constTypeCode()); die.setSourceId(pSource.getItsId());