/** * Get dynamic WHERE part of SQL To be overwritten by concrete classes * * @return WHERE clause */ protected String getSQLWhere() { StringBuilder sql = new StringBuilder(); Integer S_ResourceType_ID = (Integer) fieldResourceType.getValue(); if (S_ResourceType_ID != null) sql.append(" AND rt.S_ResourceType_ID=").append(S_ResourceType_ID.intValue()); Integer S_Resource_ID = (Integer) fieldResource.getValue(); if (S_Resource_ID != null) sql.append(" AND r.S_Resource_ID=").append(S_Resource_ID.intValue()); Date f = fieldFrom.getValue(); Timestamp ts = f != null ? new Timestamp(f.getTime()) : null; if (ts != null) sql.append(" AND TRUNC(ra.AssignDateFrom)>=").append(DB.TO_DATE(ts, false)); Date t = fieldTo.getValue(); ts = t != null ? new Timestamp(t.getTime()) : null; if (ts != null) sql.append(" AND TRUNC(ra.AssignDateTo)<=").append(DB.TO_DATE(ts, false)); return sql.toString(); } // getSQLWhere
/** * get Parameter Value * * @param id * @return Object Value */ public Object getParamenterValue(Object key) { WEditor editor = (WEditor) m_search.get(key); if (editor != null) return editor.getValue(); else return null; }