/** * <p>Make description for warehouse entry.</p> * @param pEntity movement * @param pLangDef Lang Default * @param pDateFormat DateFormat * @return description **/ public final String makeDescription(final IMakingWarehouseEntry pEntity, final String pLangDef, final DateFormat pDateFormat) { String strWho = getSrvI18n().getMsg(pEntity.getClass().getSimpleName() + "short", pLangDef) + " #" + getSrvOrm().getIdDatabase() + "-" + pEntity.getItsId(); //only local if (pEntity.getOwnerId() == null) { strWho += ", " + pDateFormat.format(pEntity .getDocumentDate()); } else { strWho += " " + getSrvI18n().getMsg("in", pLangDef) + " " + getSrvI18n() .getMsg(getSrvTypeCodeDocuments().getTypeCodeMap().get(pEntity .getOwnerType()).getSimpleName() + "short", pLangDef) + " #" + getSrvOrm() .getIdDatabase() + "-" + pEntity.getOwnerId() + ", " + pDateFormat.format(pEntity.getDocumentDate()); } return getSrvI18n().getMsg("made_at", pLangDef) + " " + pDateFormat.format( new Date()) + " " + getSrvI18n().getMsg("by", pLangDef) + " " + strWho; }
/** * <p>Make description for warehouse entry.</p> * @param pEntity movement * @return description **/ public final String makeDescription(final IMakingWarehouseEntry pEntity) { String strWho = getSrvI18n().getMsg(pEntity.getClass().getSimpleName() + "short") + " #" + getSrvOrm().getIdDatabase() + "-" + pEntity.getItsId(); //only local if (pEntity.getOwnerId() == null) { strWho += ", " + getDateFormatter().format(pEntity .getDocumentDate()); } else { strWho += " " + getSrvI18n().getMsg("in") + " " + getSrvI18n() .getMsg(getSrvTypeCodeDocuments().getTypeCodeMap().get(pEntity .getOwnerType()).getSimpleName() + "short") + " #" + getSrvOrm() .getIdDatabase() + "-" + pEntity.getOwnerId() + ", " + getDateFormatter().format(pEntity.getDocumentDate()); } return getSrvI18n().getMsg("made_at") + " " + getDateFormatter().format( new Date()) + " " + getSrvI18n().getMsg("by") + " " + strWho; }