I was working after forking Adempiere project and while working on patches when I create list from table with the list() method , instead of the specific class list I am getting Generic PO list. Can working on patches be the sore cause of this error.
Here is the code
@Override
protected String doIt() throws Exception {
int orgId = Env.getAD_Org_ID(getCtx());
int clientID=Env.getAD_Client_ID(getCtx());
List<MEmployee> EmployeeList = new ArrayList<MEmployee>();
EmployeeList = getEmployeeList(p_MemberGroupId,orgId);
String msg = "";
for ( MEmployee employee : EmployeeList ) {
}
return null;
}
private List<MEmployee> getEmployeeList(int EmployeeGroupID, int orgId) {
List<MEmployee> employeeList = new ArrayList<MEmployee>();
StringBuffer employeeWhereClause = new StringBuffer();
employeeWhereClause.append( MEmployeeGroup.COLUMNNAME_E2_HR_PAGRP_ID )
.append( " = " ).append( EmployeeGroupID )
.append(" and ")
.append( MEmployee.COLUMNNAME_AD_Org_ID)
.append( " = " )
.append(orgId)
.append( " and " )
.append( X_E2_HR_PAEM0.COLUMNNAME_Status )
.append( " not in " )
.append(" ('"+MEmployee.EMPSTATUS_OnHold+"','"+MEmployee.EMPSTATUS_Left+"') ");
employeeList = new Query(getCtx(), MEmployee.Table_Name, employeeWhereClause.toString(), get_TrxName())
.setClient_ID()
.setOnlyActiveRecords(Boolean.TRUE)
.list();
return employeeList;
}
Here I am getting Generic PO List instead of MEmployee Type List.