Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.core.data
Interface IPersistentObjectManager


public interface IPersistentObjectManager

A PersistentObjectFactory can create Instances of any class that is in the classpath and implements IPersistentObject

Author:
gerry

Method Summary
 IPersistentObject create(java.lang.Class<?> typ, java.lang.String id, boolean persistent)
          Create an IPersistentObject.
 IPersistentObject[] executeQuery(Query qbe)
           
 IPersistentObject fetch(java.lang.Class<? extends IPersistentObject> typ, java.lang.String id)
          Fetch an IPersistentObject from the storage.
 void setBinding(java.util.Map<java.lang.String,java.lang.Class<? extends IPersistentObject>> map)
          get an arbitrary Property from an IPersistentObject
 

Method Detail

fetch

IPersistentObject fetch(java.lang.Class<? extends IPersistentObject> typ,
                        java.lang.String id)
                        throws ElexisCoreException
Fetch an IPersistentObject from the storage. This is a replacement for the static load(String)-Methods of earlier PersistentObject implementations

Parameters:
clazz - full qualified class name of the Object to load
id - GUID of the object to load
Returns:
the newly created Object, populated with according properties from the data storage, or null if an Object with the given id does not exist.
Throws:
ElexisCoreException - if access to the Object was not possible (e.g. due to missing class or missing access to the storage)

create

IPersistentObject create(java.lang.Class<?> typ,
                         java.lang.String id,
                         boolean persistent)
                         throws ElexisCoreException
Create an IPersistentObject.

Parameters:
clazz - full qualified class name of the Object to create
id - id of the Object to create. Can be null, then the id will be created by the framework
persistent - true if the Object should be persisted in the storage
Returns:
the newly created Object
Throws:
ElexisCoreException - if Creation wos not possible

setBinding

void setBinding(java.util.Map<java.lang.String,java.lang.Class<? extends IPersistentObject>> map)
get an arbitrary Property from an IPersistentObject

Parameters:
object - IPersistentObject to query
propertyName - name of the Property to read
Throws:
ElexisStorageException - id the storage is not ready

executeQuery

IPersistentObject[] executeQuery(Query qbe)

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis