26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_FOREIGNKEY_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_FOREIGNKEY_H
31 #include "../../datatype/Property.h"
71 ForeignKey(
const std::string& name,
unsigned int id = 0);
101 const std::vector<te::dt::Property*>&
getProperties()
const {
return m_properties; }
177 bool has(
const std::string& propertyName);
A class that describes a constraint.
A class that models the description of a dataset.
It models a foreign key constraint for a DataSetType.
std::vector< te::dt::Property * > m_refProperties
The referenced properties (on the referenced DataSetType) of this foreign key constraint.
DataSetType * getReferencedDataSetType() const
It returns the referenced DataSetType of this foreign key constraint.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the foreign key constraint.
FKActionType m_onDelete
The action to be performed when a referenced element value in the referenced DataSetType is being del...
void replace(const std::string &propName, const te::dt::Property *pp)
It changes a reference to property p to pp.
void setReferencedDataSetType(DataSetType *refDt)
It sets the referenced DataSetType of this foreign key constraint.
ForeignKey(const ForeignKey &rhs)
Copy constructor not allowed.
ForeignKey(unsigned int id=0)
Constructor.
void setOnUpdateAction(FKActionType a)
It sets the action to be performed when a referenced element value in the referenced DataSetType is b...
FKActionType m_onUpdate
The action to be performed when a referenced element value in the referenced DataSetType is being upd...
ForeignKey(const std::string &name, unsigned int id=0)
Constructor.
bool has(const std::string &propertyName)
It verifies if Property takes part of the foreign key.
void add(const te::dt::Property *p)
It adds a property to the foreign key constraint.
DataSetType * m_refDt
The referenced DataSetType of this foreign key constraint.
FKActionType getOnDeleteAction() const
It returns the action performed when a referenced element value in the referenced DataSetType is bein...
void setOnDeleteAction(FKActionType a)
It sets the action to be performed when a referenced element value in the referenced DataSetType is b...
const std::vector< te::dt::Property * > & getReferencedProperties() const
It returns the referenced properties (on the referenced DataSetType) of this foreign key constraint.
ConstraintType getType() const
It returns the constraint type: FOREIGNKEY.
ForeignKey & operator=(const ForeignKey &rhs)
Assignment operator.
FKActionType getOnUpdateAction() const
It returns the action performed when a referenced element value in the referenced DataSetType is bein...
std::vector< te::dt::Property * > m_properties
The properties that are part of the foreign key constraint.
bool isReferenced(const std::string &propertyName)
It verifies if Property is referenced by the foreign key.
Constraint * clone()
It returns a clone of the object.
void addRefProperty(const te::dt::Property *p)
It adds a reference property (on the referenced DataSetType) of this foreign key constraint.
It models a property definition.
virtual Property * clone() const =0
It returns a clone of the object.
ConstraintType
A ConstraintType can have one of the following types:
FKActionType
Type of action performed on the foreign key data.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.