Skip to content

Instantly share code, notes, and snippets.

@npero
Created November 16, 2012 07:50
Show Gist options
  • Save npero/4085232 to your computer and use it in GitHub Desktop.
Save npero/4085232 to your computer and use it in GitHub Desktop.
Test client for ADF Business Component
import oracle.jbo.ApplicationModule;
import oracle.jbo.Row;
import oracle.jbo.ViewObject;
import oracle.jbo.client.Configuration;
public class TestClient {
public static void main(String[] args) {
String amDef =
"com.packtpub.adfguide.ch2.model.service.HRServiceAppModule";
String config = "HRServiceAppModuleLocal";
ApplicationModule am =
Configuration.createRootApplicationModule(amDef, config);
// Work with your appmodule and view object here
//Find Department View Object Instance
ViewObject vo = am.findViewObject("Departments");
//Execute Department query
vo.executeQuery();
//Fetch the first record
Row deptRow = vo.first();
printRow(vo, deptRow);
// Clean up resources
Configuration.releaseRootApplicationModule(am, true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment