Revision 44435 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/DefaultFeatureType.java

View differences:

DefaultFeatureType.java
553 553
                .toArray(new FeatureAttributeDescriptor[super.size()]);
554 554
    }
555 555

  
556
    @Override
557
    public boolean hasPrimaryKey() {
558
        if( pk!=null ) {
559
            return pk.length>0;
560
        }
561
        for (FeatureAttributeDescriptor attr : this) {
562
            if( attr.isPrimaryKey() ) {
563
                return true;
564
            }
565
        }
566
        return false;
567
    }
568

  
569
    @Override
570
    public boolean supportReferences() {
571
        return this.hasOID() || this.hasPrimaryKey();
572
    }
573
    
574
    @Override
556 575
    public FeatureAttributeDescriptor[] getPrimaryKey() {
557 576
        if (pk == null) {
558 577
            List pks = new ArrayList();

Also available in: Unified diff