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

Public Member Functions

boolean itsMine (Object entity)
 
- Public Member Functions inherited from org.turro.matching.ProcessMatching< Contact >
void startProcess ()
 
void startProcessFor (Object entity)
 
void process (Stream< T > stream, List< IndicatorVariable > variables)
 
void processFor (T entity, List< IndicatorVariable > variables)
 
Object createInstance ()
 
void poolInstance (Object value)
 
void finishPreprocessor ()
 
String tableName ()
 

Static Public Member Functions

static void cleanHomonyms ()
 

Protected Member Functions

void start ()
 
void end ()
 
List< String > getSelectedPaths ()
 
Stream< ContactgetEntityStream ()
 
IMatching createMatchingInstance ()
 
Class instanceClass ()
 
String indicatorsRoot ()
 
String entitiesRoot ()
 
String relatedRoot ()
 
Dao createDao ()
 
- Protected Member Functions inherited from org.turro.matching.ProcessMatching< Contact >
IMatching process (T entity, String relatedPath, IndicatorVariable variable)
 
void start ()
 
void end ()
 
void truncate ()
 
List< String > getSelectedPaths ()
 
void prepareProcess (List< IndicatorVariable > variables)
 
void postProcess (List< IndicatorVariable > variables)
 
void prepareEntity (T entity)
 
double calculate (MatchingSet set)
 
IMatching createMatchingInstance (String entityPath, String relatedPath, IndicatorVariable variable)
 
abstract IMatching createMatchingInstance ()
 
abstract Stream< T > getEntityStream ()
 
abstract Class instanceClass ()
 
abstract String indicatorsRoot ()
 
abstract String entitiesRoot ()
 
abstract String relatedRoot ()
 
abstract Dao createDao ()
 
Dao getDao ()
 

Detailed Description

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

Definition at line 42 of file ProcessHomonymsMatching.java.

Member Function Documentation

◆ cleanHomonyms()

static void org.turro.matching.ProcessHomonymsMatching.cleanHomonyms ( )
static

Definition at line 223 of file ProcessHomonymsMatching.java.

223  {
224  Threads.instance("Clear homonyms").start(() -> {
225  Dao dao = new ContactsPU();
226  SqlClause.delete("HomonymsMatching")
227  .where().notExists(
228  SqlClause.select("*").from("Contact c")
229  .where("c.identifier = SUBSTRING(entityPath , 10)")
230  .and().isFalse("c.deactivated")
231  .and().isFalse("c.inactive"))
232  .dao(dao)
233  .executeNative();
234  SqlClause.delete("HomonymsMatching")
235  .where().notExists(
236  SqlClause.select("*").from("Contact c")
237  .where("c.identifier = SUBSTRING(relatedPath , 10)")
238  .and().isFalse("c.deactivated")
239  .and().isFalse("c.inactive"))
240  .dao(dao)
241  .executeNative();
242  });
243  //"where not exists (\n" +
244  //" select * from Contact c \n" +
245  //" where c.IDENTIFIER = SUBSTRING(entityPath , 10)\n" +
246  //" and c.deactivated = FALSE and c.inactive = false \n" +
247  //");"
248  //"delete FROM pool01_contacts.HomonymsMatching\n" +
249  //"where not exists (\n" +
250  //" select * from Contact c \n" +
251  //" where c.IDENTIFIER = SUBSTRING(relatedPath , 10)\n" +
252  //" and c.deactivated = FALSE and c.inactive = false \n" +
253  //");"
254  }
Here is the caller graph for this function:

◆ createDao()

Dao org.turro.matching.ProcessHomonymsMatching.createDao ( )
protected

Definition at line 99 of file ProcessHomonymsMatching.java.

99  {
100  return new ContactsPU();
101  }
Here is the caller graph for this function:

◆ createMatchingInstance()

IMatching org.turro.matching.ProcessHomonymsMatching.createMatchingInstance ( )
protected

Definition at line 74 of file ProcessHomonymsMatching.java.

74  {
75  return new HomonymsMatching();
76  }

◆ end()

void org.turro.matching.ProcessHomonymsMatching.end ( )
protected

Definition at line 55 of file ProcessHomonymsMatching.java.

55  {
56  super.end();
57  selectedPaths = null;
58  }

◆ entitiesRoot()

String org.turro.matching.ProcessHomonymsMatching.entitiesRoot ( )
protected

Definition at line 89 of file ProcessHomonymsMatching.java.

89  {
90  return "contact";
91  }

◆ getEntityStream()

Stream<Contact> org.turro.matching.ProcessHomonymsMatching.getEntityStream ( )
protected

Definition at line 66 of file ProcessHomonymsMatching.java.

66  {
67  WhereClause wc = new WhereClause();
68  wc.addClause("select c from Contact c");
69  wc.addIn("where", "c.id", selectedPaths.getIdList());
70  return createDao().stream(Contact.class, wc);
71  }
Here is the call graph for this function:

◆ getSelectedPaths()

List<String> org.turro.matching.ProcessHomonymsMatching.getSelectedPaths ( )
protected

Definition at line 61 of file ProcessHomonymsMatching.java.

61  {
62  return selectedPaths.getPathList();
63  }

◆ indicatorsRoot()

String org.turro.matching.ProcessHomonymsMatching.indicatorsRoot ( )
protected

Definition at line 84 of file ProcessHomonymsMatching.java.

84  {
85  return "contact";
86  }

◆ instanceClass()

Class org.turro.matching.ProcessHomonymsMatching.instanceClass ( )
protected

Definition at line 79 of file ProcessHomonymsMatching.java.

79  {
80  return HomonymsMatching.class;
81  }

◆ itsMine()

boolean org.turro.matching.ProcessHomonymsMatching.itsMine ( Object  entity)

Definition at line 104 of file ProcessHomonymsMatching.java.

104  {
105  return entity instanceof Contact;
106  }

◆ relatedRoot()

String org.turro.matching.ProcessHomonymsMatching.relatedRoot ( )
protected

Definition at line 94 of file ProcessHomonymsMatching.java.

94  {
95  return "contact";
96  }

◆ start()

void org.turro.matching.ProcessHomonymsMatching.start ( )
protected

Definition at line 47 of file ProcessHomonymsMatching.java.

47  {
48  super.start();
49  selectedPaths = new PathSet();
50  selectPaths();
51  checkGeolocation();
52  }

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