2009-02-03 17:06:23 +00:00
|
|
|
#ifndef SPATIAL_CLASSESH_ORACLE
|
|
|
|
# include "spatial_classesh.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************/
|
|
|
|
// generated method implementations for the SDO_POINT_TYPE object type.
|
|
|
|
/*****************************************************************/
|
|
|
|
|
|
|
|
oracle::occi::Number SDOPointType::getX() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return X;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOPointType::setX(const oracle::occi::Number &value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
X = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
oracle::occi::Number SDOPointType::getY() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return Y;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOPointType::setY(const oracle::occi::Number &value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
Y = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
oracle::occi::Number SDOPointType::getZ() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return Z;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOPointType::setZ(const oracle::occi::Number &value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
Z = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOPointType::operator new(size_t size)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOPointType::operator new(size_t size, const oracle::occi::Connection * sess,
|
2011-11-14 03:37:50 +00:00
|
|
|
const OCCI_STD_NAMESPACE::string& table)
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size, sess, table,
|
|
|
|
(char *) "MDSYS.SDO_POINT_TYPE");
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOPointType::operator new(size_t size, void *ctxOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size, ctxOCCI_);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOPointType::operator new(size_t size,
|
2011-11-14 03:37:50 +00:00
|
|
|
const oracle::occi::Connection *sess,
|
|
|
|
const OCCI_STD_NAMESPACE::string &tableName,
|
|
|
|
const OCCI_STD_NAMESPACE::string &typeName,
|
|
|
|
const OCCI_STD_NAMESPACE::string &tableSchema,
|
|
|
|
const OCCI_STD_NAMESPACE::string &typeSchema)
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size, sess, tableName,
|
|
|
|
typeName, tableSchema, typeSchema);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
OCCI_STD_NAMESPACE::string SDOPointType::getSQLTypeName() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return OCCI_STD_NAMESPACE::string("MDSYS.SDO_POINT_TYPE");
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOPointType::getSQLTypeName(oracle::occi::Environment *env, void **schemaName,
|
2011-11-14 03:37:50 +00:00
|
|
|
unsigned int &schemaNameLen, void **typeName, unsigned int &typeNameLen) const
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
PObject::getSQLTypeName(env, &SDOPointType::readSQL, schemaName,
|
|
|
|
schemaNameLen, typeName, typeNameLen);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SDOPointType::SDOPointType()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOPointType::readSQL(void *ctxOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDOPointType *objOCCI_ = new(ctxOCCI_) SDOPointType(ctxOCCI_);
|
|
|
|
oracle::occi::AnyData streamOCCI_(ctxOCCI_);
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if (streamOCCI_.isNull())
|
|
|
|
objOCCI_->setNull();
|
|
|
|
else
|
|
|
|
objOCCI_->readSQL(streamOCCI_);
|
|
|
|
}
|
|
|
|
catch (oracle::occi::SQLException& excep)
|
|
|
|
{
|
|
|
|
delete objOCCI_;
|
|
|
|
excep.setErrorCtx(ctxOCCI_);
|
|
|
|
return (void *)NULL;
|
|
|
|
}
|
|
|
|
return (void *)objOCCI_;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOPointType::readSQL(oracle::occi::AnyData& streamOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
X = streamOCCI_.getNumber();
|
|
|
|
Y = streamOCCI_.getNumber();
|
|
|
|
Z = streamOCCI_.getNumber();
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOPointType::writeSQL(void *objectOCCI_, void *ctxOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDOPointType *objOCCI_ = (SDOPointType *) objectOCCI_;
|
|
|
|
oracle::occi::AnyData streamOCCI_(ctxOCCI_);
|
2009-02-03 17:06:23 +00:00
|
|
|
|
2011-11-14 03:37:50 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
if (objOCCI_->isNull())
|
|
|
|
streamOCCI_.setNull();
|
|
|
|
else
|
|
|
|
objOCCI_->writeSQL(streamOCCI_);
|
|
|
|
}
|
|
|
|
catch (oracle::occi::SQLException& excep)
|
|
|
|
{
|
|
|
|
excep.setErrorCtx(ctxOCCI_);
|
|
|
|
}
|
|
|
|
return;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOPointType::writeSQL(oracle::occi::AnyData& streamOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
streamOCCI_.setNumber(X);
|
|
|
|
streamOCCI_.setNumber(Y);
|
|
|
|
streamOCCI_.setNumber(Z);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SDOPointType::~SDOPointType()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************/
|
|
|
|
// generated method implementations for the SDO_GEOMETRY object type.
|
|
|
|
/*****************************************************************/
|
|
|
|
|
|
|
|
oracle::occi::Number SDOGeometry::getSdo_gtype() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return SDO_GTYPE;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::setSdo_gtype(const oracle::occi::Number &value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDO_GTYPE = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
oracle::occi::Number SDOGeometry::getSdo_srid() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return SDO_SRID;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::setSdo_srid(const oracle::occi::Number &value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDO_SRID = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SDOPointType * SDOGeometry::getSdo_point() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return SDO_POINT;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::setSdo_point(SDOPointType * value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDO_POINT = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
2011-11-14 03:37:50 +00:00
|
|
|
OCCI_STD_NAMESPACE::vector< oracle::occi::Number >& SDOGeometry::getSdo_elem_info()
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return SDO_ELEM_INFO;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const OCCI_STD_NAMESPACE::vector< oracle::occi::Number >& SDOGeometry::getSdo_elem_info() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return SDO_ELEM_INFO;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::setSdo_elem_info(const OCCI_STD_NAMESPACE::vector< oracle::occi::Number > &value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDO_ELEM_INFO = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
2011-11-14 03:37:50 +00:00
|
|
|
OCCI_STD_NAMESPACE::vector< oracle::occi::Number >& SDOGeometry::getSdo_ordinates()
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return SDO_ORDINATES;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const OCCI_STD_NAMESPACE::vector< oracle::occi::Number >& SDOGeometry::getSdo_ordinates() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return SDO_ORDINATES;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::setSdo_ordinates(const OCCI_STD_NAMESPACE::vector< oracle::occi::Number > &value)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDO_ORDINATES = value;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOGeometry::operator new(size_t size)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOGeometry::operator new(size_t size, const oracle::occi::Connection * sess,
|
2011-11-14 03:37:50 +00:00
|
|
|
const OCCI_STD_NAMESPACE::string& table)
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size, sess, table,
|
|
|
|
(char *) "MDSYS.SDO_GEOMETRY");
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOGeometry::operator new(size_t size, void *ctxOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size, ctxOCCI_);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOGeometry::operator new(size_t size,
|
2011-11-14 03:37:50 +00:00
|
|
|
const oracle::occi::Connection *sess,
|
|
|
|
const OCCI_STD_NAMESPACE::string &tableName,
|
|
|
|
const OCCI_STD_NAMESPACE::string &typeName,
|
|
|
|
const OCCI_STD_NAMESPACE::string &tableSchema,
|
|
|
|
const OCCI_STD_NAMESPACE::string &typeSchema)
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return oracle::occi::PObject::operator new(size, sess, tableName,
|
|
|
|
typeName, tableSchema, typeSchema);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
OCCI_STD_NAMESPACE::string SDOGeometry::getSQLTypeName() const
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
return OCCI_STD_NAMESPACE::string("MDSYS.SDO_GEOMETRY");
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::getSQLTypeName(oracle::occi::Environment *env, void **schemaName,
|
2011-11-14 03:37:50 +00:00
|
|
|
unsigned int &schemaNameLen, void **typeName, unsigned int &typeNameLen) const
|
2009-02-03 17:06:23 +00:00
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
PObject::getSQLTypeName(env, &SDOGeometry::readSQL, schemaName,
|
|
|
|
schemaNameLen, typeName, typeNameLen);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SDOGeometry::SDOGeometry()
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDO_POINT = (SDOPointType *) 0;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *SDOGeometry::readSQL(void *ctxOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDOGeometry *objOCCI_ = new(ctxOCCI_) SDOGeometry(ctxOCCI_);
|
|
|
|
oracle::occi::AnyData streamOCCI_(ctxOCCI_);
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if (streamOCCI_.isNull())
|
|
|
|
objOCCI_->setNull();
|
|
|
|
else
|
|
|
|
objOCCI_->readSQL(streamOCCI_);
|
|
|
|
}
|
|
|
|
catch (oracle::occi::SQLException& excep)
|
|
|
|
{
|
|
|
|
delete objOCCI_;
|
|
|
|
excep.setErrorCtx(ctxOCCI_);
|
|
|
|
return (void *)NULL;
|
|
|
|
}
|
|
|
|
return (void *)objOCCI_;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::readSQL(oracle::occi::AnyData& streamOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDO_GTYPE = streamOCCI_.getNumber();
|
|
|
|
SDO_SRID = streamOCCI_.getNumber();
|
|
|
|
SDO_POINT = (SDOPointType *) streamOCCI_.getObject(&SDOPointType::readSQL);
|
|
|
|
oracle::occi::getVector(streamOCCI_, SDO_ELEM_INFO);
|
|
|
|
oracle::occi::getVector(streamOCCI_, SDO_ORDINATES);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::writeSQL(void *objectOCCI_, void *ctxOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
SDOGeometry *objOCCI_ = (SDOGeometry *) objectOCCI_;
|
|
|
|
oracle::occi::AnyData streamOCCI_(ctxOCCI_);
|
2009-02-03 17:06:23 +00:00
|
|
|
|
2011-11-14 03:37:50 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
if (objOCCI_->isNull())
|
|
|
|
streamOCCI_.setNull();
|
|
|
|
else
|
|
|
|
objOCCI_->writeSQL(streamOCCI_);
|
|
|
|
}
|
|
|
|
catch (oracle::occi::SQLException& excep)
|
|
|
|
{
|
|
|
|
excep.setErrorCtx(ctxOCCI_);
|
|
|
|
}
|
|
|
|
return;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SDOGeometry::writeSQL(oracle::occi::AnyData& streamOCCI_)
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
streamOCCI_.setNumber(SDO_GTYPE);
|
|
|
|
streamOCCI_.setNumber(SDO_SRID);
|
|
|
|
streamOCCI_.setObject(SDO_POINT);
|
|
|
|
oracle::occi::setVector(streamOCCI_, SDO_ELEM_INFO);
|
|
|
|
oracle::occi::setVector(streamOCCI_, SDO_ORDINATES);
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SDOGeometry::~SDOGeometry()
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
delete SDO_POINT;
|
2009-02-03 17:06:23 +00:00
|
|
|
}
|