Revision 44764 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/DefaultFeatureExtraColumn.java
DefaultFeatureExtraColumn.java | ||
---|---|---|
19 | 19 |
*/ |
20 | 20 |
public class DefaultFeatureExtraColumn implements FeatureExtraColumn { |
21 | 21 |
|
22 |
private List<EditableFeatureAttributeDescriptor> extraColumns; |
|
22 |
private final List<EditableFeatureAttributeDescriptor> extraColumns; |
|
23 |
|
|
23 | 24 |
public DefaultFeatureExtraColumn() { |
24 | 25 |
this.extraColumns = new ArrayList(); |
25 | 26 |
} |
27 |
|
|
26 | 28 |
@Override |
29 |
public boolean isEmpty() { |
|
30 |
return this.extraColumns.isEmpty(); |
|
31 |
} |
|
32 |
|
|
33 |
@Override |
|
27 | 34 |
public EditableFeatureAttributeDescriptor get(String columnName) { |
28 | 35 |
for (EditableFeatureAttributeDescriptor extraColumn : this.extraColumns) { |
29 | 36 |
if (StringUtils.equals(extraColumn.getName(), columnName)) { |
... | ... | |
37 | 44 |
public EditableFeatureAttributeDescriptor add(String name) { |
38 | 45 |
//TODO que no hayan dos columnas iguales |
39 | 46 |
// exi.addExtraColumn() |
40 |
EditableFeatureAttributeDescriptor newAttr = DALLocator.getDataManager().createFeatureAttributeDescriptor();
|
|
47 |
EditableFeatureAttributeDescriptor newAttr = new DefaultEditableFeatureAttributeDescriptor(null, false);
|
|
41 | 48 |
newAttr.setName(name); |
42 | 49 |
extraColumns.add(newAttr); |
43 | 50 |
return newAttr; |
Also available in: Unified diff