It describes a unique key (uk) constraint. More...
#include <UniqueKey.h>
  
 Public Member Functions | |
| void | add (te::dt::Property *p) | 
| It adds the property to the list of properties that participates in the unique key.  More... | |
| Constraint * | clone () | 
| It returns a clone of the object.  More... | |
| Index * | getAssociatedIndex () const | 
| It returns the associated index if one exists.  More... | |
| virtual DataSetType * | getDataSetType () const | 
| It returns the DataSetType associated to the constraint.  More... | |
| virtual unsigned int | getId () const | 
| It returns the constraint identifier.  More... | |
| virtual const std::string & | getName () const | 
| It returns the constraint name.  More... | |
| const std::vector < te::dt::Property * > &  | getProperties () const | 
| It returns the properties that form the unique key.  More... | |
| ConstraintType | getType () const | 
| It returns the constraint type: UNIQUEKEY.  More... | |
| bool | has (const te::dt::Property *p) const | 
| It verifies if Property is associated to the unique key.  More... | |
| UniqueKey & | operator= (const UniqueKey &rhs) | 
| Assignment operator.  More... | |
| void | replace (te::dt::Property *p, te::dt::Property *pp) | 
| void | setAssociatedIndex (Index *idx) | 
| It sets the associated index.  More... | |
| virtual void | setDataSetType (DataSetType *dt) | 
| It sets the DataSetType associated to the constraint.  More... | |
| virtual void | setId (unsigned int id) | 
| It sets the constraint identifier.  More... | |
| virtual void | setName (const std::string &name) | 
| It sets the constraint name.  More... | |
| void | setProperties (const std::vector< te::dt::Property * > &properties) | 
| It sets the properties that form the unique key.  More... | |
| UniqueKey (DataSetType *dt=0, unsigned int id=0) | |
| Constructor.  More... | |
| UniqueKey (const std::string &name, DataSetType *dt=0, unsigned int id=0) | |
| Constructor.  More... | |
| UniqueKey (const UniqueKey &rhs) | |
| Copy constructor.  More... | |
| ~UniqueKey () | |
| Destructor.  More... | |
Private Attributes | |
| Index * | m_index | 
| A pointer to an associated index.  More... | |
| std::vector< te::dt::Property * > | m_properties | 
| The properties that are part of the unique key constraint.  More... | |
It describes a unique key (uk) constraint.
Definition at line 53 of file UniqueKey.h.
| te::da::UniqueKey::UniqueKey | ( | DataSetType * | dt = 0,  | 
        
| unsigned int | id = 0  | 
        ||
| ) | 
Constructor.
| dt | The DataSetType associated to this uk. | 
| id | The uk identifier. | 
Definition at line 31 of file UniqueKey.cpp.
References te::da::DataSetType::add().
| te::da::UniqueKey::UniqueKey | ( | const std::string & | name, | 
| DataSetType * | dt = 0,  | 
        ||
| unsigned int | id = 0  | 
        ||
| ) | 
Constructor.
| name | The unique key (uk) constraint name. | 
| dt | The DataSetType associated to this uk. | 
| id | The uk identifier. | 
Definition at line 39 of file UniqueKey.cpp.
References te::da::DataSetType::add().
| te::da::UniqueKey::UniqueKey | ( | const UniqueKey & | rhs | ) | 
Copy constructor.
The new object will not have an associated DataSetType.
| rhs | Right-hand-side instance. | 
Definition at line 47 of file UniqueKey.cpp.
      
  | 
  inline | 
Destructor.
Definition at line 92 of file UniqueKey.h.
      
  | 
  inline | 
It adds the property to the list of properties that participates in the unique key.
| p | The Property that will take part of the unique key. | 
Definition at line 124 of file UniqueKey.h.
Referenced by te::da::DataSetType::DataSetType(), te::qt::widgets::UniqueKeyConstraintWidget::getConstraint(), and te::ado::Transactor::getUniqueKeys().
      
  | 
  virtual | 
It returns a clone of the object.
The new object will not have an associated DataSetType.
Implements te::da::Constraint.
Definition at line 91 of file UniqueKey.cpp.
      
  | 
  inline | 
It returns the associated index if one exists.
Definition at line 131 of file UniqueKey.h.
Referenced by te::da::DataSetType::DataSetType().
      
  | 
  inlinevirtualinherited | 
It returns the DataSetType associated to the constraint.
Definition at line 133 of file Constraint.h.
Referenced by te::da::DataSourceCatalog::dropDependentFKs(), and te::da::DataSetType::remove().
      
  | 
  inlinevirtualinherited | 
