BrightSide Workbench Full Report + Source Code
org.turro.intouch.InTouchUtil Class Reference

Static Public Member Functions

static void addInTouch (InTouch inTouch)
 
static void addInTouch (Object entity, String name, Date control, Contact contact, Address address, String description)
 
static void addInTouch (String path, String name, Date control, Contact contact, Address address, String description)
 
static void removeInTouch (Object entity, String name)
 
static void removeInTouch (String path, String name)
 
static void removeInTouch (InTouch inTouch)
 
static void removeInTouchs (Object entity)
 
static void removeInTouchs (String path)
 
static Collection< InTouchinTouch (Object entity)
 
static Collection< InTouchinTouch (String path)
 
static Collection< String > inTouchChoices (Object entity)
 
static Collection< String > inTouchChoices (String path)
 

Detailed Description

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

Definition at line 36 of file InTouchUtil.java.

Member Function Documentation

◆ addInTouch() [1/3]

static void org.turro.intouch.InTouchUtil.addInTouch ( InTouch  inTouch)
static

Definition at line 38 of file InTouchUtil.java.

38  {
39  if(!inTouch.isEmpty()) {
40  Dao dao = new ContactsPU();
41  dao.saveObject(inTouch);
42  }
43  }
static Collection< InTouch > inTouch(Object entity)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addInTouch() [2/3]

static void org.turro.intouch.InTouchUtil.addInTouch ( Object  entity,
String  name,
Date  control,
Contact  contact,
Address  address,
String  description 
)
static

Definition at line 45 of file InTouchUtil.java.

46  {
47  String path = Entities.getController(entity).getPath();
48  if(path != null) {
49  addInTouch(path, name, control, contact, address, description);
50  }
51  }
static void addInTouch(InTouch inTouch)
Here is the call graph for this function:

◆ addInTouch() [3/3]

static void org.turro.intouch.InTouchUtil.addInTouch ( String  path,
String  name,
Date  control,
Contact  contact,
Address  address,
String  description 
)
static

Definition at line 53 of file InTouchUtil.java.

54  {
55  if(!Strings.isBlank(path)) {
56  removeInTouch(path, name);
57  Dao dao = new ContactsPU();
58  InTouch inTouch = new InTouch();
59  inTouch.setPath(path);
60  inTouch.setName(name);
61  inTouch.setControl(control);
62  inTouch.setContact(contact);
63  inTouch.setAddress(address);
64  inTouch.setDescription(description);
65  dao.saveObject(inTouch);
66  }
67  }
static void removeInTouch(Object entity, String name)
Here is the call graph for this function:

◆ inTouch() [1/2]

static Collection<InTouch> org.turro.intouch.InTouchUtil.inTouch ( Object  entity)
static

Definition at line 107 of file InTouchUtil.java.

107  {
108  String path = Entities.getController(entity).getPath();
109  if(path != null) {
110  return inTouch(path);
111  }
112  return new ArrayList<InTouch>();
113  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ inTouch() [2/2]

static Collection<InTouch> org.turro.intouch.InTouchUtil.inTouch ( String  path)
static

Definition at line 115 of file InTouchUtil.java.

115  {
116  Dao dao = new ContactsPU();
117  return dao.getResultList(
118  " select it from InTouch as it " +
119  " where it.path = ? " +
120  " order by it.name ",
121  new Object[] { path }
122  );
123  }

◆ inTouchChoices() [1/2]

static Collection<String> org.turro.intouch.InTouchUtil.inTouchChoices ( Object  entity)
static

Definition at line 125 of file InTouchUtil.java.

125  {
126  String path = Entities.getController(entity).getPath();
127  if(path != null) {
128  return inTouchChoices(path);
129  }
130  return new ArrayList<String>();
131  }
static Collection< String > inTouchChoices(Object entity)
Here is the call graph for this function:

◆ inTouchChoices() [2/2]

static Collection<String> org.turro.intouch.InTouchUtil.inTouchChoices ( String  path)
static

Definition at line 133 of file InTouchUtil.java.

133  {
134  Dao dao = new ContactsPU();
135  return dao.getResultList(
136  " select distinct name from InTouch " +
137  " where path <> ? " +
138  " order by it.name ",
139  new Object[] { path }
140  );
141  }

◆ removeInTouch() [1/3]

static void org.turro.intouch.InTouchUtil.removeInTouch ( InTouch  inTouch)
static

Definition at line 86 of file InTouchUtil.java.

86  {
87  Dao dao = new ContactsPU();
88  dao.deleteObject(inTouch);
89  }
Here is the call graph for this function:

◆ removeInTouch() [2/3]

static void org.turro.intouch.InTouchUtil.removeInTouch ( Object  entity,
String  name 
)
static

Definition at line 69 of file InTouchUtil.java.

69  {
70  String path = Entities.getController(entity).getPath();
71  if(path != null) {
72  removeInTouch(path, name);
73  }
74  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeInTouch() [3/3]

static void org.turro.intouch.InTouchUtil.removeInTouch ( String  path,
String  name 
)
static

Definition at line 76 of file InTouchUtil.java.

76  {
77  Dao dao = new ContactsPU();
78  dao.executeUpdate(
79  " delete from InTouch " +
80  " where path = ? " +
81  " and name = ?",
82  new Object[] { path, name }
83  );
84  }
Here is the call graph for this function:

◆ removeInTouchs() [1/2]

static void org.turro.intouch.InTouchUtil.removeInTouchs ( Object  entity)
static

Definition at line 91 of file InTouchUtil.java.

91  {
92  String path = Entities.getController(entity).getPath();
93  if(path != null) {
94  removeInTouchs(path);
95  }
96  }
static void removeInTouchs(Object entity)
Here is the call graph for this function:

◆ removeInTouchs() [2/2]

static void org.turro.intouch.InTouchUtil.removeInTouchs ( String  path)
static

Definition at line 98 of file InTouchUtil.java.

98  {
99  Dao dao = new ContactsPU();
100  dao.executeUpdate(
101  " delete from InTouch " +
102  " where path = ?",
103  new Object[] { path }
104  );
105  }
Here is the call graph for this function:

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