DataAccess.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file DataAccess.h
22 
23  \brief JavaScript exporting routine for the TerraLib Data Access module.
24  */
25 
26 #ifndef __TERRALIB_BINDING_V8_JSI_DATAACCESS_INTERNAL_DATAACCESS_H
27 #define __TERRALIB_BINDING_V8_JSI_DATAACCESS_INTERNAL_DATAACCESS_H
28 
29 // TerraLib
30 #include "../Config.h"
31 
32 // Google V8
33 #include <v8.h>
34 
35 namespace te
36 {
37 // Forward declaration
38  namespace da { class DataSource; }
39 
40  namespace v8
41  {
42  namespace jsi
43  {
44  /*!
45  \brief It returns a reference to the persistent template of a AbstractConnectionPool object.
46 
47  \return A reference to the persistent template of a AbstractConnectionPool object.
48  */
49  ::v8::Persistent<::v8::FunctionTemplate>& GetAbstractConnectionPoolTemplate();
50 
51  /*!
52  \brief It returns a reference to the persistent template of a BatchExecutor object.
53 
54  \return A reference to the persistent template of a BatchExecutor object.
55  */
56  ::v8::Persistent<::v8::FunctionTemplate>& GetBatchExecutorTemplate();
57 
58  /*!
59  \brief It returns a reference to the persistent template of a PreparedQuery object.
60 
61  \return A reference to the persistent template of a PreparedQuery object.
62  */
63  ::v8::Persistent<::v8::FunctionTemplate>& GetPreparedQueryTemplate();
64 
65  /*!
66  \brief It returns a reference to the persistent template of a DataSourceCatalogLoader object.
67 
68  \return A reference to the persistent template of a DataSourceCatalogLoader object.
69  */
70  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSourceCatalogLoaderTemplate();
71 
72  /*!
73  \brief It returns a reference to the persistent template of a DataSourceTransactor object.
74 
75  \return A reference to the persistent template of a DataSourceTransactor object.
76  */
77  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSourceTransactorTemplate();
78 
79  /*!
80  \brief It registers the DataSourceCatalog class.
81 
82  You can use the DataSourceCatalog class like:
83  \code
84  var c = new TeDataSourceCatalog();
85  \endcode
86 
87  \param global The global object that will be used to register the DataSourceCatalog class
88 
89  \exception Exception It may throws an exception if it is not possible to register the class.
90  */
91  void RegisterDataSourceCatalog(::v8::Local<::v8::Object>& global);
92 
93  /*!
94  \brief It returns a reference to the persistent template of a DataSourceCatalog object.
95 
96  \return A reference to the persistent template of a DataSourceCatalog object.
97  */
98  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSourceCatalogTemplate();
99 
100  /*!
101  \brief It registers the GeometryFactory class.
102 
103  You can use the GeometryFactory class as a singleton using the following syntax:
104  \code
105  var mygeom = TeGeometryFactory.make(geomtype_id, srid);
106  \endcode
107 
108  \param global The global object that will be used to register the GeometryFactory class
109 
110  \exception Exception It may throws an exception if it is not possible to register the class.
111  */
112  void RegisterDataSourceManager(::v8::Local<::v8::Object>& global);
113 
114  /*!
115  \brief It registers the DataSourceFactory class.
116 
117  You can use the DataSourceFactory class as a singleton using the following syntax:
118  \code
119  var ds = DataSourceFactory.make("POSTGIS");
120  \endcode
121 
122  \param global The global object that will be used to register the DataSourceFactory class
123 
124  \exception Exception It may throws an exception, if it is not possible to register the class.
125  */
126  void RegisterDataSourceFactory(::v8::Local<::v8::Object>& global);
127 
128  /*!
129  \brief It registers the DataSource class.
130 
131  You can use the DataSource class like:
132  \code
133  TeDataSource.open();
134  \endcode
135 
136  \param global The global object that will be used to register the DataSource class
137 
138  \exception Exception It may throw an exception, if it is not possible to register the class.
139  */
140  void RegisterDataSource(::v8::Local<::v8::Object>& global);
141 
142  /*!
143  \brief It returns a reference to the persistent template of a DataSource object.
144 
145  \return A reference to the persistent template of a Geometry object.
146  */
147  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSourceTemplate();
148 
149  /*!
150  \brief It registers the CheckConstraint class.
151 
152  You can use the CheckConstraint class like:
153  \code
154  var c = new TeCheckConstraint(dt, id);
155  \endcode
156 
157  \param global The global object that will be used to register the CheckConstraint class
158 
159  \exception Exception It may throw an exception if it is not possible to register the class.
160  */
161  void RegisterCheckConstraint(::v8::Local<::v8::Object>& global);
162 
163  /*!
164  \brief It returns a reference to the persistent template of a CheckConstraint object.
165 
166  \return A reference to the persistent template of a CheckConstraint object.
167  */
168  ::v8::Persistent<::v8::FunctionTemplate>& GetCheckConstraintTemplate();
169 
170  /*!
171  \brief It returns a reference to the persistent template of a Constraint object.
172 
173  \return A reference to the persistent template of a Constraint object.
174  */
175  ::v8::Persistent<::v8::FunctionTemplate>& GetConstraintTemplate();
176 
177  /*!
178  \brief It returns a reference to the persistent template of a DataSet object.
179 
180  \return A reference to the persistent template of a DataSet object.
181  */
182 
183  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSetTemplate();
184 
185  /*!
186  \brief It returns a reference to the persistent template of a DataSetItem object.
187 
188  \return A reference to the persistent template of a DataSetItem object.
189  */
190  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSetItemTemplate();
191 
192  /*!
193  \brief It returns a reference to the persistent template of a DataSetPersistence object.
194 
195  \return A reference to the persistent template of a DataSetPersistence object.
196  */
197  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSetPersistenceTemplate();
198 
199  /*!
200  \brief It registers the DataSetType class.
201 
202  You can use the DataSetType class like:
203  \code
204  var type = new TeSetType(name, id);
205  \endcode
206 
207  \param global The global object that will be used to register the DataSetType class
208 
209  \exception Exception It may throw an exception, if it is not possible to register the class.
210  */
211  void RegisterDataSetType(::v8::Local<::v8::Object>& global);
212 
213  /*!
214  \brief It returns a reference to the persistent template of a DataSetType object.
215 
216  \return A reference to the persistent template of a DataSetType object.
217  */
218  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSetTypeTemplate();
219 
220  /*!
221  \brief It returns a reference to the persistent template of a DataSetTypePersistence object.
222 
223  \return A reference to the persistent template of a DataSetTypePersistence object.
224  */
225  ::v8::Persistent<::v8::FunctionTemplate>& GetDataSetTypePersistenceTemplate();
226 
227  /*!
228  \brief It registers the ForeignKey class.
229 
230  You can use the ForeignKey class like:
231  \code
232  var c = new TeForeignKey(id);
233  \endcode
234 
235  \param global The global object that will be used to register the ForeignKey class
236 
237  \exception Exception It may throw an exception, if it is not possible to register the class.
238  */
239  void RegisterForeignKey(::v8::Local<::v8::Object>& global);
240 
241  /*!
242  \brief It returns a reference to the persistent template of a ForeignKey object.
243 
244  \return A reference to the persistent template of a ForeignKey object.
245  */
246  ::v8::Persistent<::v8::FunctionTemplate>& GetForeignKeyTemplate();
247 
248  /*!
249  \brief It registers the Index class.
250 
251  You can use the Index class like:
252  \code
253  var c = new TeIndex(parent, id);
254  \endcode
255 
256  \param global The global object that will be used to register the Index class
257 
258  \exception Exception It may throw an exception, if it is not possible to register the class.
259  */
260  void RegisterIndex(::v8::Local<::v8::Object>& global);
261 
262  /*!
263  \brief It returns a reference to the persistent template of a Index object.
264 
265  \return A reference to the persistent template of a Index object.
266  */
267  ::v8::Persistent<::v8::FunctionTemplate>& GetIndexTemplate();
268 
269  /*!
270  \brief It registers the PrimaryKey class.
271 
272  You can use the PrimaryKey class like:
273  \code
274  var c = new TePrimaryKey(datasettype, id);
275  \endcode
276 
277  \param global The global object that will be used to register the PrimaryKey class
278 
279  \exception Exception It may throw an exception, if it is not possible to register the class.
280  */
281  void RegisterPrimaryKey(::v8::Local<::v8::Object>& global);
282 
283  /*!
284  \brief It returns a reference to the persistent template of a PrimaryKey object.
285 
286  \return A reference to the persistent template of a PrimaryKey object.
287  */
288  ::v8::Persistent<::v8::FunctionTemplate>& GetPrimaryKeyTemplate();
289 
290  /*!
291  \brief It registers the Sequence class.
292 
293  You can use the Sequence class like:
294  \code
295  var c = new TeSequence(catalog, id);
296  \endcode
297 
298  \param global The global object that will be used to register the Sequence class
299 
300  \exception Exception It may throw an exception, if it is not possible to register the class.
301  */
302  void RegisterSequence(::v8::Local<::v8::Object>& global);
303 
304  /*!
305  \brief It returns a reference to the persistent template of a Sequence object.
306 
307  \return A reference to the persistent template of a Sequence object.
308  */
309  ::v8::Persistent<::v8::FunctionTemplate>& GetSequenceTemplate();
310 
311  /*!
312  \brief It registers the UniqueKey class.
313 
314  You can use the UniqueKey class like:
315  \code
316  var uk = new TeUniqueKey(datasettype, id);
317  \endcode
318 
319  \param global The global object that will be used to register the UniqueKey class
320 
321  \exception Exception It may throw an exception, if it is not possible to register the class.
322  */
323  void RegisterUniqueKey(::v8::Local<::v8::Object>& global);
324 
325  /*!
326  \brief It returns a reference to the persistent template of a UniqueKey object.
327 
328  \return A reference to the persistent template of a UniqueKey object.
329  */
330  ::v8::Persistent<::v8::FunctionTemplate>& GetUniqueKeyTemplate();
331 
332  /*!
333  \brief It registers the ArrayProperty class.
334 
335  You can use the ArrayProperty class like:
336  \code
337  var p = new TeArrayProperty(name, elementtype);
338  \endcode
339 
340  \param global The global object that will be used to register the ArrayProperty class
341 
342  \exception Exception It may throw an exception, if it is not possible to register the class.
343  */
344  void RegisterArrayProperty(::v8::Local<::v8::Object>& global);
345 
346  /*!
347  \brief It returns a reference to the persistent template of a ArrayProperty object.
348 
349  \return A reference to the persistent template of a ArrayProperty object.
350  */
351  ::v8::Persistent<::v8::FunctionTemplate>& GetArrayPropertyTemplate();
352 
353  /*!
354  \brief It registers the CompositeProperty class.
355 
356  You can use the CompositeProperty class like:
357  \code
358  var p = new TeCompositeProperty(cname, name, id, parent);
359  \endcode
360 
361  \param global The global object that will be used to register the CompositeProperty class
362 
363  \exception Exception It may throw an exception, if it is not possible to register the class.
364  */
365  void RegisterCompositeProperty(::v8::Local<::v8::Object>& global);
366 
367  /*!
368  \brief It returns a reference to the persistent template of a CompositeProperty object.
369 
370  \return A reference to the persistent template of a CompositeProperty object.
371  */
372  ::v8::Persistent<::v8::FunctionTemplate>& GetCompositePropertyTemplate();
373 
374  /*!
375  \brief It registers the DateTimeProperty class.
376 
377  You can use the DateTimeProperty class like:
378  \code
379  var p = new TeDateTimeProperty(name, datetype);
380  \endcode
381 
382  \param global The global object that will be used to register the DateTimeProperty class
383 
384  \exception Exception It may throw an exception, if it is not possible to register the class.
385  */
386  void RegisterDateTimeProperty(::v8::Local<::v8::Object>& global);
387 
388  /*!
389  \brief It returns a reference to the persistent template of a DateTimeProperty object.
390 
391  \return A reference to the persistent template of a DateTimeProperty object.
392  */
393  ::v8::Persistent<::v8::FunctionTemplate>& GetDateTimePropertyTemplate();
394 
395  /*!
396  \brief It registers the GeometryProperty class.
397 
398  You can use the GeometryProperty class like:
399  \code
400  var gp = new TeGeometryProperty(name, srid, subtype);
401  \endcode
402 
403  \param global The global object that will be used to register the GeometryProperty class
404 
405  \exception Exception It may throw an exception, if it is not possible to register the class.
406  */
407  void RegisterGeometryProperty(::v8::Local<::v8::Object>& global);
408 
409  /*!
410  \brief It returns a reference to the persistent template of a GeometryProperty object.
411 
412  \return A reference to the persistent template of a GeometryProperty object.
413  */
414  ::v8::Persistent<::v8::FunctionTemplate>& GetGeometryPropertyTemplate();
415 
416  /*!
417  \brief It registers the NumericProperty class.
418 
419  You can use the NumericProperty class like:
420  \code
421  var gp = new TeNumericProperty(name, precision, scale);
422  \endcode
423 
424  \param global The global object that will be used to register the NumericProperty class
425 
426  \exception Exception It may throw an exception, if it is not possible to register the class.
427  */
428  void RegisterNumericProperty(::v8::Local<::v8::Object>& global);
429 
430  /*!
431  \brief It returns a reference to the persistent template of a NumericProperty object.
432 
433  \return A reference to the persistent template of a NumericProperty object.
434  */
435  ::v8::Persistent<::v8::FunctionTemplate>& GetNumericPropertyTemplate();
436 
437  /*!
438  \brief It registers the Property class.
439 
440  You can use the Property class like:
441  \code
442  var p = new TeProperty(other_property);
443  \endcode
444 
445  \param global The global object that will be used to register the Property class
446 
447  \exception Exception It may throw an exception if it is not possible to register the class.
448  */
449  void RegisterProperty(::v8::Local<::v8::Object>& global);
450 
451  /*!
452  \brief It returns a reference to the persistent template of a Property object.
453 
454  \return A reference to the persistent template of a Property object.
455  */
456  ::v8::Persistent<::v8::FunctionTemplate>& GetPropertyTemplate();
457 
458  /*!
459  \brief It registers the PropertyVisitor class.
460 
461  You can use the PropertyVisitor class like:
462  \code
463  var p = new TePropertyVisitor();
464  \endcode
465 
466  \param global The global object that will be used to register the PropertyVisitor class
467 
468  \exception Exception It may throw an exception if it is not possible to register the class.
469  */
470  void RegisterPropertyVisitor(::v8::Local<::v8::Object>& global);
471 
472  /*!
473  \brief It returns a reference to the persistent template of a PropertyVisitor object.
474 
475  \return A reference to the persistent template of a PropertyVisitor object.
476  */
477  ::v8::Persistent<::v8::FunctionTemplate>& GetPropertyVisitorTemplate();
478 
479  /*!
480  \brief It registers the RasterProperty class.
481 
482  You can use the RasterProperty class like:
483  \code
484  var p = new TeRasterProperty(name);
485  \endcode
486 
487  \param global The global object that will be used to register the RasterProperty class
488 
489  \exception Exception It may throw an exception if it is not possible to register the class.
490  */
491  void RegisterRasterProperty(::v8::Local<::v8::Object>& global);
492 
493  /*!
494  \brief It returns a reference to the persistent template of a RasterProperty object.
495 
496  \return A reference to the persistent template of a RasterProperty object.
497  */
498  ::v8::Persistent<::v8::FunctionTemplate>& GetRasterPropertyTemplate();
499 
500  /*!
501  \brief It registers the SimpleProperty class.
502 
503  You can use the SimpleProperty class like:
504  \code
505  var p = new TeSimpleProperty(name, datatype);
506  \endcode
507 
508  \param global The global object that will be used to register the SimpleProperty class
509 
510  \exception Exception It may throw an exception, if it is not possible to register the class.
511  */
512  void RegisterSimpleProperty(::v8::Local<::v8::Object>& global);
513 
514  /*!
515  \brief It returns a reference to the persistent template of a SimpleProperty object.
516 
517  \return A reference to the persistent template of a SimpleProperty object.
518  */
519  ::v8::Persistent<::v8::FunctionTemplate>& GetSimplePropertyTemplate();
520 
521  /*!
522  \brief It registers the StringProperty class.
523 
524  You can use the StringProperty class like:
525  \code
526  var p = new TeSimpleProperty(name, strtype);
527  \endcode
528 
529  \param global The global object that will be used to register the StringProperty class
530 
531  \exception Exception It may throw an exception, if it is not possible to register the class.
532  */
533  void RegisterStringProperty(::v8::Local<::v8::Object>& global);
534 
535  /*!
536  \brief It returns a reference to the persistent template of a StringProperty object.
537 
538  \return A reference to the persistent template of a StringProperty object.
539  */
540  ::v8::Persistent<::v8::FunctionTemplate>& GetStringPropertyTemplate();
541 
542  } // end namespace jsi
543  } // end namespace v8
544 } // end namespace te
545 
546 #endif // __TERRALIB_BINDING_V8_JSI_DATAACCESS_INTERNAL_DATAACCESS_H
547 
void RegisterRasterProperty(::v8::Local<::v8::Object > &global)
It registers the RasterProperty class.
::v8::Persistent<::v8::FunctionTemplate > & GetSimplePropertyTemplate()
It returns a reference to the persistent template of a SimpleProperty object.
void RegisterDataSetType(::v8::Local<::v8::Object > &global)
It registers the DataSetType class.
void RegisterPrimaryKey(::v8::Local<::v8::Object > &global)
It registers the PrimaryKey class.
void RegisterDataSourceFactory(::v8::Local<::v8::Object > &global)
It registers the DataSourceFactory class.
void RegisterCheckConstraint(::v8::Local<::v8::Object > &global)
It registers the CheckConstraint class.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSetTypePersistenceTemplate()
It returns a reference to the persistent template of a DataSetTypePersistence object.
::v8::Persistent<::v8::FunctionTemplate > & GetCheckConstraintTemplate()
It returns a reference to the persistent template of a CheckConstraint object.
::v8::Persistent<::v8::FunctionTemplate > & GetPropertyVisitorTemplate()
It returns a reference to the persistent template of a PropertyVisitor object.
void RegisterPropertyVisitor(::v8::Local<::v8::Object > &global)
It registers the PropertyVisitor class.
void RegisterGeometryProperty(::v8::Local<::v8::Object > &global)
It registers the GeometryProperty class.
void RegisterNumericProperty(::v8::Local<::v8::Object > &global)
It registers the NumericProperty class.
void RegisterUniqueKey(::v8::Local<::v8::Object > &global)
It registers the UniqueKey class.
void RegisterProperty(::v8::Local<::v8::Object > &global)
It registers the Property class.
::v8::Persistent<::v8::FunctionTemplate > & GetPrimaryKeyTemplate()
It returns a reference to the persistent template of a PrimaryKey object.
void RegisterIndex(::v8::Local<::v8::Object > &global)
It registers the Index class.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSetPersistenceTemplate()
It returns a reference to the persistent template of a DataSetPersistence object. ...
::v8::Persistent<::v8::FunctionTemplate > & GetArrayPropertyTemplate()
It returns a reference to the persistent template of a ArrayProperty object.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSourceCatalogTemplate()
It returns a reference to the persistent template of a DataSourceCatalog object.
void RegisterCompositeProperty(::v8::Local<::v8::Object > &global)
It registers the CompositeProperty class.
void RegisterDataSourceCatalog(::v8::Local<::v8::Object > &global)
It registers the DataSourceCatalog class.
::v8::Persistent<::v8::FunctionTemplate > & GetBatchExecutorTemplate()
It returns a reference to the persistent template of a BatchExecutor object.
::v8::Persistent<::v8::FunctionTemplate > & GetGeometryPropertyTemplate()
It returns a reference to the persistent template of a GeometryProperty object.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSourceTemplate()
It returns a reference to the persistent template of a DataSource object.
void RegisterDataSource(::v8::Local<::v8::Object > &global)
It registers the DataSource class.
::v8::Persistent<::v8::FunctionTemplate > & GetSequenceTemplate()
It returns a reference to the persistent template of a Sequence object.
void RegisterArrayProperty(::v8::Local<::v8::Object > &global)
It registers the ArrayProperty class.
void RegisterSequence(::v8::Local<::v8::Object > &global)
It registers the Sequence class.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSourceCatalogLoaderTemplate()
It returns a reference to the persistent template of a DataSourceCatalogLoader object.
::v8::Persistent<::v8::FunctionTemplate > & GetNumericPropertyTemplate()
It returns a reference to the persistent template of a NumericProperty object.
URI C++ Library.
Definition: Attributes.h:37
::v8::Persistent<::v8::FunctionTemplate > & GetDataSetItemTemplate()
It returns a reference to the persistent template of a DataSetItem object.
::v8::Persistent<::v8::FunctionTemplate > & GetDateTimePropertyTemplate()
It returns a reference to the persistent template of a DateTimeProperty object.
void RegisterStringProperty(::v8::Local<::v8::Object > &global)
It registers the StringProperty class.
::v8::Persistent<::v8::FunctionTemplate > & GetRasterPropertyTemplate()
It returns a reference to the persistent template of a RasterProperty object.
void RegisterDateTimeProperty(::v8::Local<::v8::Object > &global)
It registers the DateTimeProperty class.
::v8::Persistent<::v8::FunctionTemplate > & GetStringPropertyTemplate()
It returns a reference to the persistent template of a StringProperty object.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSetTemplate()
It returns a reference to the persistent template of a DataSet object.
void DataSource()
::v8::Persistent<::v8::FunctionTemplate > & GetPropertyTemplate()
It returns a reference to the persistent template of a Property object.
void RegisterSimpleProperty(::v8::Local<::v8::Object > &global)
It registers the SimpleProperty class.
void RegisterForeignKey(::v8::Local<::v8::Object > &global)
It registers the ForeignKey class.
::v8::Persistent<::v8::FunctionTemplate > & GetAbstractConnectionPoolTemplate()
It returns a reference to the persistent template of a AbstractConnectionPool object.
::v8::Persistent<::v8::FunctionTemplate > & GetCompositePropertyTemplate()
It returns a reference to the persistent template of a CompositeProperty object.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSourceTransactorTemplate()
It returns a reference to the persistent template of a DataSourceTransactor object.
::v8::Persistent<::v8::FunctionTemplate > & GetConstraintTemplate()
It returns a reference to the persistent template of a Constraint object.
::v8::Persistent<::v8::FunctionTemplate > & GetPreparedQueryTemplate()
It returns a reference to the persistent template of a PreparedQuery object.
::v8::Persistent<::v8::FunctionTemplate > & GetDataSetTypeTemplate()
It returns a reference to the persistent template of a DataSetType object.
void RegisterDataSourceManager(::v8::Local<::v8::Object > &global)
It registers the GeometryFactory class.
::v8::Persistent<::v8::FunctionTemplate > & GetForeignKeyTemplate()
It returns a reference to the persistent template of a ForeignKey object.
::v8::Persistent<::v8::FunctionTemplate > & GetIndexTemplate()
It returns a reference to the persistent template of a Index object.
::v8::Persistent<::v8::FunctionTemplate > & GetUniqueKeyTemplate()
It returns a reference to the persistent template of a UniqueKey object.