18 package org.turro.publication.db;
20 import java.util.List;
21 import javax.persistence.EntityManager;
22 import javax.persistence.EntityManagerFactory;
23 import org.turro.string.Strings;
24 import org.turro.action.queue.NotificationCategory;
25 import org.turro.elephant.db.WhereClause;
26 import org.turro.jpa.Dao;
27 import org.turro.jpa.DaoFactory;
28 import org.turro.jpa.entity.EntityWebUrls;
29 import org.turro.publication.entity.Newsletter;
30 import org.turro.publication.entity.Publication;
31 import org.turro.publication.entity.PublicationCategory;
32 import org.turro.version.Module;
33 import org.turro.version.Version;
65 return "/publication/" + ((
Publication)
object).getId();
69 return "/newsletter/" + ((
Newsletter)
object).getId();
84 return new Module(
new Version(
"1.5.0"),
"BrightSide Publication");
91 wc.
addClause(
"select p.id from Publication as p");
92 List<Long> list = (List<Long>) dao.getResultList(wc);
100 "/" + p.
getId() +
"/" + Strings.unpunctuate(p.
getTitle()).toLowerCase());
void addClause(String clause)
EntityManagerFactory getEmf()
EntityManager createEntityManager(String pu, String conf)
synchronized EntityManager createCachedEntityManager(String pu, String conf)
static boolean existsAnyOf(String entityPath)
static EntityWebUrl addWebUrl(String entityPath, String url)
static boolean existsEntity(String entityPath)
EntityManager createEntityManager()
static void convertUrls()
EntityManagerFactory getFactory()
EntityManager createCachedEntityManager()
static Module getModule()
static String getObjectExtendedPath(Object object)
static String getObjectPath(Object object)
String getPath(Object object)