There are eight session level objects:
There will only be one copy of any given object (based on unique identity) in the session. All references will point to the single copy. For each session object there are methods to fetch a session object by name, database ID, URI, or search. Session objects can also get fetched by calling getters that reference them from other objects. For example, given a RAMAsset that has an ownerid of kjones, calling getOwner() on the object will fetch kjones RAMUser object into the session if it had not already been done.
There are two ways to commit changes made to a session objects. The RAMSession.putAssets(IProgressMonitor) API will commit all changes made locally to your queued asset objects. RAMSession.put(IRAMSessionObject, IProgressMonitor) allows you to commit the changes to a single sessionObject.
There are methods on RAMSession to create new instances of any session object. After calling a create method, populate the object and commit the changes to it in order to create the object on the server. See Create a new asset, Create a new community, Create a new asset type, Create new category schema, Create a new asset attribute and Register a user.
When session objects are deleted from the server, the RAMSessionObject.setAction(RAMAction.DELETE) method marks the session object for deletion and the RAMSession.put() method deletes it. See Delete an asset, Delete a community, Delete an asset type, Delete a category schema, Delete a relationship type, Delete an asset attribute. Users cannot be deleted from the server.
To remove an object from the session cache and discard any changes to it use the RAMSession.remove(IRAMSessionObject) API.