Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. Ebean.execute(new TxRunnable() {
  2.  
  3.     @Override
  4.     public void run() {
  5.         for (TeamRankTable table : teamRankTables) {
  6.             if (table.createdOrEditBy != null
  7.                     && table.createdOrEditBy.equals(SYSTEM_FLAG)) {
  8.                 table.delete();
  9.             }
  10.         }
  11.  
  12.         for (PersonTable table : personTables) {
  13.             if (table.createdOrEditBy != null
  14.                     && table.createdOrEditBy.equals(SYSTEM_FLAG)) {
  15.                 table.delete();
  16.             }
  17.         }
  18.  
  19.         for (MatchTable table : matchTables) {
  20.             if (table.createdOrEditBy != null
  21.                     && table.createdOrEditBy.equals(SYSTEM_FLAG)) {
  22.                 table.delete();
  23.             }
  24.         }
  25.  
  26.         for (PersonParticipationTable table : personParticipationTables) {
  27.             if (table.createdOrEditBy != null
  28.                     && table.createdOrEditBy.equals(SYSTEM_FLAG)) {
  29.                 table.delete();
  30.             }
  31.         }
  32.  
  33.         Ebean.createSqlUpdate(
  34.                 "DELETE FROM TEAM_RANK_TUPLE  WHERE ID = ID").execute();
  35.         Ebean.createSqlUpdate("DELETE FROM PERSON_TUPLE WHERE ID = ID")
  36.                 .execute();
  37.         Ebean.createSqlUpdate(
  38.                 "DELETE FROM PERSON_PARTICIPATION_TUPLE WHERE ID = ID")
  39.                 .execute();
  40.     }
  41. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement