• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdesdk
  • Sitemap
  • Contact Us
 

umbrello/umbrello

UMLForeignKeyConstraint Class Reference

#include <foreignkeyconstraint.h>

Inheritance diagram for UMLForeignKeyConstraint:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class is used to set up information for a foreign key entity constraint.

Sets up Foreign Key entity constraint information.

Author:
Sharan Rao
See also:
UMLObject UMLClassifierListItem UMLEntityConstraint Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 33 of file foreignkeyconstraint.h.


Public Types

enum  UpdateDeleteAction {
  uda_NoAction = 0, uda_Restrict, uda_Cascade, uda_SetNull,
  uda_SetDefault
}

Signals

void sigReferencedEntityChanged ()

Public Member Functions

 UMLForeignKeyConstraint (UMLObject *parent, const QString &name, Uml::IDType id=Uml::id_None)
 UMLForeignKeyConstraint (UMLObject *parent)
bool operator== (const UMLForeignKeyConstraint &rhs)
virtual ~UMLForeignKeyConstraint ()
virtual void copyInto (UMLObject *lhs) const
virtual UMLObject * clone () const
QString toString (Uml::Signature_Type sig=Uml::st_NoSig)
void setReferencedEntity (UMLEntity *ent)
UMLEntity * getReferencedEntity () const
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
virtual bool showPropertiesDialog (QWidget *parent)
bool addEntityAttributePair (UMLEntityAttribute *pAttr, UMLEntityAttribute *rAttr)
bool removeEntityAttributePair (UMLEntityAttribute *pAttr)
bool hasEntityAttributePair (UMLEntityAttribute *pAttr, UMLEntityAttribute *rAttr) const
QMap< UMLEntityAttribute *,
UMLEntityAttribute * > 
getEntityAttributePairs ()
UpdateDeleteAction getDeleteAction () const
UpdateDeleteAction getUpdateAction () const
void setDeleteAction (UpdateDeleteAction uda)
void setUpdateAction (UpdateDeleteAction uda)
void clearMappings ()
bool resolveRef ()

Protected Member Functions

bool load (QDomElement &element)

Member Enumeration Documentation

enum UMLForeignKeyConstraint::UpdateDeleteAction

Update/Delete Action: Action to be taken on Update or Delete of a referenced attribute is either, No Action, Restrict, Cascade, Set NULL , Set Default.

Enumerator:
uda_NoAction 
uda_Restrict 
uda_Cascade 
uda_SetNull 
uda_SetDefault 

Definition at line 43 of file foreignkeyconstraint.h.


Constructor & Destructor Documentation

UMLForeignKeyConstraint::UMLForeignKeyConstraint ( UMLObject *  parent,
const QString &  name,
Uml::IDType  id = Uml::id_None 
)

Sets up a constraint.

Parameters:
parent The parent of this UMLForeignKeyConstraint.
name The name of this UMLForeignKeyConstraint.
id The unique id given to this UMLForeignKeyConstraint.

Definition at line 25 of file foreignkeyconstraint.cpp.

UMLForeignKeyConstraint::UMLForeignKeyConstraint ( UMLObject *  parent  ) 

Sets up a constraint.

Parameters:
parent The parent of this UMLForeignKeyConstraint.

Definition at line 31 of file foreignkeyconstraint.cpp.

UMLForeignKeyConstraint::~UMLForeignKeyConstraint (  )  [virtual]

destructor.

Definition at line 62 of file foreignkeyconstraint.cpp.


Member Function Documentation

bool UMLForeignKeyConstraint::operator== ( const UMLForeignKeyConstraint &  rhs  ) 

Overloaded '==' operator.

Definition at line 51 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::copyInto ( UMLObject *  lhs  )  const [virtual]

Copy the internal presentation of this object into the UMLForeignKeyConstraint object.

Reimplemented from UMLEntityConstraint.

Definition at line 64 of file foreignkeyconstraint.cpp.

UMLObject * UMLForeignKeyConstraint::clone (  )  const [virtual]

Make a clone of the UMLForeignKeyConstraint.

Implements UMLEntityConstraint.

Definition at line 77 of file foreignkeyconstraint.cpp.

QString UMLForeignKeyConstraint::toString ( Uml::Signature_Type  sig = Uml::st_NoSig  )  [virtual]

Returns a string representation of the UMLForeignKeyConstraint.

