All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
te::dt::DateTimeProperty Class Reference

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. More...

#include <DateTimeProperty.h>

Inheritance diagram for te::dt::DateTimeProperty:
te::dt::SimpleProperty te::dt::Property

Public Member Functions

Propertyclone () const
 It returns a clone of the object. More...
 
 DateTimeProperty (const std::string &name, DateTimeType dateType=DATE, DateTimeResolution dtResolution=UNKNOWN, bool isRequired=false, std::string *defaultValue=0, unsigned int id=0, Property *parent=0)
 It constructs a new date and time property. More...
 
 DateTimeProperty (const DateTimeProperty &rhs)
 Copy constructor. 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...
 
PropertygetParent () const
 It returns the parent of this property, or NULL, if it doesn't have one. More...
 
DateTimeResolution getResolution () const
 It returns the date time resolution. More...
 
DateTimeType getSubType () const
 It returns the date time property sub type. 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...
 
DateTimePropertyoperator= (const DateTimeProperty &rhs)
 Assignment operator. More...
 
void setAutoNumber (bool a)
 It tells if the property is an autonumber or not. 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...
 
void setResolution (DateTimeResolution r)
 It sets the date time resolution. More...
 
void setSubtype (DateTimeType t)
 It sets the date time property sub type. More...
 
 ~DateTimeProperty ()
 Destructor. More...
 

Protected Attributes

std::string * m_defaultValue
 Default value. More...
 
DateTimeType m_dSubType
 The sub-type of this date time property. More...
 
DateTimeResolution m_dtResolution
 The date and time resolution. More...
 
unsigned int m_id
 An identification number that can be used internally. More...
 
bool m_isAutoNumber
 A flag that indicates if this is an autonumber or serial type. More...
 
bool m_isRequired
 This flag indicates if the attribute is required or not. More...
 
std::string m_name
 The property name. More...
 
Propertym_parent
 The parent property type: it must be a CompositeProperty. More...
 
int m_type
 The property data type. More...
 

Detailed Description

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.

See Also
SimpleProperty, Property, NumericProperty, ArrayProperty, StringProperty, CompositeProperty

Definition at line 46 of file DateTimeProperty.h.

Constructor & Destructor Documentation

te::dt::DateTimeProperty::DateTimeProperty ( const std::string &  name,
DateTimeType  dateType = DATE,
DateTimeResolution  dtResolution = UNKNOWN,
bool  isRequired = false,
std::string *  defaultValue = 0,
unsigned int  id = 0,
Property parent = 0 
)

It constructs a new date and time property.

Parameters
nameThe attribute name.
dateTypeThe date and time subtype. Must be one of: TIME_STAMP, TIME_STAMP_TZ, DATE, DATETIME, TIME or TIME_TZ.
isRequiredIt indicates if the the property is required (mandatory) or not.
defaultValueThe default value to be used, if none is informed.
idThe property identifier.
parentA reference to the parent Property of the new object if it has one.
Postcondition
The date time property will take the ownership of the defaultValue.
Warning
The identifier value (id) may be used by data source implementations. So, don't rely on its value!

Definition at line 29 of file DateTimeProperty.cpp.

te::dt::DateTimeProperty::DateTimeProperty ( const DateTimeProperty rhs)

Copy constructor.

Parameters
rhsThe right-hand-side copy used to copy from.

Definition at line 42 of file DateTimeProperty.cpp.

te::dt::DateTimeProperty::~DateTimeProperty ( )
inline

Destructor.

Definition at line 80 of file DateTimeProperty.h.

Member Function Documentation

te::dt::Property * te::dt::DateTimeProperty::clone ( ) const
virtual

It returns a clone of the object.

The new property will NOT have associations to other properties.

Returns
A clone of the object.

Reimplemented from te::dt::SimpleProperty.

Definition at line 62 of file DateTimeProperty.cpp.

std::string* te::dt::SimpleProperty::getDefaultValue ( ) const
inlineinherited

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.

Referenced by te::qt::widgets::UpdateProperty::propertiesComboBoxActivated(), te::qt::widgets::UpdateProperty::setArrayPropertyData(), te::pgis::SetColumnDef(), te::qt::widgets::UpdateProperty::setDateTimePropertyData(), te::qt::widgets::UpdateProperty::setGeometryPropertyData(), te::qt::widgets::UpdateProperty::setNumericPropertyData(), te::qt::widgets::UpdateProperty::setRasterPropertyData(), and te::qt::widgets::UpdateProperty::setStringPropertyData().

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 108 of file Property.h.

