An atomic property like an integer or double.
More...
#include <SimpleProperty.h>
|
virtual Property * | clone () const |
| It returns a clone of the object. More...
|
|
const std::string & | getDatasetName () const |
| It returns the name of the propery's dataset. More...
|
|
std::string * | getDefaultValue () const |
| It returns the default value associated to the property, or NULL if none is associated. More...
|
|
unsigned int | getId () const |
| It returns the property identifier. More...
|
|
const std::string & | getName () const |
| It returns the property name. More...
|
|
Property * | getParent () const |
| It returns the parent of this property, or NULL, if it doesn't have one. More...
|
|
int | getType () const |
| It returns the property data type. More...
|
|
bool | has (Property *p) const |
| It checks if the Property "p" is associated to this property or any other parent. More...
|
|
bool | isAutoNumber () const |
| It returns true if the attribute is an autonumber, otherwise it returns false. More...
|
|
bool | isRequired () const |
| It returns true if the attribute is required, otherwise it returns false. More...
|
|
SimpleProperty & | operator= (const SimpleProperty &rhs) |
| Assignment operator. More...
|
|
void | setAutoNumber (bool a) |
| It tells if the property is an autonumber or not. More...
|
|
void | setDatasetName (const std::string &dsName) |
| It sets the property name. More...
|
|
void | setDefaultValue (std::string *d) |
| It sets the default value associated to the property, or NULL if none is associated. More...
|
|
void | setId (unsigned int id) |
| It sets the property identifier. More...
|
|
void | setName (const std::string &name) |
| It sets the property name. More...
|
|
void | setParent (Property *p) |
| It associate this property to the informed parent. More...
|
|
void | setRequired (bool r) |
| It tells if the property is required or not. More...
|
|
| SimpleProperty (const std::string &name, int datatype, bool isRequired=false, std::string *defaultValue=0, unsigned int id=0, Property *parent=0) |
| It constructs a new simple property. More...
|
|
| SimpleProperty (const SimpleProperty &rhs) |
| Copy constructor. More...
|
|
virtual | ~SimpleProperty () |
| Destructor. More...
|
|
te::dt::SimpleProperty::SimpleProperty |
( |
const std::string & |
name, |
|
|
int |
datatype, |
|
|
bool |
isRequired = false , |
|
|
std::string * |
defaultValue = 0 , |
|
|
unsigned int |
id = 0 , |
|
|
Property * |
parent = 0 |
|
) |
| |
It constructs a new simple property.
- Parameters
-
name | The simple property name. |
datatype | The property data type. |
isRequired | Tells if the the property is required (mandatory) or not. |
defaultValue | The default value to be used or NULL if none is informed. |
id | The property identifier. |
parent | A reference to the parent Property of the new object if it has one. |
- Postcondition
- The simple property will take the ownership of the default value.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
-
By default, a simple property is not an autonumber (or serial).
Copy constructor.
- Parameters
-
rhs | The right-hand-side copy used to copy from. |
virtual te::dt::SimpleProperty::~SimpleProperty |
( |
| ) |
|
|
virtual |
virtual Property* te::dt::SimpleProperty::clone |
( |
| ) |
const |
|
virtual |
const std::string& te::dt::Property::getDatasetName |
( |
| ) |
const |
|
inlineinherited |
It returns the name of the propery's dataset.
- Returns
- The the propery's dataset name.
Definition at line 144 of file Property.h.
std::string* te::dt::SimpleProperty::getDefaultValue |
( |
| ) |
const |
|
inline |
It returns the default value associated to the property, or NULL if none is associated.
- Returns
- The default value associated to the property, or NULL if none is associated.
- Note
- The caller of this method will not take the ownership of the given string.
Definition at line 127 of file SimpleProperty.h.
unsigned int te::dt::Property::getId |
( |
| ) |
const |
|
inlineinherited |
It returns the property identifier.
- Returns
- A number used to identify the property.
- Warning
- The identifier value may be used by data source implementations. So, don't rely on its value!
Definition at line 109 of file Property.h.
const std::string& te::dt::Property::getName |
( |
| ) |
const |
|
inlineinherited |
It returns the property name.
- Returns
- The property name.
- Note
- For DataSetTypes the name can have namespace prefix or schema name prefix, it will depend on the data source implementation.
Definition at line 127 of file Property.h.
Property* te::dt::Property::getParent |
( |
| ) |
const |
|
inlineinherited |
It returns the parent of this property, or NULL, if it doesn't have one.
- Returns
- The parent of this property, or NULL, if it doesn't have one.
Definition at line 168 of file Property.h.
int te::dt::Property::getType |
( |
| ) |
const |
|
inlineinherited |
bool te::dt::SimpleProperty::has |
( |
Property * |
p | ) |
const |
|
virtual |
bool te::dt::SimpleProperty::isAutoNumber |
( |
| ) |
const |
|
inline |
It returns true if the attribute is an autonumber, otherwise it returns false.
- Returns
- True if the attribute is an autonumber, otherwise it returns false.
Definition at line 111 of file SimpleProperty.h.
bool te::dt::SimpleProperty::isRequired |
( |
| ) |
const |
|
inline |
It returns true if the attribute is required, otherwise it returns false.
- Returns
- True if the attribute is required, otherwise it returns false.
Definition at line 97 of file SimpleProperty.h.
Assignment operator.
- Parameters
-
rhs | The right-hand-side copy used to copy from. |
- Returns
- A reference to this object.
void te::dt::SimpleProperty::setAutoNumber |
( |
bool |
a | ) |
|
|
inline |
void te::dt::Property::setDatasetName |
( |
const std::string & |
dsName | ) |
|
|
inlineinherited |
It sets the property name.
- Parameters
-
name | The new property name. |
- Warning
- Take care when calling this method for a DataSetType associated to a DataSourceCatalog. Prefer using the rename method on the DataSourceCatalog API instead of using this method.
Definition at line 154 of file Property.h.
void te::dt::SimpleProperty::setDefaultValue |
( |
std::string * |
d | ) |
|
It sets the default value associated to the property, or NULL if none is associated.
- Parameters
-
d | The default value associated to the property, or NULL if none is associated. |
- Note
- The SimpleProperty qill take the ownership of the given string.
void te::dt::Property::setId |
( |
unsigned int |
id | ) |
|
|
inlineinherited |
It sets the property identifier.
- Parameters
-
id | A number used to identify the property. |
- Warning
- The identifier value may be used by data source implementations. So, don't rely on its value!
Definition at line 118 of file Property.h.
void te::dt::Property::setName |
( |
const std::string & |
name | ) |
|
|
inlineinherited |
It sets the property name.
- Parameters
-
name | The new property name. |
- Warning
- Take care when calling this method for a DataSetType associated to a DataSourceCatalog. Prefer using the rename method on the DataSourceCatalog API instead of using this method.
Definition at line 137 of file Property.h.
void te::dt::Property::setParent |
( |
Property * |
p | ) |
|
|
inlineinherited |
It associate this property to the informed parent.
- Parameters
-
- Warning
- Don't use this method without knowing the internal details of its use.
Definition at line 177 of file Property.h.
void te::dt::SimpleProperty::setRequired |
( |
bool |
r | ) |
|
|
inline |
It tells if the property is required or not.
- Parameters
-
r | If true the property is marked as required, otherwise it is not required. |
Definition at line 104 of file SimpleProperty.h.
std::string te::dt::Property::m_datasetName |
|
protectedinherited |
The property's dataset name.
Definition at line 208 of file Property.h.
std::string* te::dt::SimpleProperty::m_defaultValue |
|
protected |
unsigned int te::dt::Property::m_id |
|
protectedinherited |
An identification number that can be used internally.
Definition at line 205 of file Property.h.
bool te::dt::SimpleProperty::m_isAutoNumber |
|
protected |
A flag that indicates if this is an autonumber or serial type.
Definition at line 163 of file SimpleProperty.h.
bool te::dt::SimpleProperty::m_isRequired |
|
protected |
std::string te::dt::Property::m_name |
|
protectedinherited |
int te::dt::Property::m_type |
|
protectedinherited |
The property data type.
Definition at line 206 of file Property.h.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/datatype/SimpleProperty.h