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; }
It represents the system catalog of a DataSource.
It describes a sequence (a number generator).
Sequence & operator=(const Sequence &rhs)
Assignment operator.
void setMaxValue(boost::int64_t value)
It sets the maximum value that the sequence can generate.
Sequence(DataSourceCatalog *catalog=0, unsigned int id=0)
It constructs a new sequence.
te::dt::Property * m_ownedBy
The sequence may be associated with a specific property type (owned by a property).
void setCatalog(DataSourceCatalog *catalog)
It sets the catalog associated to the sequence.
void setStartValue(boost::int64_t value)
It sets the sequence starting value.
const std::string & getName() const
It returns the sequence name.
DataSourceCatalog * getCatalog() const
It returns the catalog associated to the sequence.
Sequence * clone()
It returns a clone of the object.
Sequence(const Sequence &rhs)
Copy constructor.
void setMinValue(boost::int64_t value)
It sets the minimum value that the sequence can generate.
void setOwner(te::dt::Property *owner)
It causes the sequence to be associated with a specific property type.
DataSourceCatalog * m_catalog
The DataSourceCatalog associated to this sequence.
std::string m_name
The sequence name.
bool m_cycled
If it is true, the sequence can wrap when it reaches the maximum value in the case of an ascendent se...
boost::int64_t getMaxValue() const
It returns the maximum value that the sequence can generate.
boost::int64_t getMinValue() const
It returns the minimum value that the sequence can generate.
void setIncrement(boost::int64_t n)
It sets the increment value.
boost::int64_t m_startValue
The sequence starting value.
boost::int64_t getStartValue() const
It returns the initial value of the sequence.
unsigned int getId() const
It returns the sequence identifier.
boost::int64_t getIncrement() const
It returns the increment value.
boost::int64_t m_maxValue
The maximum value that the sequence can generate.
void setId(unsigned int id)
It sets the sequence identifier.
boost::int64_t m_increment
The value to be added to the current sequence value to create the new value.
te::dt::Property * getOwner() const
It returns the property type associated to the sequence.
void setCachedValues(boost::int64_t value)
It sets how many sequence numbers are to be preallocated.
boost::int64_t getCachedValues() const
It returns how many sequence numbers are preallocated.
bool isCycled() const
It returns true if the sequence can wrap, otherwise it returns false.
void setAsCycle()
It sets the sequence as cycled (it can wrap).
void setName(const std::string &name)
It sets the sequence name.
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 setAsNoCycle()
It sets the sequence as not cycled (it can't wrap).
unsigned int m_id
An identification number for the sequence.
boost::int64_t m_minValue
The minimum value that the sequence can generate.
It models a property definition.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.