Revision 39083 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java

View differences:

DefaultFeatureAttributeDescriptor.java
17 17
import org.gvsig.fmap.geom.GeometryLocator;
18 18
import org.gvsig.fmap.geom.type.GeometryType;
19 19
import org.gvsig.tools.ToolsLocator;
20
import org.gvsig.tools.dataTypes.CoercionException;
20 21
import org.gvsig.tools.dataTypes.DataType;
21 22
import org.gvsig.tools.dataTypes.DataTypes;
22 23
import org.gvsig.tools.dynobject.DynField;
......
503 504
    }
504 505

  
505 506
    public void validate(Object value) throws DynFieldValidateException {
506
        // Do nothing
507
        
508
        if (value == null && !this.allowNull()) {
509
            throw new DynFieldValidateException(value, this, null);
510
        }
511
        
512
        try {
513
            this.dataType.coerce(value);
514
        } catch (CoercionException e) {
515
            throw new DynFieldValidateException(value, this, e);
516
        }
517
        
518
        /*
519
         * Other checks will be needed
520
         */
507 521
    }
508 522

  
509 523
    public String getSubtype() {

Also available in: Unified diff