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

umbrello/umbrello

UMLForeignKeyConstraint Class Reference

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

#include <foreignkeyconstraint.h>

Inheritance diagram for UMLForeignKeyConstraint:
Inheritance graph
[legend]

List of all members.

Public Types

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

Signals

void sigReferencedEntityChanged ()

Public Member Functions

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

Protected Member Functions

bool load (QDomElement &element)

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 32 of file foreignkeyconstraint.h.


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 42 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 32 of file foreignkeyconstraint.cpp.

UMLForeignKeyConstraint::UMLForeignKeyConstraint ( UMLObject *  parent  ) 

Sets up a constraint.

Parameters:
parent The parent of this UMLForeignKeyConstraint.

Definition at line 43 of file foreignkeyconstraint.cpp.

UMLForeignKeyConstraint::~UMLForeignKeyConstraint (  )  [virtual]

Destructor.

Definition at line 85 of file foreignkeyconstraint.cpp.


Member Function Documentation

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 186 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::clearMappings (  ) 

Clears all mappings between local and referenced attributes.

Definition at line 362 of file foreignkeyconstraint.cpp.

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

Make a clone of the UMLForeignKeyConstraint.

Implements UMLEntityConstraint.

Definition at line 110 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 93 of file foreignkeyconstraint.cpp.

UMLForeignKeyConstraint::UpdateDeleteAction UMLForeignKeyConstraint::getDeleteAction (  )  const

Get the Delete Action.

Definition at line 412 of file foreignkeyconstraint.cpp.

QMap< UMLEntityAttribute *, UMLEntityAttribute * > UMLForeignKeyConstraint::getEntityAttributePairs (  ) 

Retrieve all Pairs of Attributes.

Definition at line 404 of file foreignkeyconstraint.cpp.

UMLEntity * UMLForeignKeyConstraint::getReferencedEntity (  )  const

Get the Referenced Entity.

Returns:
the UML entity object

Definition at line 345 of file foreignkeyconstraint.cpp.

UMLForeignKeyConstraint::UpdateDeleteAction UMLForeignKeyConstraint::getUpdateAction (  )  const

Get the Update Action.

Definition at line 420 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 258 of file foreignkeyconstraint.cpp.

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

Loads the <UML:ForeignKeyConstraint> XMI element.

Reimplemented from UMLObject.

Definition at line 272 of file foreignkeyconstraint.cpp.

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

Overloaded '==' operator.

Reimplemented from UMLEntityConstraint.

Definition at line 71 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 245 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 371 of file foreignkeyconstraint.cpp.

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

Creates the <UML:ForeignKeyConstraint> XMI element.

Implements UMLObject.

Definition at line 148 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::setDeleteAction ( UpdateDeleteAction  uda  ) 

Set the Delete Action to the specified UpdateDeleteAction.

Definition at line 428 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::setReferencedEntity ( UMLEntity *  ent  ) 

Set the Referenced Entity.

Parameters:
ent The Entity to Reference

Definition at line 331 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::setUpdateAction ( UpdateDeleteAction  uda  ) 

Set the Update Action to the specified UpdateDeleteAction.

Definition at line 436 of file foreignkeyconstraint.cpp.

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

Display the properties configuration dialog for the attribute.

Implements UMLClassifierListItem.

Definition at line 174 of file foreignkeyconstraint.cpp.

void UMLForeignKeyConstraint::sigReferencedEntityChanged (  )  [signal]
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 123 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"
  • kapptemplate
  • kate
  •     kate
  • kbugbuster
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.9-20090814
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