Search in sources :

Example 1 with MPPForecastRule

use of org.eevolution.model.MPPForecastRule in project adempiere by adempiere.

the class ForecastEngine method getForecastRules.

/**
	 * get WM Rules
	 * 
	 * @param ctx
	 * @param AD_Client_ID
	 * @param trxName
	 * @return Collection of the MForecastRules
	 */
public static List<MPPForecastRule> getForecastRules(Properties ctx, int AD_Client_ID, String trxName) {
    String whereClause = "";
    ArrayList<Object> parameters = new ArrayList<Object>();
    if (AD_Client_ID > 0) {
        whereClause = MPPForecastRule.COLUMNNAME_AD_Client_ID + "=?";
        parameters.add(AD_Client_ID);
    } else {
        whereClause = null;
    }
    return new Query(ctx, MPPForecastRule.Table_Name, whereClause, trxName).setOnlyActiveRecords(true).setParameters(parameters).<MPPForecastRule>list();
}
Also used : Query(org.compiere.model.Query) ArrayList(java.util.ArrayList) MPPForecastRule(org.eevolution.model.MPPForecastRule)

Aggregations

ArrayList (java.util.ArrayList)1 Query (org.compiere.model.Query)1 MPPForecastRule (org.eevolution.model.MPPForecastRule)1