Go to the documentation of this file.
26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_SEQUENCE_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_SEQUENCE_H
30 #include "../Config.h"
36 #include <boost/cstdint.hpp>
41 namespace dt {
class Property; }
47 class DataSourceCatalog;
89 boost::int64_t increment = 1,
90 boost::int64_t startValue = 1,
124 unsigned int getId()
const {
return m_id; }
133 void setId(
unsigned int id) { m_id = id; }
140 const std::string&
getName()
const {
return m_name; }
147 void setName(
const std::string& name) { m_name = name; }
292 #endif // __TERRALIB_DATAACCESS_INTERNAL_SEQUENCE_H
boost::int64_t getMinValue() const
It returns the minimum value that the sequence can generate.
boost::int64_t m_increment
The value to be added to the current sequence value to create the new value.
boost::int64_t m_maxValue
The maximum value that the sequence can generate.
void setIncrement(boost::int64_t n)
It sets the increment value.
void setAsCycle()
It sets the sequence as cycled (it can wrap).
DataSourceCatalog * m_catalog
The DataSourceCatalog associated to this sequence.
bool m_cycled
If it is true, the sequence can wrap when it reaches the maximum value in the case of an ascendent se...
void setId(unsigned int id)
It sets the sequence identifier.
te::dt::Property * getOwner() const
It returns the property type associated to the sequence.
std::string m_name
The sequence name.
boost::int64_t m_minValue
The minimum value that the sequence can generate.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
void setCachedValues(boost::int64_t value)
It sets how many sequence numbers are to be preallocated.
boost::int64_t getIncrement() const
It returns the increment value.
boost::int64_t getMaxValue() const
It returns the maximum value that the sequence can generate.
boost::int64_t getStartValue() const
It returns the initial value of the sequence.
boost::int64_t m_startValue
The sequence starting value.
Sequence(const Sequence &rhs)
Copy constructor.
boost::int64_t getCachedValues() const
It returns how many sequence numbers are preallocated.
unsigned int m_id
An identification number for the sequence.
Sequence(DataSourceCatalog *catalog=0, unsigned int id=0)
It constructs a new sequence.
bool isCycled() const
It returns true if the sequence can wrap, otherwise it returns false.
Sequence(const std::string &name, boost::int64_t increment=1, boost::int64_t startValue=1, DataSourceCatalog *catalog=0, unsigned int id=0)
It creates a new sequence.
boost::int64_t m_cachedValues
It specifies how many sequence numbers are to be preallocated for faster access.
void setMinValue(boost::int64_t value)
It sets the minimum value that the sequence can generate.
te::dt::Property * m_ownedBy
The sequence may be associated with a specific property type (owned by a property).
void setOwner(te::dt::Property *owner)
It causes the sequence to be associated with a specific property type.
void setName(const std::string &name)
It sets the sequence name.
const std::string & getName() const
It returns the sequence name.
void setCatalog(DataSourceCatalog *catalog)
It sets the catalog associated to the sequence.
Sequence & operator=(const Sequence &rhs)
Assignment operator.
It models a property definition.
It describes a sequence (a number generator).
It represents the system catalog of a DataSource.
DataSourceCatalog * getCatalog() const
It returns the catalog associated to the sequence.
void setMaxValue(boost::int64_t value)
It sets the maximum value that the sequence can generate.
unsigned int getId() const
It returns the sequence identifier.
void setAsNoCycle()
It sets the sequence as not cycled (it can't wrap).
Sequence * clone()
It returns a clone of the object.
void setStartValue(boost::int64_t value)
It sets the sequence starting value.