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

Public Member Functions

String getName ()
 
List< String > getPossibles (String value)
 
void removeOccurrences ()
 
- Public Member Functions inherited from org.turro.occurrence.AbstractOccurrenceAPI< BusinessRelation >
long getCount ()
 
boolean hasOccurrences (String value)
 
List< E > getList ()
 
void changeOccurrences (String newValue)
 
void removeOccurrences ()
 

Protected Member Functions

List< BusinessRelationgetOccurrences (String value)
 
String getValue (BusinessRelation value)
 
void setValue (BusinessRelation value, String newValue)
 
Dao createDao ()
 
- Protected Member Functions inherited from org.turro.occurrence.AbstractOccurrenceAPI< BusinessRelation >
Dao getDao ()
 
abstract Dao createDao ()
 
abstract List< E > getOccurrences (String value)
 
abstract String getValue (E value)
 
abstract void setValue (E value, String newValue)
 

Detailed Description

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

Definition at line 33 of file RelationOccurrenceAPI.java.

Member Function Documentation

◆ createDao()

Dao org.turro.occurrence.RelationOccurrenceAPI.createDao ( )
protected

Definition at line 79 of file RelationOccurrenceAPI.java.

79  {
80  return new ContactsPU();
81  }

◆ getName()

String org.turro.occurrence.RelationOccurrenceAPI.getName ( )

Definition at line 36 of file RelationOccurrenceAPI.java.

36  {
37  return I_.get("Relations");
38  }
Here is the call graph for this function:

◆ getOccurrences()

List<BusinessRelation> org.turro.occurrence.RelationOccurrenceAPI.getOccurrences ( String  value)
protected

Definition at line 60 of file RelationOccurrenceAPI.java.

60  {
61  WhereClause wc = new WhereClause();
62  wc.addClause("select t from BusinessRelation t");
63  wc.addClause("where t.description = :value");
64  wc.addNamedValue("value", value);
65  return getDao().getResultList(BusinessRelation.class, wc);
66  }
Here is the call graph for this function:

◆ getPossibles()

List<String> org.turro.occurrence.RelationOccurrenceAPI.getPossibles ( String  value)

Definition at line 41 of file RelationOccurrenceAPI.java.

41  {
42  WhereClause wc = new WhereClause();
43  wc.addClause("select distinct t.description from BusinessRelation t");
44  wc.setPrefix("where");
45  wc.addLikeFields(new String[] { "t.description" }, value);
46  return getDao().getResultList(String.class, wc);
47  }
Here is the call graph for this function:

◆ getValue()

String org.turro.occurrence.RelationOccurrenceAPI.getValue ( BusinessRelation  value)
protected

Definition at line 69 of file RelationOccurrenceAPI.java.

69  {
70  return value.getDescription();
71  }
Here is the call graph for this function:

◆ removeOccurrences()

void org.turro.occurrence.RelationOccurrenceAPI.removeOccurrences ( )

Definition at line 50 of file RelationOccurrenceAPI.java.

50  {
51  try(DaoTransaction transaction = new DaoTransaction(getDao())) {
52  for(BusinessRelation e : getList()) {
53  e.setDescription(null);
54  transaction.saveObject(e);
55  }
56  }
57  }
Here is the call graph for this function:

◆ setValue()

void org.turro.occurrence.RelationOccurrenceAPI.setValue ( BusinessRelation  value,
String  newValue 
)
protected

Definition at line 74 of file RelationOccurrenceAPI.java.

74  {
75  value.setDescription(newValue);
76  }
Here is the call graph for this function:

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