It returns the constraint identifier.
Definition at line 103 of file Constraint.h.
      
  | 
  inlinevirtualinherited | 
It returns the constraint name.
Definition at line 119 of file Constraint.h.
Referenced by te::pgis::Transactor::addCheckConstraint(), te::qt::widgets::ConstraintsIndexesListWidget::addConstraint(), te::pgis::Transactor::addForeignKey(), te::pgis::Transactor::addPrimaryKey(), te::sqlite::DataSourceTransactor::addUniqueKey(), te::pgis::Transactor::addUniqueKey(), te::pgis::Transactor::createDataSet(), te::da::DataSetType::DataSetType(), te::da::DataSetTypeConverter::DataSetTypeConverter(), DSInfo::getCheckConstraintInfo(), te::pgis::Transactor::getConstraints(), DSInfo::getForeignKeyInfo(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::pgis::Transactor::getIndexes(), te::pgis::Transactor::getPrimaryKey(), DSInfo::getPrimaryKeyInfo(), te::pgis::Transactor::getUniqueKey(), DSInfo::getUniqueKeyInfo(), te::stmem::Transactor::primaryKeyExists(), te::qt::widgets::ConstraintsIndexesListWidget::removePrimaryKey(), and te::qt::widgets::ConstraintsIndexesListWidget::removeUniqueKey().
      
  | 
  inline | 
It returns the properties that form the unique key.
Definition at line 110 of file UniqueKey.h.
Referenced by te::sqlite::DataSourceTransactor::addUniqueKey(), te::ado::Transactor::addUniqueKey(), te::pgis::Transactor::addUniqueKey(), te::da::DataSetType::DataSetType(), te::da::GetOIDPropertyNames(), and Utils::getUKPropertiesNames().
      
  | 
  inlinevirtual | 
It returns the constraint type: UNIQUEKEY.
Implements te::da::Constraint.
Definition at line 164 of file UniqueKey.h.
References te::da::UNIQUE_KEY.
| bool te::da::UniqueKey::has | ( | const te::dt::Property * | p | ) | const | 
It verifies if Property is associated to the unique key.
| p | The Property to be verified. | 
Definition at line 68 of file UniqueKey.cpp.
| te::da::UniqueKey & te::da::UniqueKey::operator= | ( | const UniqueKey & | rhs | ) | 
Assignment operator.
The new object will not have an assigned DataSetType.
| rhs | Right-hand-side instance. | 
Definition at line 54 of file UniqueKey.cpp.
References m_index, m_properties, and te::da::Constraint::operator=().
| void te::da::UniqueKey::replace | ( | te::dt::Property * | p, | 
| te::dt::Property * | pp | ||
| ) | 
Definition at line 79 of file UniqueKey.cpp.
      
  | 
  inline | 
It sets the associated index.
| idx | A index associated to the unique key. | 
Definition at line 138 of file UniqueKey.h.
Referenced by te::pgis::Transactor::createDataSet(), te::da::DataSetType::DataSetType(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::pgis::Transactor::getIndexes(), and te::pgis::Transactor::getUniqueKey().
      
  | 
  inlinevirtualinherited | 
It sets the DataSetType associated to the constraint.
| dt | The DataSetType associated to this constraint. | 
Definition at line 143 of file Constraint.h.
Referenced by te::da::DataSetType::add(), te::da::DataSetType::DataSetType(), and te::da::DataSetType::setPrimaryKey().
      
  | 
  inlinevirtualinherited | 
It sets the constraint identifier.
| id | A number that identifies the constraint. | 
Definition at line 112 of file Constraint.h.
Referenced by te::pgis::Transactor::getCheckConstraint(), and te::pgis::Transactor::getConstraints().
      
  | 
  inlinevirtualinherited | 
It sets the constraint name.
| name | The constraint name. | 
Definition at line 126 of file Constraint.h.
Referenced by te::pgis::Transactor::addPrimaryKey(), te::sqlite::DataSourceTransactor::createDataSet(), te::qt::widgets::DirectExchangerDialog::exchangeToDatabase(), te::qt::widgets::PrimaryKeyConstraintWidget::getConstraint(), and te::qt::widgets::UniqueKeyConstraintWidget::getConstraint().
      
  | 
  inline | 
It sets the properties that form the unique key.
| properties | The properties that form the unique key. | 
Definition at line 117 of file UniqueKey.h.
Referenced by te::ado::Convert2Terralib().
      
  | 
  private | 
A pointer to an associated index.
Definition at line 177 of file UniqueKey.h.
Referenced by operator=().
      
  | 
  private | 
The properties that are part of the unique key constraint.
Definition at line 178 of file UniqueKey.h.
Referenced by operator=().