18 package org.turro.contacts.db;
20 import javax.persistence.EntityManager;
21 import javax.persistence.EntityManagerFactory;
22 import org.turro.annotation.ElephantDao;
23 import org.turro.contacts.Address;
24 import org.turro.contacts.BusinessRelation;
25 import org.turro.contacts.Comment;
26 import org.turro.contacts.CommentIt;
27 import org.turro.contacts.Connector;
28 import org.turro.contacts.Contact;
29 import org.turro.contacts.ContactService;
30 import org.turro.contacts.Convocation;
31 import org.turro.contacts.GroupIt;
32 import org.turro.contacts.StarIt;
33 import org.turro.contacts.VoteIt;
34 import org.turro.jpa.Dao;
35 import org.turro.jpa.DaoFactory;
36 import org.turro.version.Module;
37 import org.turro.version.Version;
65 return getObjectPath(
object);
70 return "/contact/" + ((
Contact)
object).getId();
71 }
else if(
object instanceof
Address) {
72 return getObjectPath(((
Address)
object).getContact()) +
"/address/" + ((
Address)
object).getId();
74 return getObjectPath(((
Connector)
object).getContact()) +
"/connector/" + ((
Connector)
object).getId();
75 }
else if(
object instanceof
Comment) {
76 return getObjectPath(((
Comment)
object).getContact()) +
"/comment/" + ((
Comment)
object).getId();
81 }
else if(
object instanceof
GroupIt) {
82 return "/groupit/" + ((
GroupIt)
object).getId();
84 return "/convocation/" + ((
Convocation)
object).getId();
86 return "/comment-it/" + ((
CommentIt)
object).getId();
87 }
else if(
object instanceof
StarIt) {
88 return "/star-it/" + ((
StarIt)
object).getId();
89 }
else if(
object instanceof
VoteIt) {
90 return "/vote-it/" + ((
VoteIt)
object).getId();
96 return new Module(
new Version(
"2.1"),
"BrightSide Contacts");
EntityManagerFactory getEmf()
EntityManager createEntityManager(String pu, String conf)
synchronized EntityManager createCachedEntityManager(String pu, String conf)