OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 132 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 174
Line 18... Line 18...
18
import org.openconcerto.sql.model.SQLField;
18
import org.openconcerto.sql.model.SQLField;
19
import org.openconcerto.sql.model.SQLRow;
19
import org.openconcerto.sql.model.SQLRow;
20
import org.openconcerto.sql.model.SQLRowAccessor;
20
import org.openconcerto.sql.model.SQLRowAccessor;
21
import org.openconcerto.sql.model.SQLRowListRSH;
21
import org.openconcerto.sql.model.SQLRowListRSH;
22
import org.openconcerto.sql.model.SQLRowValues;
22
import org.openconcerto.sql.model.SQLRowValues;
-
 
23
import org.openconcerto.sql.model.SQLRowValuesCluster.StoreMode;
23
import org.openconcerto.sql.model.SQLSelect;
24
import org.openconcerto.sql.model.SQLSelect;
24
import org.openconcerto.sql.model.SQLSyntax.ConstraintType;
25
import org.openconcerto.sql.model.SQLSyntax.ConstraintType;
25
import org.openconcerto.sql.model.SQLTable;
26
import org.openconcerto.sql.model.SQLTable;
26
import org.openconcerto.sql.model.UndefinedRowValuesCache;
27
import org.openconcerto.sql.model.UndefinedRowValuesCache;
27
import org.openconcerto.sql.model.Where;
28
import org.openconcerto.sql.model.Where;
Line 298... Line 299...
298
            BigDecimal o = table.getMaxOrder(Boolean.FALSE);
299
            BigDecimal o = table.getMaxOrder(Boolean.FALSE);
299
            final int size = rowsToCommmit.size();
300
            final int size = rowsToCommmit.size();
300
            for (int i = 0; i < size; i++) {
301
            for (int i = 0; i < size; i++) {
301
                final SQLRowValues r = rowsToCommmit.get(i);
302
                final SQLRowValues r = rowsToCommmit.get(i);
302
                r.put(r.getTable().getOrderField().getFieldName(), o.add(new BigDecimal(i + 1)));
303
                r.put(r.getTable().getOrderField().getFieldName(), o.add(new BigDecimal(i + 1)));
303
                final SQLRow row = r.commit();
304
                final SQLRow row = r.getGraph().store(StoreMode.COMMIT).getStoredRow(r);
304
                r.setID(row.getIDNumber());
305
                r.setID(row.getIDNumber());
305
            }
306
            }
306
        } catch (SQLException e) {
307
        } catch (SQLException e) {
307
            ExceptionHandler.handle("Unable to commit rows", e);
308
            ExceptionHandler.handle("Unable to commit rows", e);
308
        }
309
        }