Revision 45564 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/EditableFeatureAttributeDescriptor.java

View differences:

EditableFeatureAttributeDescriptor.java
48 48
public interface EditableFeatureAttributeDescriptor
49 49
        extends FeatureAttributeDescriptor, SupportFromJson {
50 50

  
51
  /**
52
   * Checks attribute integrity
53
   *
54
   * @throws
55
   * org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeIntegrityException
56
   */
57
  void checkIntegrity() throws AttributeFeatureTypeIntegrityException;
51
    /**
52
     * Checks attribute integrity
53
     *
54
     * @throws
55
     * org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeIntegrityException
56
     */
57
    void checkIntegrity() throws AttributeFeatureTypeIntegrityException;
58 58

  
59
  @Override
60
  public EditableForeingKey getForeingKey();
59
    @Override
60
    public EditableForeingKey getForeingKey();
61 61

  
62
  /**
63
   * Sets the name
64
   *
65
   * @param name to set
66
   * @return this
67
   */
68
  public EditableFeatureAttributeDescriptor setName(String name);
62
    /**
63
     * Sets the name
64
     *
65
     * @param name to set
66
     * @return this
67
     */
68
    public EditableFeatureAttributeDescriptor setName(String name);
69 69

  
70
  /**
71
   * Sets the data type
72
   *
73
   * @param type one of the constants defined in {@link DataTypes}
74
   * @return this
75
   */
76
  public EditableFeatureAttributeDescriptor setDataType(int type);
70
    /**
71
     * Sets the data type
72
     *
73
     * @param type one of the constants defined in {@link DataTypes}
74
     * @return this
75
     */
76
    public EditableFeatureAttributeDescriptor setDataType(int type);
77 77

  
78
  public EditableFeatureAttributeDescriptor setDataType(DataType dataType);
78
    public EditableFeatureAttributeDescriptor setDataType(DataType dataType);
79 79

  
80
  public EditableFeatureAttributeDescriptor setDataProfileName(String dataProfile);
80
    public EditableFeatureAttributeDescriptor setDataProfileName(String dataProfile);
81 81

  
82
  /**
83
   * Sets the size.
84
   * Used for arrays (byte, char/string,...)
85
   *
86
   * @param size a size of type int
87
   * @return this
88
   *
89
   */
90
  public EditableFeatureAttributeDescriptor setSize(int size);
82
    /**
83
     * Sets the size. Used for arrays (byte, char/string,...)
84
     *
85
     * @param size a size of type int
86
     * @return this
87
     *
88
     */
89
    public EditableFeatureAttributeDescriptor setSize(int size);
91 90

  
92
  /**
93
   * Set the required bytes to store this attribute.
94
   * 
95
   * This value is dependent of the store type.
96
   * 
97
   * @param size
98
   * @return 
99
   */
100
  public EditableFeatureAttributeDescriptor setDisplaySize(int size);
101
  
102
  /**
103
   * Sets the precision
104
   *
105
   * @param precision of type int
106
   *
107
   * @return this
108
   */
109
  public EditableFeatureAttributeDescriptor setPrecision(int precision);
91
    /**
92
     * Set the required bytes to store this attribute.
93
     *
94
     * This value is dependent of the store type.
95
     *
96
     * @param size
97
     * @return
98
     */
99
    public EditableFeatureAttributeDescriptor setDisplaySize(int size);
110 100

  
111
  public EditableFeatureAttributeDescriptor setScale(int scale);
101
    /**
102
     * Sets the precision
103
     *
104
     * @param precision of type int
105
     *
106
     * @return this
107
     */
108
    public EditableFeatureAttributeDescriptor setPrecision(int precision);
112 109

  
113
  /**
114
   * Sets the Class to which the related FeatureAttribute can be cast
115
   *
116
   * @param theClass Class to which the related FeatureAttribute can be cast
117
   * @return this
118
   */
119
  public EditableFeatureAttributeDescriptor setObjectClass(Class theClass);
110
    public EditableFeatureAttributeDescriptor setScale(int scale);
120 111

  
121
  /**
122
   * Sets the number of minimum occurrences
123
   *
124
   * @param minimumOccurrences
125
   *
126
   * @return this
127
   */
128
  public EditableFeatureAttributeDescriptor setMinimumOccurrences(
129
          int minimumOccurrences);
112
    /**
113
     * Sets the Class to which the related FeatureAttribute can be cast
114
     *
115
     * @param theClass Class to which the related FeatureAttribute can be cast
116
     * @return this
117
     */
118
    public EditableFeatureAttributeDescriptor setObjectClass(Class theClass);
130 119

  
131
  /**
132
   * Sets the maximum number of occurrences
133
   *
134
   * @param maximumOccurrences
135
   *
136
   * @return
137
   */
138
  public EditableFeatureAttributeDescriptor setMaximumOccurrences(
139
          int maximumOccurrences);
120
    /**
121
     * Sets the number of minimum occurrences
122
     *
123
     * @param minimumOccurrences
124
     *
125
     * @return this
126
     */
127
    public EditableFeatureAttributeDescriptor setMinimumOccurrences(
128
            int minimumOccurrences);
140 129

  
141
  /**
142
   * Sets whether the related FeatureAttribute is part of the FeatureType's
143
   * primary key
144
   *
145
   * @param isPrimaryKey true if is part of the primary key
146
   * @return this
147
   */
148
  public EditableFeatureAttributeDescriptor setIsPrimaryKey(
149
          boolean isPrimaryKey);
130
    /**
131
     * Sets the maximum number of occurrences
132
     *
133
     * @param maximumOccurrences
134
     *
135
     * @return
136
     */
137
    public EditableFeatureAttributeDescriptor setMaximumOccurrences(
138
            int maximumOccurrences);
150 139

  
151
  /**
152
   * Sets the expression evaluator that the FeatureAttribute will use
153
   *
154
   * @param evaluator an implementation of DAL's Evaluator interface
155
   * @return this
156
   */
157
  public EditableFeatureAttributeDescriptor setEvaluator(Evaluator evaluator);
140
    /**
141
     * Sets whether the related FeatureAttribute is part of the FeatureType's
142
     * primary key
143
     *
144
     * @param isPrimaryKey true if is part of the primary key
145
     * @return this
146
     */
147
    public EditableFeatureAttributeDescriptor setIsPrimaryKey(
148
            boolean isPrimaryKey);
158 149

  
159
  public EditableFeatureAttributeDescriptor setAvoidCachingAvailableValues(boolean avoidCachingAvailableValues);
160
  
161
  /**
162
   * Sets the {@link FeatureAttributeEmulator} that is used to update the
163
   * presentation of a field.
164
   *
165
   * @param featureAttributeEmulator the {@link FeatureAttributeEmulator} to
166
   * set.
167
   * @return
168
   */
169
  public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(FeatureAttributeEmulator featureAttributeEmulator);
150
    /**
151
     * Sets the expression evaluator that the FeatureAttribute will use
152
     *
153
     * @param evaluator an implementation of DAL's Evaluator interface
154
     * @return this
155
     */
156
    public EditableFeatureAttributeDescriptor setEvaluator(Evaluator evaluator);
170 157

  
171
  public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(Expression expression);
158
    public EditableFeatureAttributeDescriptor setAvoidCachingAvailableValues(boolean avoidCachingAvailableValues);
172 159

  
173
  public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(String expression);
160
    /**
161
     * Sets the {@link FeatureAttributeEmulator} that is used to update the
162
     * presentation of a field.
163
     *
164
     * @param featureAttributeEmulator the {@link FeatureAttributeEmulator} to
165
     * set.
166
     * @return
167
     */
168
    public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(FeatureAttributeEmulator featureAttributeEmulator);
174 169

  
175
  /**
176
   * Sets whether the related FeatureAttribute is read only
177
   *
178
   * @param isReadOnly
179
   *
180
   * @return this
181
   */
182
  public EditableFeatureAttributeDescriptor setIsReadOnly(boolean isReadOnly);
170
    public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(Expression expression);
183 171

  
184
  /**
185
   * Sets whether the related FeatureAttribute can have a null value
186
   *
187
   * @param allowNull a boolean value determining whether the FeatureAttribute
188
   * can be null
189
   *
190
   * @return this
191
   */
192
  public EditableFeatureAttributeDescriptor setAllowNull(boolean allowNull);
172
    public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(String expression);
193 173

  
194
  /**
195
   * Sets the SRS.
196
   *
197
   * @param SRS
198
   *
199
   * @return
200
   */
201
  public EditableFeatureAttributeDescriptor setSRS(IProjection SRS);
174
    /**
175
     * Sets whether the related FeatureAttribute is read only
176
     *
177
     * @param isReadOnly
178
     *
179
     * @return this
180
     */
181
    public EditableFeatureAttributeDescriptor setIsReadOnly(boolean isReadOnly);
202 182

  
203
  public EditableFeatureAttributeDescriptor setSRS(String SRS);
183
    /**
184
     * Sets whether the related FeatureAttribute can have a null value
185
     *
186
     * @param allowNull a boolean value determining whether the FeatureAttribute
187
     * can be null
188
     *
189
     * @return this
190
     */
191
    public EditableFeatureAttributeDescriptor setAllowNull(boolean allowNull);
204 192

  
205
  public EditableFeatureAttributeDescriptor setInterval(Interval interval);
193
    /**
194
     * Sets the SRS.
195
     *
196
     * @param SRS
197
     *
198
     * @return
199
     */
200
    public EditableFeatureAttributeDescriptor setSRS(IProjection SRS);
206 201

  
207
  /**
208
   * Sets the geometry type
209
   *
210
   * @param geometryType
211
   *
212
   * @return this
213
   * @deprecated use {@link #setGeometryType(GeometryType)} instead
214
   */
215
  public EditableFeatureAttributeDescriptor setGeometryType(int geometryType);
202
    public EditableFeatureAttributeDescriptor setSRS(String SRS);
216 203

  
217
  /**
218
   * Sets the geometry subtype
219
   *
220
   * @param geometrySubType
221
   *
222
   * @return this
223
   * @deprecated use {@link #setGeometryType(GeometryType)} instead
224
   */
225
  public EditableFeatureAttributeDescriptor setGeometrySubType(
226
          int geometrySubType);
204
    public EditableFeatureAttributeDescriptor setInterval(Interval interval);
227 205

  
228
  /**
229
   * Sets the geometry type
230
   *
231
   * @param geometryType
232
   *
233
   * @return this
234
   */
235
  public EditableFeatureAttributeDescriptor setGeometryType(
236
          GeometryType geometryType);
206
    /**
207
     * Sets the geometry type
208
     *
209
     * @param geometryType
210
     *
211
     * @return this
212
     * @deprecated use {@link #setGeometryType(GeometryType)} instead
213
     */
214
    public EditableFeatureAttributeDescriptor setGeometryType(int geometryType);
237 215

  
238
  /**
239
   * Sets the geometry type and subtype. The format is:
240
   * <code>{geometryType}{sep}[geometrySubtype}</code> where:
241
   * <ul>
242
   * <li>geometryType is the name of the type of geometry.</li>
243
   * <li>sep is a character from ":/-!;#@".</li>
244
   * <li>geometrySubtype is the name of the subtype of geometry.</li>
245
   * </ul>
246
   *
247
   * @param geometryType
248
   * @return
249
   */
250
  public EditableFeatureAttributeDescriptor setGeometryType(String geometryType);
216
    /**
217
     * Sets the geometry subtype
218
     *
219
     * @param geometrySubType
220
     *
221
     * @return this
222
     * @deprecated use {@link #setGeometryType(GeometryType)} instead
223
     */
224
    public EditableFeatureAttributeDescriptor setGeometrySubType(
225
            int geometrySubType);
251 226

  
252
  public EditableFeatureAttributeDescriptor setGeometryType(int geometryType, int geometrySubType);
227
    /**
228
     * Sets the geometry type
229
     *
230
     * @param geometryType
231
     *
232
     * @return this
233
     */
234
    public EditableFeatureAttributeDescriptor setGeometryType(
235
            GeometryType geometryType);
253 236

  
254
  /**
255
   * Sets the default value
256
   *
257
   * @param defaultValue
258
   *
259
   * @return this
260
   */
261
  public EditableFeatureAttributeDescriptor setDefaultValue(
262
          Object defaultValue);
237
    /**
238
     * Sets the geometry type and subtype. The format is:
239
     * <code>{geometryType}{sep}[geometrySubtype}</code> where:
240
     * <ul>
241
     * <li>geometryType is the name of the type of geometry.</li>
242
     * <li>sep is a character from ":/-!;#@".</li>
243
     * <li>geometrySubtype is the name of the subtype of geometry.</li>
244
     * </ul>
245
     *
246
     * @param geometryType
247
     * @return
248
     */
249
    public EditableFeatureAttributeDescriptor setGeometryType(String geometryType);
263 250

  
264
  /**
265
   * Sets additional information of the attribute
266
   *
267
   * @param infoName
268
   * @param value
269
   * @return
270
   */
271
  public EditableFeatureAttributeDescriptor setAdditionalInfo(String infoName, String value);
272
  
273
  @Deprecated
274
  public EditableFeatureAttributeDescriptor setAdditionalInfo(String infoName, Object value);
251
    public EditableFeatureAttributeDescriptor setGeometryType(int geometryType, int geometrySubType);
275 252

  
276
  /**
277
   * Sets whether the related FeatureAttribute is part of the FeatureType's
278
   * primary key
279
   *
280
   * @param isAutomatic true if is part of the primary key
281
   * @return this
282
   */
283
  public EditableFeatureAttributeDescriptor setIsAutomatic(boolean isAutomatic);
253
    /**
254
     * Sets the default value
255
     *
256
     * @param defaultValue
257
     *
258
     * @return this
259
     */
260
    public EditableFeatureAttributeDescriptor setDefaultValue(
261
            Object defaultValue);
284 262

  
285
  /**
286
   * Sets is the attribute is a temporal attribute.
287
   *
288
   * @param isTime <code>true</code> if the attribute is temporal
289
   * @return this
290
   */
291
  public EditableFeatureAttributeDescriptor setIsTime(boolean isTime);
263
    /**
264
     * Sets additional information of the attribute
265
     *
266
     * @param infoName
267
     * @param value
268
     * @return
269
     */
270
    public EditableFeatureAttributeDescriptor setAdditionalInfo(String infoName, String value);
292 271

  
293
  /**
294
   * Sets if this attribute is indexed in the table.
295
   *
296
   * @param isIndexed
297
   * @return this
298
   */
299
  public EditableFeatureAttributeDescriptor setIsIndexed(boolean isIndexed);
272
    @Deprecated
273
    public EditableFeatureAttributeDescriptor setAdditionalInfo(String infoName, Object value);
300 274

  
301
  public EditableFeatureAttributeDescriptor setAllowIndexDuplicateds(boolean allowDuplicateds);
275
    /**
276
     * Sets whether the related FeatureAttribute is part of the FeatureType's
277
     * primary key
278
     *
279
     * @param isAutomatic true if is part of the primary key
280
     * @return this
281
     */
282
    public EditableFeatureAttributeDescriptor setIsAutomatic(boolean isAutomatic);
302 283

  
303
  public EditableFeatureAttributeDescriptor setIsIndexAscending(boolean ascending);
284
    /**
285
     * Sets is the attribute is a temporal attribute.
286
     *
287
     * @param isTime <code>true</code> if the attribute is temporal
288
     * @return this
289
     */
290
    public EditableFeatureAttributeDescriptor setIsTime(boolean isTime);
304 291

  
305
  /**
306
   * Returns the attribute descriptor's name before it was changed or null if
307
   * never changed
308
   *
309
   * @return
310
   */
311
  public String getOriginalName();
292
    /**
293
     * Sets if this attribute is indexed in the table.
294
     *
295
     * @param isIndexed
296
     * @return this
297
     */
298
    public EditableFeatureAttributeDescriptor setIsIndexed(boolean isIndexed);
312 299

  
313
  /**
314
   * If this attribute is of type Date, then this method set the date format set
315
   * by the data store.
316
   *
317
   * @param dateFormat
318
   * @return
319
   */
320
  public EditableFeatureAttributeDescriptor setDateFormat(DateFormat dateFormat);
300
    public EditableFeatureAttributeDescriptor setAllowIndexDuplicateds(boolean allowDuplicateds);
321 301

  
322
  public EditableFeatureAttributeDescriptor set(String name, Object value);
302
    public EditableFeatureAttributeDescriptor setIsIndexAscending(boolean ascending);
323 303

  
324
  public EditableFeatureAttributeDescriptor setRoundMode(int roundMode);
304
    /**
305
     * Returns the attribute descriptor's name before it was changed or null if
306
     * never changed
307
     *
308
     * @return
309
     */
310
    public String getOriginalName();
325 311

  
326
  public EditableFeatureAttributeDescriptor setLocale(Locale locale);
312
    /**
313
     * If this attribute is of type Date, then this method set the date format
314
     * set by the data store.
315
     *
316
     * @param dateFormat
317
     * @return
318
     */
319
    public EditableFeatureAttributeDescriptor setDateFormat(DateFormat dateFormat);
327 320

  
321
    public EditableFeatureAttributeDescriptor set(String name, Object value);
322

  
323
    public EditableFeatureAttributeDescriptor setRoundMode(int roundMode);
324

  
325
    public EditableFeatureAttributeDescriptor setLocale(Locale locale);
326

  
327
    public EditableFeatureAttributeDescriptor setForeingkey(
328
            boolean isForeingkey,
329
            boolean isClosedList,
330
            String tableName,
331
            String codeName,
332
            String labelFormula
333
    );
334
    
335
    public EditableFeatureAttributeDescriptor setTag(String name, Object value);
336
    
328 337
}

Also available in: Unified diff