Programming Guides › Programming Guide for Java › Managed Objects › Access to Objects in the Data Store › Calling Sequence
Calling Sequence
To access a managed object through ProviderAccessor
- Call the ProviderAccessor get... method that retrieves the provider for the type of managed object you want to access. For example, to access a User managed object, call getUserProvider() to retrieve a UserProvider object.
- Use the provider to create a managed object or to retrieve one or more managed objects. For example, if you want to work with a User managed object, you could make a call as follows:
- Calling createUser() to create a User object in a particular organization and with a particular set of attributes
- Calling findUser() to retrieve a specified User object
- Calling getUsersInOrg() to retrieve all the User objects in a specified organization
- Once you have a managed object, access the object’s attributes through AttributeCollection.
- If you create a managed object or update a managed object’s attributes, you are acting on the local copy of the object. To persist the newly assigned or modified attribute values to the data store, call modifyObject(). Managed objects inherit this method from ModifiableObject.
Note: If you are assigning attribute values for a role object, you can define the complete set of tasks to associate with the role and commit the attribute changes to the data store in the same call. You do so with the method modifyObject(Task[]) in the Role interface.
More Information:
Managed Object Attributes
Copyright © 2013 CA.
All rights reserved.
|
|