59 CPPUNIT_ASSERT(dt.
getName() ==
"dataset_type");
60 CPPUNIT_ASSERT(dt.
getId() == 666);
62 CPPUNIT_ASSERT(dt.
size() == 6);
71 CPPUNIT_ASSERT(dt.
has(&intt) ==
false);
93 idx->
setName(
"uk_dataset_type");
100 cc->
setName(
"cc_dataset_type");
104 fk->
setName(
"fk1_dataset_type");
110 CPPUNIT_ASSERT(dt.
getName() ==
"dataset_type");
111 CPPUNIT_ASSERT(dt.
getId() == 666);
113 CPPUNIT_ASSERT(dt.
size() == 6);
147 CPPUNIT_ASSERT(dt.
has(&intt) ==
false);
150 CPPUNIT_ASSERT(dt.
getIndex(0)->
has(&intt) ==
false);
180 pk->
setName(
"pk_dataset_type");
184 uk->
setName(
"uk_dataset_type");
189 uk_idx->
setName(
"uk_dataset_type");
196 pk_idx->
setName(
"pk_dataset_type");
203 idx->
setName(
"pk_dataset_type");
207 cc->
setName(
"cc_dataset_type");
211 fk->
setName(
"fk1_dataset_type");
217 CPPUNIT_ASSERT(dt.
getName() ==
"dataset_type");
218 CPPUNIT_ASSERT(dt.
getId() == 666);
220 CPPUNIT_ASSERT(dt.
size() == 6);
260 CPPUNIT_ASSERT(dt.
has(&intt) ==
false);
263 CPPUNIT_ASSERT(dt.
getIndex(0)->
has(&intt) ==
false);
266 CPPUNIT_ASSERT_NO_THROW(dt.
remove(pk_idx));
270 CPPUNIT_ASSERT_NO_THROW(dt.
remove(uk_idx));
274 CPPUNIT_ASSERT_NO_THROW(dt.
remove(fk));
virtual void setName(const std::string &name)
It sets the constraint name.
This file contains include headers for the Data Type module of TerraLib.
Property * getProperty(std::size_t i) const
It returns the i-th property.
void add(te::dt::Property *p)
It adds the property to the list of properties that participates in the unique key.
bool has(te::dt::Property *p)
It verifies if Property is associated to the index.
bool has(Property *p) const
It checks if the Property "p" is associated to this property or any other parent. ...
CPPUNIT_TEST_SUITE_REGISTRATION(TsDataSetType)
void add(te::dt::Property *p)
It adds a property to the list of properties of the primary key.
Index * getAssociatedIndex() const
It returns the associated index if one exists.
bool has(te::dt::Property *p)
It verifies if Property takes part of the foreign key.
An atomic property like an integer or double.
A class that models the description of a dataset.
std::size_t getNumberOfUniqueKeys() const
It returns the number of unique keys defined for the dataset type.
CheckConstraint * getCheckConstraint(std::size_t i) const
It returns the i-th check-constraint associated to the dataset type.
bool has(const te::dt::Property *p) const
It verifies if Property is associated to the unique key.
PrimaryKey * getPrimaryKey() const
It returns the primary key associated to the dataset type.
bool has(const te::dt::Property *p) const
It verifies if Property is associated to the primary key.
Test suite for the DataSetType class.
void add(te::dt::Property *p)
It adds the property to the list of properties of the index.
A class that describes a check constraint.
DataSetType * getDataSetType() const
It returns the DataSetType associated to the index.
Index * getIndex(std::size_t i) const
It returns the i-th index associated to the dataset type.
Test suite for the DataSetType class.
The type for arbitrary precison numbers, like numeric(p, q).
void remove(Constraint *c)
It removes the constraint.
std::size_t getNumberOfForeignKeys() const
It returns the number of foreign keys defined for the dataset type.
const std::string & getExpression() const
It returns the check constraint expression.
void add(te::dt::Property *p)
It adds a property to the foreign key constraint.
static te::dt::TimeDuration dt(20, 30, 50, 11)
Index * getAssociatedIndex() const
It returns the associated index if one exists.
std::size_t getNumberOfIndexes() const
It returns the number of indexes defined for the dataset type.
DataSetType * getReferencedDataSetType() const
It returns the referenced DataSetType of this foreign key constraint.
It models a foreign key constraint for a DataSetType.
The type for string types: FIXED_STRING, VAR_STRING or STRING.
It describes a unique key (uk) constraint.
void setAssociatedIndex(Index *idx)
It sets the associated index.
Property * getParent() const
It returns the parent of this property, or NULL, if it doesn't have one.
std::size_t size() const
It returns the number of properties of the CompositeProperty.
int getType() const
It returns the property data type.
void add(Constraint *c)
It adds a new constraint.
void setAssociatedIndex(Index *idx)
It sets the associated index.
ForeignKey * getForeignKey(std::size_t i) const
It returns the i-th foreign key associated to the dataset type.
std::size_t getNumberOfCheckConstraints() const
It returns the number of check-constraints defined over the dataset type.
It describes a primary key (pk) constraint.
void setExpression(const std::string &e)
It sets the check constraint expression.
The type for date and time types: date, date period, date duration, time duration, time instant, time period, time instant with time zone or time period with time zone.
virtual DataSetType * getDataSetType() const
It returns the DataSetType associated to the constraint.
void setName(const std::string &name)
It sets the index name.
This file contains include headers for the Vector Geometry model of TerraLib.
virtual const std::string & getName() const
It returns the constraint name.
This file contains include headers for the Data Access module of TerraLib.
void tcCreateDataSetTypeAndChecks()
Test Case: creating a DataSetType and checking all methods.
It describes an index associated to a DataSetType.
unsigned int getId() const
It returns the property identifier.
UniqueKey * getUniqueKey(std::size_t i) const
It returns the i-th unique key.
const std::string & getName() const
It returns the property name.