Kajona\System\System\Objectfactory

The objectfactory is a central place to create instances of common objects.

Therefore, a systemid is passed and the system returns the matching business object.

Instantiations are cached, so recreating instances is a rather cheap operation.
To ensure a proper caching, the factory itself reflects the singleton pattern.

In addition, common helper-methods regarding objects are placed right here.

Synopsis

class Objectfactory {
}

Members

private

Methods

public

  • addObjectToCache() — Adds a single object to the cache
  • flushCache() — Flushes the internal instance cache
  • getClassNameForId() — Get the class name for a system-id.
  • getInstance() — Returns an instance of the objectfactory.
  • getObject() — Creates a new object-instance. Therefore, the passed system-id is searched in the cache, afterwards the instance is created - as long as the matching class could be found, otherwise null
  • removeFromCache() — Removes a single entry from the instance cache