Exemplo n.º 1
0
 public Collection batchSave(Collection coll) throws DBLevelException {
   Connection conn = null;
   try {
     conn = DBPower.getConnection(table.getId());
     return batchSave(conn, coll);
   } finally {
     DBUtil.close(conn);
   }
 }
Exemplo n.º 2
0
 public int[] batchSave(Object[] os) throws DBLevelException {
   Connection conn = null;
   try {
     conn = DBPower.getConnection(table.getId());
     return batchSave(conn, os);
   } finally {
     DBUtil.close(conn);
   }
 }
Exemplo n.º 3
0
 public void save(Object o) throws EntityExistException, DBLevelException {
   Connection conn = null;
   try {
     conn = DBPower.getConnection(table.getId());
     save(conn, o);
   } finally {
     DBUtil.close(conn);
   }
 }
Exemplo n.º 4
0
 public void delete(WhereElement emt, Object o) {
   Connection conn = null;
   try {
     conn = DBPower.getConnection(table.getId());
     delete(conn, emt, o);
   } finally {
     DBUtil.close(conn);
   }
 }
Exemplo n.º 5
0
 public void deleteByIdColumns(Object o) {
   Connection conn = null;
   try {
     conn = DBPower.getConnection(table.getId());
     deleteByIdColumns(conn, o);
   } finally {
     DBUtil.close(conn);
   }
 }
  /**
   * @param idColumns
   * @param multiValueTables
   * @return
   */
  private TableDeletorImpl[] getMultiValueTableDeletors(Table[] tables, ComplexTable complexTable) {
    TableDeletorImpl[] impls = null;
    if (tables != null) {
      impls = new TableDeletorImpl[tables.length];
      for (int i = 0; i < tables.length; i++) {
        TableDeletorImpl impl = new TableDeletorImpl();
        Table multiValueTable = tables[i];
        Table newTable = new Table();
        newTable.setId(multiValueTable.getId());
        newTable.setName(multiValueTable.getName());
        newTable.setIdColumnNames(complexTable.getMainTable().getIdColumnNames());
        newTable.setIdColumns(complexTable.getMainTable().getIdColumns());

        impl.setTable(newTable);
        impls[i] = impl;
      }
    }

    return impls;
  }