Revision 2087 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dataTypes/impl/DefaultDataType.java
DefaultDataType.java | ||
---|---|---|
80 | 80 |
private int max_precision; |
81 | 81 |
private int default_precision; |
82 | 82 |
private int default_scale; |
83 |
private boolean fixedPrecision;
|
|
83 |
private boolean predefinedPrecision;
|
|
84 | 84 |
|
85 | 85 |
DefaultDataType(int type, String subtype, String name, Class defaultClass, Coercion coercion) { |
86 | 86 |
this(type, subtype, name, defaultClass, coercion, "datatype-any"); |
... | ... | |
109 | 109 |
this.max_precision = max_precision; |
110 | 110 |
this.default_precision = default_precision; |
111 | 111 |
this.default_scale = default_scale; |
112 |
this.fixedPrecision = isFixedPrecision;
|
|
112 |
this.predefinedPrecision = isFixedPrecision;
|
|
113 | 113 |
} |
114 | 114 |
|
115 | 115 |
@Override |
... | ... | |
216 | 216 |
@Override |
217 | 217 |
public void addCoercion(Coercion coercion) { |
218 | 218 |
if (this.coercion == null) { |
219 |
this.setCoercion(coercion);
|
|
219 |
this.coercion = coercion;
|
|
220 | 220 |
return; |
221 | 221 |
} |
222 | 222 |
Coercions coercions; |
... | ... | |
288 | 288 |
precision, |
289 | 289 |
scale |
290 | 290 |
); |
291 |
if( this.fixedPrecision ) {
|
|
291 |
if( this.predefinedPrecision ) {
|
|
292 | 292 |
r.precision = max_precision; |
293 | 293 |
} |
294 | 294 |
if( this.default_scale==NO_SUPPORT_SCALE ) { |
... | ... | |
386 | 386 |
return this.default_scale; |
387 | 387 |
} |
388 | 388 |
|
389 |
public boolean isFixedPrecision() { |
|
390 |
return this.fixedPrecision; |
|
389 |
@Override |
|
390 |
public boolean isPredefinedPrecision() { |
|
391 |
return this.predefinedPrecision; |
|
391 | 392 |
} |
392 | 393 |
} |
Also available in: Unified diff