com.bonevich.erj.model
Class Relation

java.lang.Object
  |
  +--com.bonevich.erj.model.ModelElement
        |
        +--com.bonevich.erj.model.Relation
All Implemented Interfaces:
ErjConstants

public final class Relation
extends ModelElement

A class that represents ...

Author:
Jeffrey D. Bonevich
See Also:
Schema, Attribute

Field Summary
static java.lang.String EMPTY_STR
           
static java.lang.String NEW_RELATION_STR
           
 
Fields inherited from class com.bonevich.erj.model.ModelElement
_description, _dyn_description, _dyn_identifier, _dyn_name, _identifier, _name
 
Fields inherited from interface com.bonevich.erj.ErjConstants
EDITOR_COLOR, EDITOR_FONT, ICON_AK, ICON_DOMAIN, ICON_FK, ICON_FOREIGNKEY, ICON_NOTNULL, ICON_NULL, ICON_PK, ICON_RELATION, ICON_SCHEMA, ICON_SPLASH, INITIAL_FRAME_SIZE, LABEL_COLOR, LABEL_FILL, LABEL_FONT, LABEL_FONT_ITALIC, LABEL_FONT_SIZE, LABEL_FONTMETRICS, STATUSBAR_COLOR, STATUSBAR_FONT, STATUSBAR_FONT_ITALIC, STATUSBAR_MOD_FILL, SUBLABEL_FILL
 
Constructor Summary
Relation(Schema schema)
           
 
Method Summary
 void accept(ModelElementVisitor visitor)
           
 Attribute createAttribute()
           
 Attribute createAttribute(Attribute ref)
           
 ForeignKey createForeignKey(Relation referent)
           
 ForeignKey createForeignKey(Relation referent, Attribute[] attributes)
           
 PrimaryKey createPrimaryKey(Attribute[] attributes)
           
 UniqueKey createUniqueKey(Attribute[] attributes)
           
 void deleteAttribute(Attribute attribute)
           
 void deleteKey(ForeignKey key)
           
 void deleteKey(KeyConstraint key)
           
 void dispose()
           
 boolean equals(java.lang.Object rhs)
           
 Attribute getAttribute(java.lang.String identifier)
           
 int getAttributeCount()
           
 java.util.Iterator getAttributeIterator()
           
 int getKeyCount()
           
 java.util.Iterator getKeyIterator()
           
 Schema getSchema()
           
 void moveAttributeDown(Attribute attribute)
           
 void moveAttributeUp(Attribute attribute)
           
 
Methods inherited from class com.bonevich.erj.model.ModelElement
getDescription, getIdentifier, getName, getOclReferenceId, isNameInitialized, setDescription, setIdentifier, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEW_RELATION_STR

public static final java.lang.String NEW_RELATION_STR
See Also:
Constant Field Values

EMPTY_STR

public static final java.lang.String EMPTY_STR
See Also:
Constant Field Values
Constructor Detail

Relation

public Relation(Schema schema)
Method Detail

getSchema

public Schema getSchema()

createAttribute

public Attribute createAttribute()

createAttribute

public Attribute createAttribute(Attribute ref)

moveAttributeUp

public void moveAttributeUp(Attribute attribute)

moveAttributeDown

public void moveAttributeDown(Attribute attribute)

deleteAttribute

public void deleteAttribute(Attribute attribute)

getAttributeIterator

public java.util.Iterator getAttributeIterator()

getAttributeCount

public int getAttributeCount()

getAttribute

public Attribute getAttribute(java.lang.String identifier)

createUniqueKey

public UniqueKey createUniqueKey(Attribute[] attributes)

createPrimaryKey

public PrimaryKey createPrimaryKey(Attribute[] attributes)

createForeignKey

public ForeignKey createForeignKey(Relation referent)

createForeignKey

public ForeignKey createForeignKey(Relation referent,
                                   Attribute[] attributes)

deleteKey

public void deleteKey(ForeignKey key)

deleteKey

public void deleteKey(KeyConstraint key)

getKeyIterator

public java.util.Iterator getKeyIterator()

getKeyCount

public int getKeyCount()

dispose

public void dispose()
Specified by:
dispose in class ModelElement

equals

public boolean equals(java.lang.Object rhs)
Overrides:
equals in class ModelElement

accept

public void accept(ModelElementVisitor visitor)
Specified by:
accept in class ModelElement


Copyright © 2001-2003 bonevich.com. All Rights Reserved.