org.eobjects.metamodel.schema
Class MutableRelationship
java.lang.Object
org.eobjects.metamodel.util.BaseObject
org.eobjects.metamodel.schema.AbstractRelationship
org.eobjects.metamodel.schema.MutableRelationship
- All Implemented Interfaces:
- Serializable, Comparable<Relationship>, Relationship
public class MutableRelationship
- extends AbstractRelationship
- implements Serializable, Relationship
Immutable implementation of the Relationship interface.
The immutability help ensure integrity of object-relationships. To create
relationsips use the createRelationship method.
- Author:
- Kasper Sørensen
- See Also:
- Serialized Form
createRelationship
public static Relationship createRelationship(Column[] primaryColumns,
Column[] foreignColumns)
- Factory method to create relations between two tables by specifying which
columns from the tables that enforce the relationship.
- Parameters:
primaryColumns - the columns from the primary key tableforeignColumns - the columns from the foreign key table
- Returns:
- the relation created
remove
public void remove()
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
createRelationship
public static Relationship createRelationship(Column primaryColumn,
Column foreignColumn)
getPrimaryColumns
public Column[] getPrimaryColumns()
- Description copied from interface:
Relationship
- Gets the primary key columns of this relationship.
- Specified by:
getPrimaryColumns in interface Relationship
- Returns:
- an array of primary key columns.
getForeignColumns
public Column[] getForeignColumns()
- Description copied from interface:
Relationship
- Gets the foreign key columns of this relationship.
- Specified by:
getForeignColumns in interface Relationship
- Returns:
- an array of foreign key columns.
Copyright © 2007-2013. All Rights Reserved.