It describes a primary key (pk) constraint. More...
#include <PrimaryKey.h>
Public Member Functions | |
void | add (te::dt::Property *p) |
It adds a property to the list of properties of the primary 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 take part of the primary key. More... | |
ConstraintType | getType () const |
It returns the constraint type: PRIMARYKEY. More... | |
bool | has (const te::dt::Property *p) const |
It verifies if Property is associated to the primary key. More... | |
PrimaryKey & | operator= (const PrimaryKey &rhs) |
Assignment operator. More... | |
PrimaryKey (DataSetType *dt=0, unsigned int id=0) | |
Constructor. More... | |
PrimaryKey (const std::string &name, DataSetType *dt=0, unsigned int id=0) | |
Constructor. More... | |
PrimaryKey (const PrimaryKey &rhs) | |
Copy constructor. More... | |
void | replace (te::dt::Property *p, te::dt::Property *pp) |
It changes a reference to property p to pp. More... | |
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 primary key. More... | |
~PrimaryKey () | |
Destructor. More... | |
Private Attributes | |
Index * | m_index |
A pointer to an associated index. More... | |
std::vector< te::dt::Property * > | m_properties |
The properties that take part of primary key constraint. More... | |
It describes a primary key (pk) constraint.
Definition at line 52 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. |
Definition at line 31 of file PrimaryKey.cpp.
References te::da::DataSetType::add().
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. |
Definition at line 39 of file PrimaryKey.cpp.
References te::da::DataSetType::add().
te::da::PrimaryKey::PrimaryKey | ( | const PrimaryKey & | rhs | ) |
Copy constructor.
The new object will not have an assigned DataSetType.
rhs | Right-hand-side instance. |
Definition at line 47 of file PrimaryKey.cpp.
|
inline |
Destructor.
Definition at line 91 of file PrimaryKey.h.
|
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 123 of file PrimaryKey.h.
Referenced by te::vp::LineToPolygonOp::buildOutDataSetType(), te::vp::PolygonToLineOp::buildOutDataSetType(), te::sa::SamplePointsGeneratorRandom::createDataSetType(), te::qt::widgets::VectorizationWizard::createDataSetType(), te::vp::IntersectionMemory::createDataSetType(), te::sa::SamplePointsGeneratorStratified::createDataSetType(), te::sa::GeneralizedProximityMatrix::createDataSetType(), te::graph::DataSourceGraphMetadata::createGraphAttributesTable(), te::graph::DataSourceGraphMetadata::createGraphMetadataTable(), te::graph::DataSourceGraphMetadata::createGraphTableEdgeModel(), te::graph::DataSourceGraphMetadata::createVertexAttrTable(), DataSetAdapterLayerReader(), te::da::DataSetType::DataSetType(), te::qt::widgets::DirectExchangerDialog::exchangeToDatabase(), te::qt::widgets::PrimaryKeyConstraintWidget::getConstraint(), te::pgis::Transactor::getConstraints(), te::qt::widgets::DatapPropertiesWidget::getConverter(), te::vp::BufferOp::GetDataSetType(), te::vp::GeometricOp::GetDataSetType(), te::ogr::Transactor::getDataSetType(), te::cl::ROISet::getDataSetType(), te::wfs::Transactor::getDataSetType(), te::pgis::Transactor::getPrimaryKey(), te::ado::Transactor::getPrimaryKey(), te::map::QueryLayer::getSchema(), te::vp::IntersectionQuery::run(), te::vp::AggregationQuery::run(), te::attributefill::VectorToVectorOp::save(), te::addressgeocoding::AddressGeocodingOp::save(), and te::attributefill::RasterToVector::save().
|
virtual |
It returns a clone of the object.
The new object will not have an associated DataSetType.
Implements te::da::Constraint.
Definition at line 89 of file PrimaryKey.cpp.
Referenced by te::stmem::Transactor::getPrimaryKey().
|
inline |
It returns the associated index if one exists.
Definition at line 137 of file PrimaryKey.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(), 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().
|
inline |
It returns the properties that take part of the primary key.
Definition at line 109 of file PrimaryKey.h.
Referenced by te::ado::Transactor::addPrimaryKey(), te::pgis::Transactor::addPrimaryKey(), te::sa::KernelMapOperation::buildTree(), te::sa::KernelRatioOperation::buildTree(), te::sqlite::Convert2SQLCreate(), te::sqlite::DataSourceTransactor::createDataSet(), DataSetAdapterLayerReader(), te::da::DataSetType::DataSetType(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::qt::widgets::ChartLayerWidget::getMaxValue(), te::da::GetOIDDatasetProps(), te::da::GetOIDPropertyNames(), te::attributefill::VectorToVectorMemory::getOutputDataSetType(), Utils::getPKPropertiesNames(), te::map::QueryLayer::getSchema(), te::da::HasLinkedTable(), te::qt::widgets::DatapPropertiesWidget::onInputDataToolButtonTriggered(), and te::qt::widgets::PrimaryKeyConstraintWidget::setConstraint().
|
inlinevirtual |
It returns the constraint type: PRIMARYKEY.
Implements te::da::Constraint.
Definition at line 163 of file PrimaryKey.h.
References te::da::PRIMARY_KEY.
bool te::da::PrimaryKey::has | ( | const te::dt::Property * | p | ) | const |
It verifies if Property is associated to the primary key.
p | The Property to be verified. |
Definition at line 66 of file PrimaryKey.cpp.
Referenced by te::sqlite::Convert2SQLCreate(), and te::qt::widgets::TableLinkDialog::getProperties().
te::da::PrimaryKey & te::da::PrimaryKey::operator= | ( | const PrimaryKey & | rhs | ) |
Assignment operator.
The new object will not have an assigned DataSetType.
rhs | Right-hand-side instance. |
Definition at line 54 of file PrimaryKey.cpp.
References m_index, m_properties, and te::da::Constraint::operator=().
void te::da::PrimaryKey::replace | ( | te::dt::Property * | p, |
te::dt::Property * | pp | ||
) |
It changes a reference to property p to pp.
p | A property that takes part of the primary key. |
pp | The property that will take p place. |
Definition at line 77 of file PrimaryKey.cpp.
|
inline |
It sets the associated index.
idx | If the primary key is associated to an index, this method will associate them. |
Definition at line 130 of file PrimaryKey.h.
Referenced by te::pgis::Transactor::createDataSet(), te::da::DataSetType::DataSetType(), te::pgis::Transactor::getConstraints(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::pgis::Transactor::getIndexes(), and te::pgis::Transactor::getPrimaryKey().
|
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::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().
|
inline |
It sets the properties that form the primary key.
properties | The properties that form the primary key. |
Definition at line 116 of file PrimaryKey.h.
Referenced by te::ado::Convert2Terralib(), te::cellspace::CellularSpacesOperations::createCellularDataSetType(), te::da::DataSetTypeConverter::DataSetTypeConverter(), and terralib4::Transactor::getDataSetType().
|
private |
A pointer to an associated index.
Definition at line 176 of file PrimaryKey.h.
Referenced by operator=().
|
private |
The properties that take part of primary key constraint.
Definition at line 177 of file PrimaryKey.h.
Referenced by operator=().