Parameters:
sig If true will show the attribute type and initial value.
Returns:
Returns a string representation of the UMLAttribute.

Reimplemented from UMLClassifierListItem.

Definition at line 84 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::setReferencedEntity ( UMLEntity *  ent  ) 

Set the Referenced Entity.

Parameters:
ent The Entity to Reference

Definition at line 269 of file foreignkeyconstraint.cpp.

UMLEntity* UMLForeignKeyConstraint::getReferencedEntity (  )  const [inline]

Definition at line 99 of file foreignkeyconstraint.h.

void UMLForeignKeyConstraint::saveToXMI ( QDomDocument &  qDoc,
QDomElement &  qElement 
) [virtual]

Creates the <UML:ForeignKeyConstraint> XMI element.

Implements UMLObject.

Definition at line 107 of file foreignkeyconstraint.cpp.

bool UMLForeignKeyConstraint::showPropertiesDialog ( QWidget *  parent  )  [virtual]

Display the properties configuration dialog for the attribute.

Implements UMLClassifierListItem.

Definition at line 129 of file foreignkeyconstraint.cpp.

bool UMLForeignKeyConstraint::addEntityAttributePair ( UMLEntityAttribute *  pAttr,
UMLEntityAttribute *  rAttr 
)

Adds the attribute pair to the attributeMap.

Parameters:
pAttr The Attribute of the Parent Entity
rAttr The Attribute of the Referenced Entity
Returns:
true if the attribute pair could be added successfully

Definition at line 134 of file foreignkeyconstraint.cpp.

bool UMLForeignKeyConstraint::removeEntityAttributePair ( UMLEntityAttribute *  pAttr  ) 

Removes an Attribute pair.

Parameters:
pAttr The Attribute of the Parent Entity in the map. This attribute is the key of the map
Returns:
true of the attribute pair could be removed successfully

Definition at line 193 of file foreignkeyconstraint.cpp.

bool UMLForeignKeyConstraint::hasEntityAttributePair ( UMLEntityAttribute *  pAttr,
UMLEntityAttribute *  rAttr 
) const

Check if a attribute pair already exists.

Parameters:
pAttr The Attribute of the Parent Entity
rAttr The Attribute of the Referenced Entity
Returns:
true if the attribute pair could be found.

Definition at line 201 of file foreignkeyconstraint.cpp.

QMap<UMLEntityAttribute*,UMLEntityAttribute*> UMLForeignKeyConstraint::getEntityAttributePairs (  )  [inline]

Retrieve all Pairs of Attributes.

Definition at line 141 of file foreignkeyconstraint.h.

UpdateDeleteAction UMLForeignKeyConstraint::getDeleteAction (  )  const [inline]

Get the Delete Action.

Definition at line 148 of file foreignkeyconstraint.h.

UpdateDeleteAction UMLForeignKeyConstraint::getUpdateAction (  )  const [inline]

Get the Update Action.

Definition at line 155 of file foreignkeyconstraint.h.

void UMLForeignKeyConstraint::setDeleteAction ( UpdateDeleteAction  uda  )  [inline]

Set the Delete Action to the specified UpdateDeleteAction.

Definition at line 162 of file foreignkeyconstraint.h.

void UMLForeignKeyConstraint::setUpdateAction ( UpdateDeleteAction  uda  )  [inline]

Set the Update Action to the specified UpdateDeleteAction.

Definition at line 169 of file foreignkeyconstraint.h.

void UMLForeignKeyConstraint::clearMappings (  ) 

Clears all mappings between local and referenced attributes.

Definition at line 285 of file foreignkeyconstraint.cpp.

bool UMLForeignKeyConstraint::resolveRef (  )  [virtual]

Remimplementation from base classes Used to resolve forward references to referenced entities in xmi.

Reimplemented from UMLObject.

Definition at line 290 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::sigReferencedEntityChanged (  )  [signal]

bool UMLForeignKeyConstraint::load ( QDomElement &  element  )  [protected, virtual]

Loads the <UML:ForeignKeyConstraint> XMI element.

Reimplemented from UMLObject.

Definition at line 212 of file foreignkeyconstraint.cpp.


The documentation for this class was generated from the following files:
  • foreignkeyconstraint.h
  • foreignkeyconstraint.cpp

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdesdk

Skip menu "kdesdk"
  • kate
  •     kate
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal