27 #include "../../datatype/Property.h"
50 m_onDelete(rhs.m_onDelete),
51 m_onUpdate(rhs.m_onUpdate),
53 m_properties(rhs.m_properties),
54 m_refProperties(rhs.m_refProperties)
80 size_t size = m_properties.size();
82 for(
size_t i = 0; i < size; ++i)
83 if(m_properties[i] == p)
91 size_t size = m_refProperties.size();
93 for(
size_t i = 0; i < size; ++i)
94 if(m_refProperties[i] == p)
103 std::size_t size = m_properties.size();
105 for(std::size_t i = 0; i < size; ++i)
106 if(m_properties[i] == p)
108 m_properties[i] = pp;
114 std::size_t size = m_refProperties.size();
116 for(std::size_t i = 0; i < size; ++i)
117 if(m_refProperties[i] == p)
119 m_properties[i] = pp;
std::vector< te::dt::Property * > m_properties
The properties that are 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...
ForeignKey & operator=(const ForeignKey &rhs)
Assignment operator.
void replace(te::dt::Property *p, te::dt::Property *pp)
It changes a reference to property p to pp.
bool has(te::dt::Property *p)
It verifies if Property takes part of the foreign key.
ForeignKey(unsigned int id=0)
Constructor.
Constraint & operator=(const Constraint &rhs)
Assignment operator not allowed.
DataSetType * m_refDt
The referenced DataSetType of this foreign key constraint.
It models a property definition.
FKActionType m_onUpdate
The action to be performed when a referenced element value in the referenced DataSetType is being upd...
bool isReferenced(te::dt::Property *p)
It verifies if Property is referenced by the foreign key.
It models a foreign key constraint for a DataSetType.
It models a foreign key constraint for a DataSetType.
A class that models the description of a dataset.
std::vector< te::dt::Property * > m_refProperties
The referenced properties (on the referenced DataSetType) of this foreign key constraint.
Constraint * clone()
It returns a clone of the object.