Revision 44844 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
DefaultFeatureAttributeDescriptor.java | ||
---|---|---|
35 | 35 |
import java.util.Map; |
36 | 36 |
import java.util.Map.Entry; |
37 | 37 |
import java.util.Objects; |
38 |
import java.util.logging.Level; |
|
39 | 38 |
import org.apache.commons.lang3.ArrayUtils; |
40 | 39 |
import org.apache.commons.lang3.StringUtils; |
41 | 40 |
import org.cresques.cts.IProjection; |
... | ... | |
147 | 146 |
|
148 | 147 |
private int relationType = RELATION_TYPE_NONE; |
149 | 148 |
protected Locale locale; |
149 |
protected int requiredBytes; |
|
150 | 150 |
|
151 | 151 |
public DefaultFeatureAttributeDescriptor() { |
152 | 152 |
// Usada en la persistencia |
... | ... | |
183 | 183 |
this.hidden = false; |
184 | 184 |
this.relationType = RELATION_TYPE_NONE; |
185 | 185 |
this.locale = null; |
186 |
this.requiredBytes = 0; |
|
186 | 187 |
} |
187 | 188 |
|
188 | 189 |
protected DefaultFeatureAttributeDescriptor( |
... | ... | |
271 | 272 |
this.calculateMethod = other.calculateMethod; |
272 | 273 |
this.relationType = other.relationType; |
273 | 274 |
this.locale = other.locale; |
275 |
this.requiredBytes = other.requiredBytes; |
|
274 | 276 |
} |
275 | 277 |
|
276 | 278 |
public void setFeatureType(FeatureType type) { |
... | ... | |
711 | 713 |
order = state.getInt("order"); |
712 | 714 |
hidden = state.getBoolean("hidden"); |
713 | 715 |
groupName = state.getString("groupName"); |
714 |
relationType = state.getInt("relationType"); |
|
716 |
relationType = state.getInt("relationType", RELATION_TYPE_NONE);
|
|
715 | 717 |
|
716 | 718 |
foreingKey = (DefaultForeingKey) state.get("foreingKey"); |
717 | 719 |
if (foreingKey != null) { |
... | ... | |
721 | 723 |
if (tags == null) { |
722 | 724 |
this.tags = new DefaultTags(); |
723 | 725 |
} |
726 |
requiredBytes = state.getInt("requiredBytes",0); |
|
724 | 727 |
} |
725 | 728 |
|
726 | 729 |
@Override |
... | ... | |
810 | 813 |
state.set("foreingKey", this.foreingKey); |
811 | 814 |
state.set("tags", this.tags); |
812 | 815 |
|
816 |
state.set("requiredBytes", requiredBytes); |
|
813 | 817 |
} |
814 | 818 |
|
815 | 819 |
private static final String FEATATTRDESC_PERSISTENCE_DEFINITION_NAME = "FeatureAttributeDescriptor"; |
... | ... | |
875 | 879 |
definition.addDynFieldObject("tags") |
876 | 880 |
.setClassOfValue(Tags.class); |
877 | 881 |
|
882 |
definition.addDynFieldInt("requiredBytes").setMandatory(false); |
|
883 |
|
|
878 | 884 |
} |
879 | 885 |
} |
880 | 886 |
|
... | ... | |
1437 | 1443 |
return this; |
1438 | 1444 |
} |
1439 | 1445 |
|
1446 |
@Override |
|
1447 |
public int getRequiredBytes() { |
|
1448 |
return this.requiredBytes; |
|
1449 |
} |
|
1450 |
|
|
1440 | 1451 |
private class ConstantValueEvaluator extends AbstractEvaluator { |
1441 | 1452 |
|
1442 | 1453 |
@Override |
Also available in: Unified diff