It describes a primary key (pk) constraint. More...
#include <PrimaryKey.h>
Public Member Functions | |
| void | add (const te::dt::Property *p) |
| It adds a property to the list of properties of the primary key. | |
| Constraint * | clone () |
| It returns a clone of the object. | |
| Index * | getAssociatedIndex () const |
| It returns the associated index if one exists. | |
| virtual DataSetType * | getDataSetType () const |
| It returns the DataSetType associated to the constraint. | |
| virtual unsigned int | getId () const |
| It returns the constraint identifier. | |
| virtual const std::string & | getName () const |
| It returns the constraint name. | |
| const std::vector< te::dt::Property * > & | getProperties () const |
| It returns the properties that take part of the primary key. | |
| ConstraintType | getType () const |
| It returns the constraint type: PRIMARYKEY. | |
| bool | has (const std::string &propertyName) const |
| It verifies if Property is associated to the primary key. | |
| PrimaryKey & | operator= (const PrimaryKey &rhs) |
| Assignment operator. | |
| PrimaryKey (const PrimaryKey &rhs) | |
| Copy constructor. | |
| PrimaryKey (const std::string &name, DataSetType *dt=0, unsigned int id=0) | |
| Constructor. | |
| PrimaryKey (DataSetType *dt=0, unsigned int id=0) | |
| Constructor. | |
| void | replace (const std::string &propName, const te::dt::Property *pp) |
| It changes a reference to property p to pp. | |
| void | setAssociatedIndex (const Index *idx) |
| It sets the associated index. | |
| virtual void | setDataSetType (DataSetType *dt) |
| It sets the DataSetType associated to the constraint. | |
| virtual void | setId (unsigned int id) |
| It sets the constraint identifier. | |
| virtual void | setName (const std::string &name) |
| It sets the constraint name. | |
| ~PrimaryKey () | |
| Destructor. | |
Private Attributes | |
| DataSetType * | m_dt |
| The associated DataSetType. | |
| unsigned int | m_id |
| An identification number for the constraint. | |
| Index * | m_index |
| A pointer to an associated index. | |
| std::string | m_name |
| The constraint name. | |
| std::vector< te::dt::Property * > | m_properties |
| The properties that take part of primary key constraint. | |
It describes a primary key (pk) constraint.
Definition at line 48 of file PrimaryKey.h.
| te::da::PrimaryKey::PrimaryKey | ( | DataSetType * | dt = 0, |
| unsigned int | id = 0 ) |
Constructor.
| dt | The DataSetType associated to the pk. |
| id | The pk identifier. |
Referenced by operator=(), and PrimaryKey().
| te::da::PrimaryKey::PrimaryKey | ( | const std::string & | name, |
| DataSetType * | dt = 0, | ||
| unsigned int | id = 0 ) |
Constructor.
| name | The primary key constraint name. |
| dt | The DataSetType associated to the pk. |
| id | The pk identifier. |
| te::da::PrimaryKey::PrimaryKey | ( | const PrimaryKey & | rhs | ) |
Copy constructor.
The new object will not have an assigned DataSetType.
| rhs | Right-hand-side instance. |
References PrimaryKey().
| te::da::PrimaryKey::~PrimaryKey | ( | ) |
Destructor.
|
inline |
It adds a property to the list of properties of the primary key.
| p | The property that will take part of the primary key. |
Definition at line 112 of file PrimaryKey.h.
References te::dt::Property::clone(), and m_properties.
|
virtual |
It returns a clone of the object.
The new object will not have an associated DataSetType.
Implements te::da::Constraint.
References te::da::Constraint::Constraint().
|
inline |
It returns the associated index if one exists.
Definition at line 126 of file PrimaryKey.h.
References m_index.
|
inlinevirtualinherited |
It returns the DataSetType associated to the constraint.
Definition at line 133 of file Constraint.h.
References m_dt.
|
inlinevirtualinherited |
It returns the constraint identifier.
Definition at line 103 of file Constraint.h.
References m_id.
|
inlinevirtualinherited |
It returns the constraint name.
Definition at line 119 of file Constraint.h.
References m_name.
|
inline |
It returns the properties that take part of the primary key.
Definition at line 105 of file PrimaryKey.h.
References m_properties.
|
inlinevirtual |
It returns the constraint type: PRIMARYKEY.
Implements te::da::Constraint.
Definition at line 152 of file PrimaryKey.h.
References te::da::PRIMARY_KEY.
| bool te::da::PrimaryKey::has | ( | const std::string & | propertyName | ) | const |
It verifies if Property is associated to the primary key.
| propertyName | The Propertyname to be verified. |
| PrimaryKey & te::da::PrimaryKey::operator= | ( | const PrimaryKey & | rhs | ) |
Assignment operator.
The new object will not have an assigned DataSetType.
| rhs | Right-hand-side instance. |
References PrimaryKey().
| void te::da::PrimaryKey::replace | ( | const std::string & | propName, |
| const te::dt::Property * | pp ) |
It changes a reference to property p to pp.
| propName | A property name that takes part of the primary key. |
| pp | The property that will take p place. |
| void te::da::PrimaryKey::setAssociatedIndex | ( | const Index * | idx | ) |
It sets the associated index.
| idx | If the primary key is associated to an index, this method will associate them. |
|
inlinevirtualinherited |
It sets the DataSetType associated to the constraint.
| dt | The DataSetType associated to this constraint. |
Definition at line 143 of file Constraint.h.
References m_dt.
|
inlinevirtualinherited |
It sets the constraint identifier.
| id | A number that identifies the constraint. |
Definition at line 112 of file Constraint.h.
References m_id.
|
inlinevirtualinherited |
It sets the constraint name.
| name | The constraint name. |
Definition at line 126 of file Constraint.h.
References m_name.
|
privateinherited |
The associated DataSetType.
Definition at line 166 of file Constraint.h.
Referenced by getDataSetType(), and setDataSetType().
|
privateinherited |
An identification number for the constraint.
Definition at line 165 of file Constraint.h.
|
private |
A pointer to an associated index.
Definition at line 165 of file PrimaryKey.h.
Referenced by getAssociatedIndex().
|
privateinherited |
The constraint name.
Definition at line 167 of file Constraint.h.
|
private |
The properties that take part of primary key constraint.
Definition at line 166 of file PrimaryKey.h.
Referenced by add(), and getProperties().