Revision 47606 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataTransaction.java

View differences:

DataTransaction.java
38 38
        }
39 39
        transaction.rollbackQuietly();
40 40
    }
41
    
41

  
42
    public static void close(DataTransaction transaction) {
43
        if( transaction == null ) {
44
            return;
45
        }
46
        try {
47
            transaction.close();
48
        } catch (RuntimeException ex) {
49
            throw ex;
50
        } catch (Exception ex) {
51
            //Por aqu? no deber?a pasar
52
            throw new RuntimeException("Can't close transaction", ex);
53
        }
54
    }
55

  
56
    public static void add(DataTransaction transaction, DataServerExplorer explorer) throws DataException {
57
        if (transaction == null) {
58
            return;
59
        }
60
        transaction.add(explorer);
61
    }
62

  
63
    public static void add(DataTransaction transaction, DataServerExplorer explorer, boolean local) throws DataException {
64
        if (transaction == null) {
65
            return;
66
        }
67
        transaction.add(explorer, local);
68
    }
69

  
70
    public static void add(DataTransaction transaction, FeatureStore store, boolean local) throws DataException {
71
        if (transaction == null) {
72
            return;
73
        }
74
        transaction.add(store, local);
75
    }
76

  
42 77
    public String getCode();
43
    
78

  
44 79
    public void begin() throws DataException;
45
    
80

  
46 81
    public void commit() throws DataException;
47 82
    
48 83
    public void rollback() throws DataException;
......
70 105
    public void add(DataStore store, String id);
71 106

  
72 107
    public void add(DataStore store, String id, boolean local);
108
    
109
    public void add(SupportTransactions obj, boolean local) throws DataException;
73 110

  
74 111
    public void remove(DataStore store) throws DataException;
75 112

  

Also available in: Unified diff