19 package org.turro.elephant.db;
21 import javax.persistence.EntityManager;
22 import javax.persistence.EntityManagerFactory;
23 import org.turro.action.IElephantCloseable;
24 import org.turro.annotation.ElephantCloseable;
25 import org.turro.elephant.entities.db.EntityParticipation;
26 import org.turro.elephant.entities.db.Poll;
27 import org.turro.elephant.entities.db.Post;
28 import org.turro.elephant.entities.db.Topic;
29 import org.turro.jpa.Dao;
30 import org.turro.jpa.DaoFactory;
31 import org.turro.version.Module;
32 import org.turro.version.Version;
64 if(
object instanceof
Poll) {
65 return "/poll/" + ((
Poll)
object).getId();
66 }
else if(
object instanceof
Topic) {
67 return "/topic/" + ((
Topic)
object).getId();
68 }
else if(
object instanceof
Post) {
69 return "/post/" + ((
Post)
object).getId();
77 return new Module(
new Version(
"0"),
"Elephant");
EntityManagerFactory getFactory()
EntityManager createEntityManager()
String getPath(Object object)
static Module getModule()
static String getObjectPath(Object object)
EntityManager createCachedEntityManager()
EntityManagerFactory getEmf()
EntityManager createEntityManager(String pu, String conf)
synchronized EntityManager createCachedEntityManager(String pu, String conf)