#include <Constraint.h>
Public Member Functions | |
virtual Constraint * | clone ()=0 |
It returns a clone of the object. More... | |
Constraint (unsigned int id=0) | |
Constructor. More... | |
Constraint (const std::string &name, unsigned int id=0) | |
Constructor. More... | |
Constraint (const Constraint &rhs) | |
Copy constructor not allowed. 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... | |
virtual ConstraintType | getType () const =0 |
It returns the constraint type. More... | |
Constraint & | operator= (const Constraint &rhs) |
Assignment operator not allowed. 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... | |
virtual | ~Constraint () |
Virtual destructor. More... | |
Private Attributes | |
DataSetType * | m_dt |
The associated DataSetType. More... | |
unsigned int | m_id |
An identification number for the constraint. More... | |
std::string | m_name |
The constraint name. More... | |
Definition at line 50 of file Constraint.h.
te::da::Constraint::Constraint | ( | unsigned int | id = 0 | ) |
Constructor.
id | The constraint identifier. |
Definition at line 31 of file Constraint.cpp.
te::da::Constraint::Constraint | ( | const std::string & | name, |
unsigned int | id = 0 |
||
) |
Constructor.
name | The constraint name. |
id | The constraint identifier. |
Definition at line 38 of file Constraint.cpp.
te::da::Constraint::Constraint | ( | const Constraint & | rhs | ) |
Copy constructor not allowed.
The new object will not have an associated DataSetType.
rhs | Right-hand-side instance. |
Definition at line 45 of file Constraint.cpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 85 of file Constraint.h.
|
pure virtual |
It returns a clone of the object.
The new object will not have an associated DataSetType.
Implemented in te::da::ForeignKey, te::da::UniqueKey, te::da::PrimaryKey, and te::da::CheckConstraint.
|
inlinevirtual |
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().
|
inlinevirtual |
It returns the constraint identifier.
Definition at line 103 of file Constraint.h.
|
inlinevirtual |
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(), te::attributefill::RasterToVector::getDataSetType(), DSInfo::getForeignKeyInfo(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::pgis::Transactor::getIndexes(), te::pgis::Transactor::getPrimaryKey(), DSInfo::getPrimaryKeyInfo(), te::qt::widgets::TableLinkDialog::getProperties(), te::pgis::Transactor::getUniqueKey(), DSInfo::getUniqueKeyInfo(), te::qt::widgets::ConstraintsIndexesListWidget::onEditToolButtonClicked(), te::stmem::Transactor::primaryKeyExists(), te::qt::widgets::ConstraintsIndexesListWidget::removePrimaryKey(), te::qt::widgets::ConstraintsIndexesListWidget::removeUniqueKey(), te::qt::widgets::PrimaryKeyConstraintWidget::setConstraint(), and te::qt::widgets::UniqueKeyConstraintWidget::setConstraint().
|
pure virtual |
It returns the constraint type.
Implemented in te::da::ForeignKey, te::da::UniqueKey, te::da::PrimaryKey, and te::da::CheckConstraint.
Referenced by te::da::DataSetType::add(), te::qt::widgets::ConstraintsIndexesListWidget::addConstraint(), and te::da::DataSetType::remove().
te::da::Constraint & te::da::Constraint::operator= | ( | const Constraint & | rhs | ) |
Assignment operator not allowed.
rhs | Right-hand-side instance. |
Definition at line 52 of file Constraint.cpp.
Referenced by te::da::ForeignKey::operator=(), te::da::CheckConstraint::operator=(), te::da::PrimaryKey::operator=(), and te::da::UniqueKey::operator=().
|
inlinevirtual |
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().
|
inlinevirtual |
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().
|
inlinevirtual |
It sets the constraint name.
name | The constraint name. |
Definition at line 126 of file Constraint.h.
Referenced by te::pgis::Transactor::addPrimaryKey(), te::qt::widgets::DataSetOptionsWizardPage::applyChanges(), te::qt::plugins::terralib4::TL4ConverterWizard::commit(), te::sqlite::DataSourceTransactor::createDataSet(), te::qt::widgets::DirectExchangerDialog::exchangeToDatabase(), te::qt::widgets::UniqueKeyConstraintWidget::getConstraint(), te::qt::widgets::PrimaryKeyConstraintWidget::getConstraint(), te::attributefill::RasterToVector::getDataSetType(), and te::qt::widgets::DataSetOptionsWizardPage::set().
|
private |
The associated DataSetType.
Definition at line 166 of file Constraint.h.
|
private |
An identification number for the constraint.
Definition at line 165 of file Constraint.h.
Referenced by operator=().
|
private |