19 package org.turro.intouch;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.Date;
24 import org.turro.string.Strings;
25 import org.turro.contacts.Address;
26 import org.turro.contacts.Contact;
27 import org.turro.contacts.InTouch;
28 import org.turro.contacts.db.ContactsPU;
29 import org.turro.entities.Entities;
30 import org.turro.jpa.Dao;
45 public static void addInTouch(Object entity, String name, Date control,
49 addInTouch(path, name, control, contact, address, description);
53 public static void addInTouch(String path, String name, Date control,
55 if(!Strings.isBlank(path)) {
64 inTouch.setDescription(description);
79 " delete from InTouch " +
82 new Object[] { path, name }
101 " delete from InTouch " +
103 new Object[] { path }
107 public static Collection<InTouch>
inTouch(Object entity) {
112 return new ArrayList<InTouch>();
115 public static Collection<InTouch>
inTouch(String path) {
117 return dao.getResultList(
118 " select it from InTouch as it " +
119 " where it.path = ? " +
120 " order by it.name ",
121 new Object[] { path }
130 return new ArrayList<String>();
135 return dao.getResultList(
136 " select distinct name from InTouch " +
137 " where path <> ? " +
138 " order by it.name ",
139 new Object[] { path }
static IElephantEntity getController(String path)
static void addInTouch(Object entity, String name, Date control, Contact contact, Address address, String description)
static Collection< InTouch > inTouch(String path)
static void removeInTouchs(String path)
static void removeInTouch(Object entity, String name)
static void removeInTouch(String path, String name)
static void removeInTouchs(Object entity)
static void addInTouch(InTouch inTouch)
static void addInTouch(String path, String name, Date control, Contact contact, Address address, String description)
static Collection< String > inTouchChoices(String path)
static void removeInTouch(InTouch inTouch)
static Collection< String > inTouchChoices(Object entity)
static Collection< InTouch > inTouch(Object entity)
void deleteObject(Object obj)
int executeUpdate(String query)