oracle.panama.model
Class MetaLocator
java.lang.Object
oracle.panama.model.MetaLocator
- public class MetaLocator
- extends java.lang.Object
The Meta Locator is a singleton to get the oracle.panama.model.ModelFactory and oracle.panama.model.ModelServices. The ModelFactory and ModelServices are facade level API to create, locate, and delete Model objects.
The usage of the MetaLocator, ModelFactory, and ModelServices are described in the following sample codes.
try {
oracle.panama.model.ModelServices modelServices = MetaLocator.getInstance().getModelServices();
oracle.panama.model.User orcladmin = modelServices.lookupUser("orcladmin");
oracle.panama.model.Folder orcladminFolder = modelServices.lookupFolder("/Users Home/orcladmin");
oracle.panama.model.ModelFactory modelFactory = MetaLocator.getInstance().getModelFactory();
oracle.panama.model.User newUser = modelFactory.createUser("TestUser123");
// initialize the User profiles ...
modelFactory.save();
}
finally {
// release the JDBC and OID conncetions used by the Model API.
MetaLocator.getInstance().getModelFactory().releaseResources();
}
- See Also:
ModelFactory
, ModelServices
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static MetaLocator getInstance()
- Get the single instance of this locator.
-
- Returns:
- the single instance of the locator.
getModelFactory
public ModelFactory getModelFactory()
getModelServices
public ModelServices getModelServices()
Copyright © 2004 Oracle Corporation. All Rights Reserved.