Created
November 16, 2012 07:50
-
-
Save npero/4085232 to your computer and use it in GitHub Desktop.
Test client for ADF Business Component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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