It describes a unique key (uk) constraint.
More...
#include <UniqueKey.h>
It describes a unique key (uk) constraint.
- See also
- DataSetType, Index, PrimaryKey, ForeignKey, DataSetTypeCheckRestriction
Definition at line 53 of file UniqueKey.h.
te::da::UniqueKey::UniqueKey |
( |
DataSetType * |
dt = 0 , |
|
|
unsigned int |
id = 0 |
|
) |
| |
Constructor.
- Parameters
-
dt | The DataSetType associated to this uk. |
id | The uk identifier. |
- Postcondition
- If dt is provided, the uk will belong to the given DataSetType.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
te::da::UniqueKey::UniqueKey |
( |
const std::string & |
name, |
|
|
DataSetType * |
dt = 0 , |
|
|
unsigned int |
id = 0 |
|
) |
| |
Constructor.
- Parameters
-
name | The unique key (uk) constraint name. |
dt | The DataSetType associated to this uk. |
id | The uk identifier. |
- Postcondition
- If dt is provided, the uk will belong to the given DataSetType.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
te::da::UniqueKey::UniqueKey |
( |
const UniqueKey & |
rhs | ) |
|
Copy constructor.
The new object will not have an associated DataSetType.
- Parameters
-
rhs | Right-hand-side instance. |
te::da::UniqueKey::~UniqueKey |
( |
| ) |
|
|
inline |
It adds the property to the list of properties that participates in the unique key.
- Parameters
-
p | The Property that will take part of the unique key. |
Definition at line 124 of file UniqueKey.h.
It returns a clone of the object.
The new object will not have an associated DataSetType.
- Returns
- A clone of the object.
Implements te::da::Constraint.
Index* te::da::UniqueKey::getAssociatedIndex |
( |
| ) |
const |
|
inline |
It returns the associated index if one exists.
- Returns
- An associated index if one exists.
Definition at line 131 of file UniqueKey.h.
virtual DataSetType* te::da::Constraint::getDataSetType |
( |
| ) |
const |
|
inlinevirtualinherited |
virtual unsigned int te::da::Constraint::getId |
( |
| ) |
const |
|
inlinevirtualinherited |
It returns the constraint identifier.
- Returns
- A number that identifies the constraint.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
Definition at line 103 of file Constraint.h.
virtual const std::string& te::da::Constraint::getName |
( |
| ) |
const |
|
inlinevirtualinherited |
It returns the constraint name.
- Returns
- The constraint name.
Definition at line 119 of file Constraint.h.
const std::vector<te::dt::Property*>& te::da::UniqueKey::getProperties |
( |
| ) |
const |
|
inline |
It returns the properties that form the unique key.
- Returns
- The properties that form the unique key.
Definition at line 110 of file UniqueKey.h.
It verifies if Property is associated to the unique key.
- Parameters
-
p | The Property to be verified. |
- Returns
- True if Property is associated to the unique key, false otherwise.
Assignment operator.
The new object will not have an assigned DataSetType.
- Parameters
-
rhs | Right-hand-side instance. |
- Returns
- A reference to this.
void te::da::UniqueKey::setAssociatedIndex |
( |
Index * |
idx | ) |
|
|
inline |
It sets the associated index.
- Parameters
-
idx | A index associated to the unique key. |
Definition at line 138 of file UniqueKey.h.
virtual void te::da::Constraint::setDataSetType |
( |
DataSetType * |
dt | ) |
|
|
inlinevirtualinherited |
It sets the DataSetType associated to the constraint.
- Parameters
-
- Warning
- Take care when calling this method. If the constraint belongs to a DataSetType, remember to detach it from the DataSetType before calling this method.
Definition at line 143 of file Constraint.h.
virtual void te::da::Constraint::setId |
( |
unsigned int |
id | ) |
|
|
inlinevirtualinherited |
It sets the constraint identifier.
- Parameters
-
id | A number that identifies the constraint. |
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
Definition at line 112 of file Constraint.h.
virtual void te::da::Constraint::setName |
( |
const std::string & |
name | ) |
|
|
inlinevirtualinherited |
It sets the constraint name.
- Parameters
-
Definition at line 126 of file Constraint.h.
void te::da::UniqueKey::setProperties |
( |
const std::vector< te::dt::Property * > & |
properties | ) |
|
|
inline |
It sets the properties that form the unique key.
- Parameters
-
properties | The properties that form the unique key. |
Definition at line 117 of file UniqueKey.h.
Index* te::da::UniqueKey::m_index |
|
private |
A pointer to an associated index.
Definition at line 177 of file UniqueKey.h.
The properties that are part of the unique key constraint.
Definition at line 178 of file UniqueKey.h.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/dataaccess/dataset/UniqueKey.h