Project

General

Profile

Foo.java

Ovidiu Maxiniuc, 09/11/2019 06:44 PM

Download (7.72 KB)

 
1
package com.goldencode.testcases.dmo.fwd;
2

    
3
import com.goldencode.p2j.persist.*;
4
import com.goldencode.p2j.persist.annotation.*;
5
import com.goldencode.p2j.persist.annotation.Trigger;
6
import com.goldencode.p2j.util.*;
7

    
8
/** Data Model Object corresponding with table {@code fwd.foo} (previously {@code fwd.foo}). */
9
@Table(name = "foo", legacy = "foo", label = "Foo")
10
@Indices(
11
{
12
   @Index(name = "foo_pi_make", legacy = "pi-make", primary = true, unique = true, components = 
13
   {
14
      @IndexComponent(field = "make")
15
   }),
16
   @Index(name = "foo_si_msrp", legacy = "si-msrp", components = 
17
   {
18
      @IndexComponent(field = "msrp", descending = true)
19
   })
20
})
21
public interface Foo
22
{
23
   /**
24
    * Getter: Manufacturer
25
    * 
26
    * @return  Make
27
    */
28
   @Property(id = 1, name = "make", column = "make", legacy = "make", format = "x(12)", label = "Make", help = "Enter foo make", mandatory = true, order = 5)
29
   public character getMake();
30

    
31
   /**
32
    * Setter: Manufacturer
33
    * 
34
    * @param   make
35
    *          Make
36
    */
37
   public void setMake(Text make);
38

    
39
   /**
40
    * Getter: Vehicle model name
41
    * 
42
    * @return  Model
43
    */
44
   @Property(id = 2, name = "model", column = "model", legacy = "model", format = "x(16)", label = "Model", help = "Enter model name", mandatory = true, order = 10)
45
   public character getModel();
46

    
47
   /**
48
    * Setter: Vehicle model name
49
    * 
50
    * @param   model
51
    *          Model
52
    */
53
   public void setModel(Text model);
54

    
55
   /**
56
    * Getter: Number of axles
57
    * 
58
    * @return  Number of axles
59
    */
60
   @Property(id = 3, name = "axles", column = "axles", legacy = "axles", format = ">,>>>,>>9", initial = "2", label = "Number of axles", help = "Enter number of axles", order = 20)
61
   public integer getAxles();
62

    
63
   /**
64
    * Setter: Number of axles
65
    * 
66
    * @param   axles
67
    *          Number of axles
68
    */
69
   public void setAxles(NumberType axles);
70

    
71
   /**
72
    * Getter: Exterior color
73
    * 
74
    * @return  Exterior
75
    */
76
   @Property(id = 4, name = "extColor", column = "ext_color", legacy = "ext-color", format = "x(16)", label = "Exterior", help = "Enter exterior color", order = 30)
77
   public character getExtColor();
78

    
79
   /**
80
    * Setter: Exterior color
81
    * 
82
    * @param   extColor
83
    *          Exterior
84
    */
85
   public void setExtColor(Text extColor);
86

    
87
   /**
88
    * Getter: Vehicle Identification Number
89
    * 
90
    * @return  VIN
91
    */
92
   @Property(id = 5, name = "vinNumber", column = "vin_number", legacy = "vin-number", format = "xxxx-xxxx-xxxx", label = "VIN", help = "Enter VIN", mandatory = true, order = 40)
93
   public character getVinNumber();
94

    
95
   /**
96
    * Setter: Vehicle Identification Number
97
    * 
98
    * @param   vinNumber
99
    *          VIN
100
    */
101
   public void setVinNumber(Text vinNumber);
102

    
103
   /**
104
    * Indexed Getter: Optional features
105
    * 
106
    * @param   index
107
    *          Index of element (where {@code 0 <= index < 10}).
108
    * 
109
    * @return  Options
110
    */
111
   @Property(id = 6, name = "options", column = "options", legacy = "options", format = "x(32)", label = "Options", help = "Enter an optional feature", order = 50, extent = 10)
112
   public character getOptions(int index);
113

    
114
   /**
115
    * Indexed Setter: Optional features
116
    * 
117
    * @param   index
118
    *          Index of element (where {@code 0 <= index < 10}).
119
    * @param   element
120
    *          Options
121
    */
122
   public void setOptions(int index, Text element);
123

    
124
   /**
125
    * Indexed Getter: Optional feature prices
126
    * 
127
    * @param   index
128
    *          Index of element (where {@code 0 <= index < 10}).
129
    * 
130
    * @return  Option Prices
131
    */
132
   @Property(id = 7, name = "prices", column = "prices", legacy = "prices", format = "->>>,>>9.99", initial = "0", label = "Option Prices", order = 51, extent = 10)
133
   public decimal getPrices(int index);
134

    
135
   /**
136
    * Indexed Setter: Optional feature prices
137
    * 
138
    * @param   index
139
    *          Index of element (where {@code 0 <= index < 10}).
140
    * @param   element
141
    *          Option Prices
142
    */
143
   public void setPrices(int index, NumberType element);
144

    
145
   /**
146
    * Getter: Manufacturer suggested retail price
147
    * 
148
    * @return  MSRP
149
    */
150
   @Property(id = 8, name = "msrp", column = "msrp", legacy = "msrp", format = "->>>,>>9.99", initial = "0", label = "MSRP", order = 61)
151
   public decimal getMsrp();
152

    
153
   /**
154
    * Setter: Manufacturer suggested retail price
155
    * 
156
    * @param   msrp
157
    *          MSRP
158
    */
159
   public void setMsrp(NumberType msrp);
160

    
161
   /**
162
    * DMO interface for use by converted business logic.
163
    */
164
   public interface Buf
165
   extends Foo, Buffer
166
   {
167
      /**
168
       * Getter: Optional features
169
       * 
170
       * @return  Options
171
       */
172
      public character[] getOptions();
173

    
174
      /**
175
       * Indexed Getter: Optional features
176
       * 
177
       * @param   index
178
       *          Index of element (where {@code 0 <= index < 10}).
179
       * 
180
       * @return  Options
181
       */
182
      public character getOptions(NumberType index);
183

    
184
      /**
185
       * Indexed Setter: Optional features
186
       * 
187
       * @param   index
188
       *          Index of element (where {@code 0 <= index < 10}).
189
       * @param   element
190
       *          Options
191
       */
192
      public void setOptions(NumberType index, Text element);
193

    
194
      /**
195
       * Set all elements of the target list property to the given scalar value. Modifies the
196
       * contents of: Optional features
197
       * 
198
       * @param   element
199
       *          Scalar value to which to set all elements of: Options
200
       */
201
      public void setOptions(Text element);
202

    
203
      /**
204
       * Set as many elements of the target list property as are provided in the given array of
205
       * scalar values. Modifies the contents of: Optional features
206
       * <p>
207
       * If the given array is larger than the target list, any additional elements in the given
208
       * array are ignored. If the target array is smaller than the target list, only those
209
       * elements whose array indices match are updated.
210
       * 
211
       * @param   elements
212
       *          Array of scalar values to which to set the corresponding elements of: Options
213
       */
214
      public void setOptions(Text[] elements);
215

    
216
      /**
217
       * Getter: Optional feature prices
218
       * 
219
       * @return  Option Prices
220
       */
221
      public decimal[] getPrices();
222

    
223
      /**
224
       * Indexed Getter: Optional feature prices
225
       * 
226
       * @param   index
227
       *          Index of element (where {@code 0 <= index < 10}).
228
       * 
229
       * @return  Option Prices
230
       */
231
      public decimal getPrices(NumberType index);
232

    
233
      /**
234
       * Indexed Setter: Optional feature prices
235
       * 
236
       * @param   index
237
       *          Index of element (where {@code 0 <= index < 10}).
238
       * @param   element
239
       *          Option Prices
240
       */
241
      public void setPrices(NumberType index, NumberType element);
242

    
243
      /**
244
       * Set all elements of the target list property to the given scalar value. Modifies the
245
       * contents of: Optional feature prices
246
       * 
247
       * @param   element
248
       *          Scalar value to which to set all elements of: Option Prices
249
       */
250
      public void setPrices(NumberType element);
251

    
252
      /**
253
       * Set as many elements of the target list property as are provided in the given array of
254
       * scalar values. Modifies the contents of: Optional feature prices
255
       * <p>
256
       * If the given array is larger than the target list, any additional elements in the given
257
       * array are ignored. If the target array is smaller than the target list, only those
258
       * elements whose array indices match are updated.
259
       * 
260
       * @param   elements
261
       *          Array of scalar values to which to set the corresponding elements of: Option
262
       *          Prices
263
       */
264
      public void setPrices(NumberType[] elements);
265

    
266
   }
267
}