BrightSide Workbench Full Report + Source Code
org.turro.dossier.entity.GrantMatchCriteria Class Reference
Inheritance diagram for org.turro.dossier.entity.GrantMatchCriteria:
Collaboration diagram for org.turro.dossier.entity.GrantMatchCriteria:

Public Member Functions

boolean isHiring ()
 
void setHiring (boolean hiring)
 
boolean isIdi ()
 
void setIdi (boolean idi)
 
boolean isInvestment ()
 
void setInvestment (boolean investment)
 
boolean isStartUp ()
 
void setStartUp (boolean startUp)
 
boolean isFormation ()
 
void setFormation (boolean formation)
 
boolean isEmpty ()
 
List< IElephantEntitygetMatchingsFor (Object entity)
 
List< IElephantEntitygetMatchingsFor (String entityPath)
 
List< IElephantEntitygetMatchingsForDossier (Long dossierId)
 
List< IElephantEntitygetMatchingsForProjectGrant (Long projectGrantId)
 

Detailed Description

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

Definition at line 38 of file GrantMatchCriteria.java.

Member Function Documentation

◆ getMatchingsFor() [1/2]

List<IElephantEntity> org.turro.dossier.entity.GrantMatchCriteria.getMatchingsFor ( Object  entity)

Definition at line 88 of file GrantMatchCriteria.java.

88  {
89  if(isEmpty()) return Collections.EMPTY_LIST;
90  return getMatchingsFor(Entities.getController(entity).getPath());
91  }
List< IElephantEntity > getMatchingsFor(Object entity)
Here is the call graph for this function:

◆ getMatchingsFor() [2/2]

List<IElephantEntity> org.turro.dossier.entity.GrantMatchCriteria.getMatchingsFor ( String  entityPath)

Definition at line 93 of file GrantMatchCriteria.java.

93  {
94  if(isEmpty()) return Collections.EMPTY_LIST;
95  Path path = Path.pathFrom(entityPath);
96  if("dossier".equals(path.getRoot())) {
97  return getMatchingsForDossier(path.getNodeAs(1, Long.class));
98  } else if("project-grant".equals(path.getRoot())) {
99  return getMatchingsForProjectGrant(path.getNodeAs(1, Long.class));
100  }
101  return Collections.EMPTY_LIST;
102  }
List< IElephantEntity > getMatchingsForProjectGrant(Long projectGrantId)
List< IElephantEntity > getMatchingsForDossier(Long dossierId)
Here is the call graph for this function:

◆ getMatchingsForDossier()

List<IElephantEntity> org.turro.dossier.entity.GrantMatchCriteria.getMatchingsForDossier ( Long  dossierId)

Definition at line 104 of file GrantMatchCriteria.java.

104  {
105  WhereClause wc = new WhereClause();
106  wc.addClause("select e from ProjectGrant e");
107  wc.addClause("where (e.recurrent = TRUE or (e.endDate is null or e.endDate > now()))");
108  addMatchCheck(wc);
109  addEmptyCheck(wc);
110  addTagIds(wc, "e.id", "/dossier/" + dossierId, "project-grant");
111  return new EntityListAdapter(new DossierPU().getResultList(wc));
112  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMatchingsForProjectGrant()

List<IElephantEntity> org.turro.dossier.entity.GrantMatchCriteria.getMatchingsForProjectGrant ( Long  projectGrantId)

Definition at line 114 of file GrantMatchCriteria.java.

114  {
115  WhereClause wc = new WhereClause();
116  wc.addClause("select d from Dossier d");
117  wc.addClause("join d.project e");
118  wc.addClause("where 1=1");
119  addMatchCheck(wc);
120  addEmptyCheck(wc);
121  addTagIds(wc, "d.id", "/project-grant/" + projectGrantId, "dossier");
122  return new EntityListAdapter(new DossierPU().getResultList(wc));
123  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.dossier.entity.GrantMatchCriteria.isEmpty ( )

Definition at line 84 of file GrantMatchCriteria.java.

84  {
85  return !(hiring | idi | investment | startUp);
86  }
Here is the caller graph for this function:

◆ isFormation()

boolean org.turro.dossier.entity.GrantMatchCriteria.isFormation ( )

Definition at line 74 of file GrantMatchCriteria.java.

74  {
75  return formation;
76  }
Here is the caller graph for this function:

◆ isHiring()

boolean org.turro.dossier.entity.GrantMatchCriteria.isHiring ( )

Definition at line 42 of file GrantMatchCriteria.java.

42  {
43  return hiring;
44  }
Here is the caller graph for this function:

◆ isIdi()

boolean org.turro.dossier.entity.GrantMatchCriteria.isIdi ( )

Definition at line 50 of file GrantMatchCriteria.java.

50  {
51  return idi;
52  }
Here is the caller graph for this function:

◆ isInvestment()

boolean org.turro.dossier.entity.GrantMatchCriteria.isInvestment ( )

Definition at line 58 of file GrantMatchCriteria.java.

58  {
59  return investment;
60  }
Here is the caller graph for this function:

◆ isStartUp()

boolean org.turro.dossier.entity.GrantMatchCriteria.isStartUp ( )

Definition at line 66 of file GrantMatchCriteria.java.

66  {
67  return startUp;
68  }
Here is the caller graph for this function:

◆ setFormation()

void org.turro.dossier.entity.GrantMatchCriteria.setFormation ( boolean  formation)

Definition at line 78 of file GrantMatchCriteria.java.

78  {
79  this.formation = formation;
80  }

◆ setHiring()

void org.turro.dossier.entity.GrantMatchCriteria.setHiring ( boolean  hiring)

Definition at line 46 of file GrantMatchCriteria.java.

46  {
47  this.hiring = hiring;
48  }

◆ setIdi()

void org.turro.dossier.entity.GrantMatchCriteria.setIdi ( boolean  idi)

Definition at line 54 of file GrantMatchCriteria.java.

54  {
55  this.idi = idi;
56  }

◆ setInvestment()

void org.turro.dossier.entity.GrantMatchCriteria.setInvestment ( boolean  investment)

Definition at line 62 of file GrantMatchCriteria.java.

62  {
63  this.investment = investment;
64  }

◆ setStartUp()

void org.turro.dossier.entity.GrantMatchCriteria.setStartUp ( boolean  startUp)

Definition at line 70 of file GrantMatchCriteria.java.

70  {
71  this.startUp = startUp;
72  }

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