com.counterclaim.openefm.model
Class ModelFactory

java.lang.Object
  |
  +--com.counterclaim.openefm.model.ModelFactory

public class ModelFactory
extends java.lang.Object

Creates ObjectModel instances on demand.

Author:
Nathan Probst

Method Summary
static ObjectModel createModel(java.lang.String modelName)
          Creates a new ObjectManager subtype for the name provided.
static void putModel(java.lang.String modelName, java.lang.Class modelClass)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createModel

public static ObjectModel createModel(java.lang.String modelName)
                               throws ModelException
Creates a new ObjectManager subtype for the name provided. Example:
    UserProfileModel userModel = (UserProfileModel) ModelFactory.createModel(UserProfileModel.NAME);
 
Parameters:
modelName - of the ObjectModel desired. Taken from *Model.NAME.
Returns:
The new ObjectModel. Cast this to the correct subtype! Returns null if no model exists by given name.

putModel

public static void putModel(java.lang.String modelName,
                            java.lang.Class modelClass)


Copyright © 2002 counterclaim.com. All Rights Reserved.