27 #include "../../../../dataaccess/dataset/UniqueKey.h" 28 #include "../../common/Utils.h" 32 #include <boost/cstdint.hpp> 36 return ::v8::Undefined();
41 return ::v8::Undefined();
46 return ::v8::Undefined();
51 return ::v8::Undefined();
56 return ::v8::Undefined();
61 return ::v8::Undefined();
66 return ::v8::Undefined();
73 if(args.Holder().IsEmpty())
74 return ::v8::ThrowException(::v8::String::New(
"In order to use the clone method, you must use the object notation: \"uk = obj.clone();\""));
79 return ::v8::ThrowException(::v8::String::New(
"Invalid unique key in the clone method!"));
85 return hs.Close(jukclone);
109 return ::v8::Undefined();
116 global->Set(::v8::String::New(
"TeUniqueKey"), juk->GetFunction());
126 ::v8::Local<::v8::FunctionTemplate> result = ::v8::FunctionTemplate::New();
127 result->Inherit(cTpl);
129 ::v8::Handle<::v8::ObjectTemplate> prototype = result->PrototypeTemplate();
131 prototype->Set(::v8::String::NewSymbol(
"getProperties"), ::v8::FunctionTemplate::New(
UniqueKey_GetProperties));
132 prototype->Set(::v8::String::NewSymbol(
"setProperties"), ::v8::FunctionTemplate::New(
UniqueKey_SetProperties));
133 prototype->Set(::v8::String::NewSymbol(
"add"), ::v8::FunctionTemplate::New(
UniqueKey_Add));
136 prototype->Set(::v8::String::NewSymbol(
"replace"), ::v8::FunctionTemplate::New(
UniqueKey_Replace));
137 prototype->Set(::v8::String::NewSymbol(
"getType"), ::v8::FunctionTemplate::New(
UniqueKey_GetType));
138 prototype->Set(::v8::String::NewSymbol(
"clone"), ::v8::FunctionTemplate::New(
UniqueKey_Clone));
::v8::Local<::v8::Object > Make(T *obj, TF tfunc, const bool isOwner)
It creates a new JavaScript object from a C++ object (obj).
::v8::Handle<::v8::Value > UniqueKey_GetAssociatedIndex(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > UniqueKey_GetProperties(const ::v8::Arguments &args)
void RegisterUniqueKey(::v8::Local<::v8::Object > &global)
It registers the UniqueKey class.
::v8::Handle<::v8::Value > UniqueKey_SetProperties(const ::v8::Arguments &args)
JavaScript exporting routine for the TerraLib Data Access module.
Constraint * clone()
It returns a clone of the object.
::v8::Handle<::v8::Value > UniqueKey_Clone(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > UniqueKey_Add(const ::v8::Arguments &args)
It describes a unique key (uk) constraint.
static::v8::Persistent<::v8::FunctionTemplate > sdset_uniquekey_template
::v8::Handle<::v8::Value > UniqueKey_SetAssociatedIndex(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > UniqueKey_Constructor(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > UniqueKey_Replace(const ::v8::Arguments &args)
::v8::Persistent<::v8::FunctionTemplate > & GetConstraintTemplate()
It returns a reference to the persistent template of a Constraint object.
::v8::Handle<::v8::Value > UniqueKey_GetType(const ::v8::Arguments &args)
::v8::Persistent<::v8::FunctionTemplate > & GetUniqueKeyTemplate()
It returns a reference to the persistent template of a UniqueKey object.