Revision 46032 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCStoreProviderBase.java

View differences:

JDBCStoreProviderBase.java
593 593
        return true;
594 594
    }
595 595

  
596
    protected AppendOperation getAppendOperation() throws DataException {
597
        if( this.appendOperation == null ) {
598
            FeatureType type = this.getFeatureStore().getDefaultFeatureType();
599
            JDBCStoreParameters params = this.getParameters();
600
            this.appendOperation = this.getOperations().createAppend(
596
    protected AppendOperation createAppendOperation() throws DataException {
597
        FeatureType type = this.getFeatureStore().getDefaultFeatureType();
598
        JDBCStoreParameters params = this.getParameters();
599
        AppendOperation theAppendOperation = this.getOperations().createAppend(
601 600
                this.getOperations().createTableReference(params),
602 601
                type 
603
            );
604
        }
605
        return this.appendOperation;
602
        );
603
        return theAppendOperation;
606 604
    }
607 605
    
608 606
    @Override
609 607
    public void endAppend() throws DataException {
610
        this.getAppendOperation().end();
608
        this.appendOperation.end();
611 609
    }
612 610

  
613 611
    @Override
614 612
    public void abortAppend() throws DataException {
615
        this.getAppendOperation().abort();
613
        this.appendOperation.abort();
616 614
    }
617 615
    
618 616
    @Override
619 617
    public void beginAppend() throws DataException {
620
        this.getAppendOperation().begin();
618
        if( this.appendOperation == null ) {
619
            this.appendOperation = createAppendOperation();
620
        }
621
        this.appendOperation.begin();
621 622
    }
622 623

  
623 624
    @Override
624 625
    public void append(final FeatureProvider featureProvider) throws DataException {
625
        this.getAppendOperation().append(featureProvider);
626
        this.appendOperation.append(featureProvider);
626 627
    }    
627 628
    
628 629
    @Override
......
714 715
            return super.toString();
715 716
        }
716 717
    }
718

  
719
    @Override
720
    public void refresh() throws OpenException {
721
//        // Force to recalculare count, envelope and allowWrite
722
//        this.count = null;
723
//        this.envelope = null;
724
//        this.allowWrite = null;
725
//        
726
//        if( this.helper.getResulSetControler().getOpenCount()>0 ) {
727
//            // Has ResultSetEntry open. Oh!!!!
728
//            this.helper.getResulSetControler().closeAll();
729
//        }
730
//        if( this.appendOperation!=null ) {
731
//            // Has and append operation in progress, Oh!!
732
//            this.appendOperation.abort();
733
//            this.appendOperation = null;
734
//        }
735
        super.refresh(); 
736
    }
717 737
    
718
    
719 738
}

Also available in: Unified diff