com.arsdigita.metadata
Class DynamicAssociation
java.lang.Object
com.arsdigita.metadata.DynamicElement
com.arsdigita.metadata.DynamicAssociation
- public class DynamicAssociation
- extends com.arsdigita.metadata.DynamicElement
This class provides support to create dynamic two-way associations between
any object types. Link attributes will eventually be supported.
- Version:
- $Revision: #19 $ $Date: 2004/04/07 $
- Author:
- Patrick McNeill
Constructor Summary |
DynamicAssociation(String modelName,
String objectType1,
String property1,
int multiplicity1,
String objectType2,
String property2,
int multiplicity2)
Creates a new DynamicAssociation. |
DynamicAssociation(String modelName,
String objectType1,
String property1,
String objectType2,
String property2)
Load a pre-existing DynamicAssociation for editing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
versionId
public static final String versionId
- See Also:
- Constant Field Values
DynamicAssociation
public DynamicAssociation(String modelName,
String objectType1,
String property1,
String objectType2,
String property2)
- Load a pre-existing DynamicAssociation for editing. Note this is
rather useless right now since we don't support link attributes.
- Parameters:
modelName
- the fully-qualified model name for this associationobjectType1
- the fully-qualified name of the datatype of the
first propertyproperty1
- the name of the first propertyobjectType2
- the fully-qualified name of the datatype of the
second propertyproperty2
- the name of the second property
- Throws:
PersistenceException
- if either ObjectType is null or if they
do not contain the correct property
DynamicAssociation
public DynamicAssociation(String modelName,
String objectType1,
String property1,
int multiplicity1,
String objectType2,
String property2,
int multiplicity2)
- Creates a new DynamicAssociation. The two named properties will
be created with the given datatypes and multiplicities.
- Parameters:
modelName
- the fully-qualified model name for this associationobjectType1
- the fully-qualified name of the datatype of the
first propertyproperty1
- the name of the first propertyobjectType2
- the fully-qualified name of the datatype of the
second propertyproperty2
- the name of the second property
- Throws:
PersistenceException
- if either ObjectType is null or if they
do not contain the correct property
getProperty1
public Property getProperty1()
getProperty2
public Property getProperty2()
save
public Association save()
- Saves this DynamicAssociation. If it's a new Association, the table
will be created. Editing really makes no sense right now, so it
won't do a whole lot but resave the PDL. The Properties are also
added to the object types, facilitating retrieval of the association.
- Returns:
- the newly created Association
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC