1 package org.turro.crm.db;
3 import javax.persistence.EntityManager;
4 import javax.persistence.EntityManagerFactory;
5 import org.turro.crm.entity.Campaign;
6 import org.turro.crm.entity.Customer;
7 import org.turro.crm.entity.SaleAction;
8 import org.turro.crm.entity.SaleProspect;
9 import org.turro.crm.entity.Vendor;
10 import org.turro.crm.entity.VendorProspect;
11 import org.turro.jpa.DaoFactory;
12 import org.turro.version.Module;
13 import org.turro.version.Version;
19 public class CrmPU extends org.turro.jpa.Dao {
44 if(
object instanceof
Vendor) {
45 return "/vendor/" + ((
Vendor)
object).getId();
46 }
else if(
object instanceof
Customer) {
47 return "/customer/" + ((
Customer)
object).getId();
48 }
else if(
object instanceof
Campaign) {
49 return "/campaign/" + ((
Campaign)
object).getId();
51 return "/sale-prospect/" + ((
SaleProspect)
object).getId();
55 return "/sale-action/" + ((
SaleAction)
object).getId();
65 return new Module(
new Version(
"0.5.3"),
"BrightSide Customer Relationship");
String getPath(Object object)
static String getObjectPath(Object object)
EntityManager createCachedEntityManager()
static Module getModule()
EntityManager createEntityManager()
static String getObjectExtendedPath(Object object)
EntityManagerFactory getFactory()
EntityManagerFactory getEmf()
EntityManager createEntityManager(String pu, String conf)
synchronized EntityManager createCachedEntityManager(String pu, String conf)