Revision 45991
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java | ||
---|---|---|
184 | 184 |
this.dataType = null; |
185 | 185 |
this.dateFormat = null; |
186 | 186 |
this.defaultValue = null; |
187 |
this.defaultFormat = null; |
|
187 | 188 |
this.index = -1; |
188 | 189 |
this.maximumOccurrences = 0; |
189 | 190 |
this.minimumOccurrences = 0; |
... | ... | |
227 | 228 |
this.dataType = other.dataType; |
228 | 229 |
this.dateFormat = other.dateFormat; |
229 | 230 |
this.defaultValue = other.defaultValue; |
231 |
this.defaultFormat = other.defaultFormat; |
|
230 | 232 |
this.index = other.index; |
231 | 233 |
this.maximumOccurrences = other.maximumOccurrences; |
232 | 234 |
this.minimumOccurrences = other.minimumOccurrences; |
... | ... | |
619 | 621 |
if (!Objects.equals(this.defaultValue, other.defaultValue)) { |
620 | 622 |
return false; |
621 | 623 |
} |
624 |
if (!Objects.equals(this.defaultFormat, other.defaultFormat)) { |
|
625 |
return false; |
|
626 |
} |
|
622 | 627 |
|
623 | 628 |
if (this.primaryKey != other.primaryKey) { |
624 | 629 |
return false; |
... | ... | |
2335 | 2340 |
@Override |
2336 | 2341 |
public String format(Object value) { |
2337 | 2342 |
try { |
2338 |
if( this.defaultFormat == null ) {
|
|
2343 |
if( StringUtils.isBlank(this.defaultFormat)) {
|
|
2339 | 2344 |
return DataTypeUtils.toString(value, Objects.toString(value, "")); |
2340 | 2345 |
} |
2341 | 2346 |
return String.format(this.defaultFormat, value); |
Also available in: Unified diff