List Maintenance Classes
Writing a new list maintenance class requires you to create a new class, that provides an annotation with metadata, and lets you implement any user exits you need.
The class should subclass a generated class with the same name, but with suffix _​Gen.
The annotation is @ListService, and is the same annotation structure that is used for lists within PageMaintenance. The service name should end with "L".
If there are child lists, you need to declare them with the lists annotation, just like for PageMaintenance.
You should specify any query criteria (from clause, where clause, order by clause) in the List Service annotation, see MaintenanceListFilter on how to implement that.
The default test superclass simply tests that at least one result row is returned.
Here is an example for testing this list maintenance:
package com.splwg.base.domain.batch.batchRun;
import com.splwg.base.api.service.ListHeader;
import com.splwg.base.api.testers.ListServiceTestCase;
import java.math.BigInteger;
public class ThreadListInquiry_Test
extends ListServiceTestCase {
//~ Methods
//-------------------------------------------------------------------------------
public String getServiceName() {
return "CILTBTHL";
}
/**
* @see com.splwg.base.api.testers.ListServiceTestCase#getReadListHeader()
*/
protected ListHeader getReadListHeader() {
ListHeader header = new ListHeader();
header.put("BATCH_CD", "TD-BTERR");
header.put("BATCH_NBR", BigInteger.valueOf(1));
header.put("BATCH_RERUN_NBR", BigInteger.valueOf(0));
return header;
}
}
Parent topic