org.xorm
Class ModelMapping

java.lang.Object
  |
  +--org.xorm.ModelMapping
All Implemented Interfaces:
Configurable, I15d

public class ModelMapping
extends Object
implements Configurable, I15d

Represents the full set of mappings for an object model.


Field Summary
static String ATTR_FILTER
           
static String ATTR_IMPORTS
           
static String ATTR_INDEX
           
static String ATTR_ORDER_BY
           
static String ATTR_ORDERING
           
static String ATTR_PARAMETERS
           
static String ATTR_SOURCE
           
static String ATTR_TARGET
           
static String ATTR_VARIABLES
           
static String DATABASE_DTD
           
static String DATABASE_XML
           
protected static Logger logger
           
static String OPTION_BOOTSTRAP_JDO
           
static String OPTION_DEFAULT_MAPPING
           
static String OPTION_ONLY_CONFIGURED_PROPERTIES
           
static String OPTION_VALIDATE_XML
           
static String XORM_VENDOR_NAME
           
 
Fields inherited from interface org.xorm.I15d
I18N
 
Constructor Summary
ModelMapping()
           
 
Method Summary
 void addClassMapping(ClassMapping mapping)
           
 ClassMapping getClassMapping(Class clazz)
          Retrieves a ClassMapping for the specified class.
 Table getTable(String name)
           
 boolean isManagedType(Class type)
          Returns true if the interface type passed in has been configured via the mapping file to be persisted.
 void setFactory(InterfaceManagerFactory factory)
           
 void setProperties(Properties props)
          Initializes an empty ModelMapping that will be populated on demand by reading JDO files, or can be hand-populated by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static Logger logger

XORM_VENDOR_NAME

public static final String XORM_VENDOR_NAME
See Also:
Constant Field Values

ATTR_SOURCE

public static final String ATTR_SOURCE
See Also:
Constant Field Values

ATTR_TARGET

public static final String ATTR_TARGET
See Also:
Constant Field Values

ATTR_ORDER_BY

public static final String ATTR_ORDER_BY
See Also:
Constant Field Values

ATTR_INDEX

public static final String ATTR_INDEX
See Also:
Constant Field Values

ATTR_FILTER

public static final String ATTR_FILTER
See Also:
Constant Field Values

ATTR_PARAMETERS

public static final String ATTR_PARAMETERS
See Also:
Constant Field Values

ATTR_VARIABLES

public static final String ATTR_VARIABLES
See Also:
Constant Field Values

ATTR_ORDERING

public static final String ATTR_ORDERING
See Also:
Constant Field Values

ATTR_IMPORTS

public static final String ATTR_IMPORTS
See Also:
Constant Field Values

DATABASE_XML

public static final String DATABASE_XML
See Also:
Constant Field Values

DATABASE_DTD

public static final String DATABASE_DTD
See Also:
Constant Field Values

OPTION_VALIDATE_XML

public static final String OPTION_VALIDATE_XML
See Also:
Constant Field Values

OPTION_BOOTSTRAP_JDO

public static final String OPTION_BOOTSTRAP_JDO
See Also:
Constant Field Values

OPTION_DEFAULT_MAPPING

public static final String OPTION_DEFAULT_MAPPING
See Also:
Constant Field Values

OPTION_ONLY_CONFIGURED_PROPERTIES

public static final String OPTION_ONLY_CONFIGURED_PROPERTIES
See Also:
Constant Field Values
Constructor Detail

ModelMapping

public ModelMapping()
Method Detail

setFactory

public void setFactory(InterfaceManagerFactory factory)
Specified by:
setFactory in interface Configurable

addClassMapping

public void addClassMapping(ClassMapping mapping)

getClassMapping

public ClassMapping getClassMapping(Class clazz)
Retrieves a ClassMapping for the specified class. If the class itself is not mapped, but a superclass or superinterface is mapped, that mapping is cloned and used for the specified class.

Throws:
JDOUserException - if no applicable mapping is found

getTable

public Table getTable(String name)

setProperties

public void setProperties(Properties props)
Initializes an empty ModelMapping that will be populated on demand by reading JDO files, or can be hand-populated by the user.

Specified by:
setProperties in interface Configurable
Parameters:
props - the Properties to use

isManagedType

public boolean isManagedType(Class type)
Returns true if the interface type passed in has been configured via the mapping file to be persisted. Note that this is NOT the same thing as checking if an instance that implements the interface is managed, and in particular, a call to mgr.isManagedType(persistentInstance.getClass()) will NOT return true.



$Header: /cvsroot/xorm/xorm/docs/api/org/xorm/ModelMapping.html,v 1.9 2004/05/30 08:55:03 wbiggs Exp $