01: /*
02: * This file is part of the GeOxygene project source files.
03: *
04: * GeOxygene aims at providing an open framework which implements OGC/ISO specifications for
05: * the development and deployment of geographic (GIS) applications. It is a open source
06: * contribution of the COGIT laboratory at the Institut Géographique National (the French
07: * National Mapping Agency).
08: *
09: * See: http://oxygene-project.sourceforge.net
10: *
11: * Copyright (C) 2005 Institut Géographique National
12: *
13: * This library is free software; you can redistribute it and/or modify it under the terms
14: * of the GNU Lesser General Public License as published by the Free Software Foundation;
15: * either version 2.1 of the License, or any later version.
16: *
17: * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
19: * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
20: *
21: * You should have received a copy of the GNU Lesser General Public License along with
22: * this library (see file LICENSE if present); if not, write to the Free Software
23: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24: *
25: */
26:
27: package fr.ign.cogit.geoxygene.example;
28:
29: /**
30: * Exemple de classe permettant de stocker des tableaux.
31: * La table correspondante est definie dans le script "tableaux.sql".
32: * Le mapping correspondant est defini le fichier "repository_tableaux.xml".
33: *
34: * ATTENTION : pour rendre persistants des tableaux de double, int, boolean, ou String,
35: * ils doivent avoir un type equivalent dans Oracle de type VARRAY avac la MEME cardinalite.
36: * Ces types DOIVENT s'appeler VARRAY_OF_DOUBLE, ou VARRAY_OF_INTEGER ou VARRAY_OF_BOOLEAN, ou .
37: * Cf. script " tableaux.sql " pour la syntaxe de creation de ces types.
38: *
39: * ATTENTION : pour etre rendue persistants, les tableaux ne doivent pas etre NULL en Java,
40: * sinon plantage.
41: *
42: * @author Thierry Badard & Arnaud Braun
43: * @version 1.0
44: *
45: */
46:
47: public class ClassWithTable {
48:
49: public int id;
50:
51: public int getId() {
52: return id;
53: }
54:
55: public void setId(int Id) {
56: id = Id;
57: }
58:
59: public double[] doubles = new double[10];
60:
61: public double[] getDoubles() {
62: return doubles;
63: }
64:
65: public void setDoubles(double[] tab) {
66: doubles = tab;
67: }
68:
69: public int[] ints = new int[15];
70:
71: public int[] getInts() {
72: return ints;
73: }
74:
75: public void setInts(int[] tab) {
76: ints = tab;
77: }
78:
79: public boolean[] booleans = new boolean[5];
80:
81: public boolean[] getBooleans() {
82: return booleans;
83: }
84:
85: public void setBooleans(boolean[] tab) {
86: booleans = tab;
87: }
88:
89: public String[] strings = new String[10];
90:
91: public String[] getStrings() {
92: return strings;
93: }
94:
95: public void setStrings(String[] tab) {
96: strings = tab;
97: }
98:
99: }
|