Referenced by te::da::DataSetTypeConverter::DataSetTypeConverter(), te::pgis::Transactor::getConstraints(), te::pgis::Transactor::getIndexes(), te::pgis::Transactor::getPropertyId(), and te::serialize::xml::Save().

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 126 of file Property.h.

Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::DatabaseGraphMetadata::addEdgeProperty(), te::ado::Transactor::addForeignKey(), te::pgis::Transactor::addForeignKey(), te::ado::Transactor::addPrimaryKey(), te::mem::DataSource::addProperty(), te::sqlite::DataSourceTransactor::addProperty(), terralib4::Transactor::addProperty(), te::ado::Transactor::addProperty(), te::pgis::Transactor::addProperty(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::da::DataSourceCatalog::addRef(), te::pgis::Transactor::addSequence(), te::ado::Transactor::addUniqueKey(), te::graph::DatabaseGraphMetadata::addVertexProperty(), AggregationMemory(), AggregationQuery(), BufferQuery(), te::da::DataSourceCatalog::checkFKsDependency(), te::da::DataSourceCatalog::checkSequenceDependency(), te::qt::widgets::DataExchangerWizard::commit(), te::qt::widgets::ConstraintWidget::ConstraintWidget(), te::ogr::Convert2OGR(), te::sqlite::Convert2SQLCreate(), te::da::Create(), te::da::CreateAdapter(), te::mem::DataSource::createDataSet(), te::gdal::Transactor::createDataSet(), te::ogr::Transactor::createDataSet(), te::sqlite::DataSourceTransactor::createDataSet(), te::ado::Transactor::createDataSet(), te::pgis::Transactor::createDataSet(), CreateDataSetType(), DataSetAdapterLayerReader(), DataSetAdapterLayerWriter(), te::qt::widgets::DataSetOptionsWizardPage::datasetPressed(), te::da::DataSetType::DataSetType(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::qt::widgets::DataSetDisplay::draw(), te::map::AbstractLayerRenderer::draw(), te::map::DrawGeometries(), te::map::DrawRaster(), te::da::DataSourceCatalog::dropDependentSequenceEntry(), te::da::DataSourceCatalog::dropDependentSequences(), te::ado::Transactor::dropProperty(), te::qt::widgets::DirectExchangerDialog::exchangeToDatabase(), te::qt::widgets::Selection::executeSelection(), te::qt::widgets::DataSetAdapterWidget::fillDataSetTable(), te::ado::Transactor::getCheckConstraints(), te::pgis::Transactor::getConstraints(), terralib4::Transactor::getDataSetType(), te::da::GetEmptyOIDSet(), te::sqlite::DataSourceCatalogLoader::getGeometryInfo(), te::pgis::Transactor::getGeometryInfo(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::sqlite::DataSourceCatalogLoader::getIndexes(), te::ado::Transactor::getIndexes(), te::pgis::Transactor::getIndexes(), te::qt::widgets::Info::getInfo(), te::sqlite::DataSourceCatalogLoader::getPrimaryKey(), te::ado::Transactor::getPrimaryKey(), te::ado::Transactor::getProperties(), te::pgis::Transactor::getPropertyId(), te::da::GetPropertyInfo(), te::stmem::Transactor::getPropertyNames(), te::da::GetPropertyPos(), te::pgis::Transactor::getRasterInfo(), te::sqlite::DataSourceCatalogLoader::getSpatialIndexes(), te::da::GetSQLValueNames(), te::sqlite::DataSourceCatalogLoader::getUniqueKey(), te::sqlite::DataSourceCatalogLoader::getUniqueKeys(), te::ado::Transactor::getUniqueKeys(), te::da::DataSourceCatalog::indexFKs(), te::da::DataSourceCatalog::indexSequenceDependency(), te::qt::widgets::IndexWidget::IndexWidget(), te::ado::Transactor::insertIntoGeometryColumns(), te::qt::widgets::ChartLayerWidget::listAttributes(), te::qt::widgets::GroupingWidget::listAttributes(), te::da::LoadFull(), te::da::LoadProperties(), te::qt::widgets::DatapPropertiesWidget::onInputDataToolButtonTriggered(), te::qt::widgets::SHP2PostGISDialog::onOkPushButtonClicked(), te::qt::widgets::DataPropertiesDialog::onOkPushButtonClicked(), te::qt::widgets::DataSet2Layer::operator()(), te::da::DataSourceCatalog::remove(), te::graph::DatabaseGraphMetadata::removeEdgeProperty(), te::da::DataSourceCatalog::removeRef(), te::graph::DatabaseGraphMetadata::removeVertexProperty(), te::da::DataSourceCatalog::rename(), te::serialize::xml::Save(), and te::qt::widgets::PropertyConverterDialog::set().

DateTimeResolution te::dt::DateTimeProperty::getResolution ( ) const
inline

It returns the date time resolution.

Returns
The date and time resolution.

Definition at line 110 of file DateTimeProperty.h.

DateTimeType te::dt::DateTimeProperty::getSubType ( ) const
inline

It returns the date time property sub type.

Returns
The string property sub type.

Definition at line 96 of file DateTimeProperty.h.

Referenced by te::ogr::Convert2OGR(), te::pgis::SetColumnDef(), and te::qt::widgets::UpdateProperty::setDateTimePropertyData().

int te::dt::Property::getType ( ) const
inlineinherited

It returns the property data type.

Returns
The property data type.

Definition at line 143 of file Property.h.

Referenced by te::ado::Transactor::addForeignKey(), te::ado::Transactor::addPrimaryKey(), te::mem::DataSource::addProperty(), te::ogr::Transactor::addProperty(), te::sqlite::DataSourceTransactor::addProperty(), terralib4::Transactor::addProperty(), te::ado::Transactor::addProperty(), te::pgis::Transactor::addProperty(), te::ado::Transactor::addUniqueKey(), te::qt::widgets::UpdateProperty::arrayElementDataTypeComboBoxChanged(), te::graph::LayerRenderer::checkEdgeGeometryProperty(), te::da::DataSourceCatalog::checkSequenceDependency(), te::graph::LayerRenderer::checkVertexGeometryProperty(), te::ogr::Convert2OGR(), te::da::CreateAdapter(), te::sqlite::DataSourceTransactor::createDataSet(), te::graph::DatabaseGraphMetadata::createGraphTableEdgeModel(), te::graph::DatabaseGraphMetadata::createVertexAttrTable(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::da::DataSourceCatalog::dropDependentSequenceEntry(), te::da::DataSourceCatalog::dropDependentSequences(), te::ado::Transactor::dropProperty(), te::qt::widgets::DataSetAdapterWidget::fillDataSetTable(), te::dt::CompositeProperty::findFirstPropertyOfType(), te::sqlite::DataSourceCatalogLoader::getDataSetType(), te::da::GetEmptyOIDSet(), te::qt::widgets::WhereClauseWidget::getExpression(), te::da::GetFirstSpatialProperty(), te::pgis::Transactor::getProperties(), te::pgis::Transactor::getProperty(), te::pgis::Transactor::getPropertyId(), te::da::GetPropertyInfo(), te::sqlite::DataSourceCatalogLoader::getSpatialIndexes(), te::sqlite::GetSQLType(), te::pgis::GetSQLValue(), GetTabularProperties(), te::da::DataSourceCatalog::indexSequenceDependency(), te::qt::widgets::ChartLayerWidget::listAttributes(), te::qt::widgets::GroupingWidget::listAttributes(), te::da::DataSetTypeConverter::needConverter(), te::graph::DatabaseGraphMetadata::saveProperty(), te::qt::widgets::UpdateProperty::setArrayPropertyData(), and te::pgis::SetColumnDef().

bool te::dt::SimpleProperty::has ( Property p) const
virtualinherited

It checks if the Property "p" is associated to this property or any other parent.

This method can be used to ask if a given Property belongs to a more complex type (like: CompositeProperty or DataSetType).

Parameters
pThe Property we are checking.
Returns
True if the given Property "p" is associated to to this Property, otherwise, returns false.

Implements te::dt::Property.

Definition at line 80 of file SimpleProperty.cpp.

bool te::dt::SimpleProperty::isAutoNumber ( ) const
inlineinherited

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.

Referenced by te::qt::widgets::UpdateProperty::propertiesComboBoxActivated(), and te::pgis::SetColumnDef().

te::dt::DateTimeProperty & te::dt::DateTimeProperty::operator= ( const DateTimeProperty rhs)

Assignment operator.

Parameters
rhsThe right-hand-side copy used to copy from.
Returns
A reference to this object.

Definition at line 49 of file DateTimeProperty.cpp.

References m_dSubType, m_dtResolution, and te::dt::SimpleProperty::operator=().

void te::dt::SimpleProperty::setDefaultValue ( std::string *  d)
inherited

It sets the default value associated to the property, or NULL if none is associated.

Parameters
dThe default value associated to the property, or NULL if none is associated.
Note
The SimpleProperty qill take the ownership of the given string.

Definition at line 74 of file SimpleProperty.cpp.

void te::dt::Property::setId ( unsigned int  id)
inlineinherited

It sets the property identifier.

Parameters
idA 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 117 of file Property.h.

Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::graph::LDDGraphBuilder::build(), te::pgis::Transactor::createDataSet(), te::graph::FlowGraphBuilder::createEdgeObjects(), te::graph::RAGGraphBuilder::createVertexObjects(), te::graph::FlowGraphBuilder::createVertexObjects(), and te::pgis::Transactor::getPropertyId().

void te::dt::Property::setName ( const std::string &  name)
inlineinherited
void te::dt::SimpleProperty::setRequired ( bool  r)
inlineinherited

It tells if the property is required or not.

Parameters
rIf true the property is marked as required, otherwise it is not required.

Definition at line 104 of file SimpleProperty.h.

Referenced by te::qt::widgets::AddProperty::buildArrayProperty(), te::qt::widgets::UpdateProperty::buildUpdatedArrayProperty(), and te::ado::Transactor::getProperties().

void te::dt::DateTimeProperty::setResolution ( DateTimeResolution  r)
inline

It sets the date time resolution.

Parameters
rThe date time resolution.

Definition at line 117 of file DateTimeProperty.h.

void te::dt::DateTimeProperty::setSubtype ( DateTimeType  t)
inline

It sets the date time property sub type.

Parameters
tThe date time property sub type.

Definition at line 103 of file DateTimeProperty.h.

Referenced by te::qt::widgets::DateTimePropertyWidget::fillProperty().

Member Data Documentation

std::string* te::dt::SimpleProperty::m_defaultValue
protectedinherited

Default value.

Definition at line 164 of file SimpleProperty.h.

Referenced by te::dt::SimpleProperty::operator=(), and te::dt::SimpleProperty::SimpleProperty().

DateTimeType te::dt::DateTimeProperty::m_dSubType
protected

The sub-type of this date time property.

Definition at line 130 of file DateTimeProperty.h.

Referenced by operator=().

DateTimeResolution te::dt::DateTimeProperty::m_dtResolution
protected

The date and time resolution.

Definition at line 131 of file DateTimeProperty.h.

Referenced by operator=().

unsigned int te::dt::Property::m_id
protectedinherited

An identification number that can be used internally.

Definition at line 187 of file Property.h.

Referenced by te::dt::Property::operator=().

bool te::dt::SimpleProperty::m_isAutoNumber
protectedinherited

A flag that indicates if this is an autonumber or serial type.

Definition at line 163 of file SimpleProperty.h.

Referenced by te::dt::SimpleProperty::operator=().

bool te::dt::SimpleProperty::m_isRequired
protectedinherited

This flag indicates if the attribute is required or not.

Definition at line 162 of file SimpleProperty.h.

Referenced by te::dt::SimpleProperty::operator=().

std::string te::dt::Property::m_name
protectedinherited

The property name.

Definition at line 189 of file Property.h.

Referenced by te::dt::Property::operator=().

Property* te::dt::Property::m_parent
protectedinherited

The parent property type: it must be a CompositeProperty.

Definition at line 186 of file Property.h.

int te::dt::Property::m_type
protectedinherited

The property data type.

Definition at line 188 of file Property.h.

Referenced by te::dt::Property::operator=().


The documentation for this class was generated from the following files: