BrightSide Workbench Full Report + Source Code
org.turro.tags.TagMigration Class Reference
Inheritance diagram for org.turro.tags.TagMigration:
Collaboration diagram for org.turro.tags.TagMigration:

Public Member Functions

void run ()
 

Static Public Member Functions

static void clean ()
 
static void migrate ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file TagMigration.java.

Member Function Documentation

◆ clean()

static void org.turro.tags.TagMigration.clean ( )
static

Definition at line 40 of file TagMigration.java.

40  {
41  WhereClause wc = new WhereClause();
42  wc.addClause("delete from Tag");
43  wc.addClause("where entityPath like '%/null'");
44  new ElephantPU().executeUpdate(wc);
45  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrate()

static void org.turro.tags.TagMigration.migrate ( )
static

Definition at line 47 of file TagMigration.java.

47  {
48  TagMigration migration = new TagMigration(Dao.getDaoByPU("contactsPU"));
49  if(migration.isNecessary()) new Thread(migration, "ElephantTag migration").start();
50  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void org.turro.tags.TagMigration.run ( )

Definition at line 76 of file TagMigration.java.

76  {
77  if(!LOCK.isLocked()) {
78  try {
79  if(LOCK.tryLock(0, TimeUnit.SECONDS)) {
80  try {
81  if(isNecessary()) {
82  start();
83  }
84  } finally {
85  LOCK.unlock();
86  }
87  }
88  } catch (InterruptedException ex) {
89  Logger.getLogger(TagMigration.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
90  }
91  }
92  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: