BrightSide Workbench Full Report + Source Code
org.turro.elephant.db.ElephantPU Class Reference
Inheritance diagram for org.turro.elephant.db.ElephantPU:
Collaboration diagram for org.turro.elephant.db.ElephantPU:

Public Member Functions

String getPath (Object object)
 
void closeElephant ()
 
- Public Member Functions inherited from org.turro.jpa.Dao
 Dao ()
 
Query createQuery (String query)
 
Query createNamedQuery (String name)
 
void close ()
 
Dao clear ()
 
void persistObject (Object obj)
 
void saveEntities (Collection<? extends IDaoEntity > entities)
 
void saveCollection (Collection objs)
 
void saveCollection (Collection objs, DaoCallback callback)
 
void deleteObject (Object obj)
 
void deleteEntity (IDaoEntity entity)
 
void deleteCollection (Collection objs)
 
void deleteCollection (Collection objs, DaoCallback callback)
 
void deleteEntities (Collection< IDaoEntity > entities)
 
EntityManager getEntityManager ()
 
EntityManager getCachedEntityManager ()
 
boolean isLoaded (Object o, String attribute)
 
boolean isNotLoaded (Object o, String attribute)
 
boolean isLoaded (Object o)
 
boolean isNotLoaded (Object o)
 
List getResultList (WhereClause wc)
 
List getResultList (WhereClause wc, int max)
 
List getResultList (WhereClause wc, int start, int max)
 
List getResultList (SqlClause sc)
 
List getResultList (SqlClause sc, int max)
 
List getResultList (SqlClause sc, int start, int max)
 
List getResultList (String query)
 
List getResultList (String query, int max)
 
List getResultList (String query, Object[] pars)
 
List getResultList (String query, Object[] pars, int max)
 
Object getSingleResult (WhereClause wc)
 
Object getSingleResult (SqlClause sc)
 
Object getSingleResult (String query)
 
Object getSingleResult (String query, Object[] pars)
 
Object getSingleResultOrNull (SqlClause sc)
 
Object getSingleResultOrNull (WhereClause wc)
 
Object getSingleResultOrNull (String query)
 
Object getSingleResultOrNull (String query, Object[] pars)
 
Object getSingleNativeResult (String query)
 
Object getSingleNativeResult (String query, Object[] pars)
 
int executeUpdate (String query)
 
int executeUpdate (String query, Object[] pars)
 
int executeDelete (JpaCriteriaDelete jpaCriteriaDelete)
 
int executeDelete (Collection< JpaCriteriaDelete > jpaCriteriaDeletes)
 
int executeUpdate (JpaCriteriaUpdate jpaCriteriaUpdate)
 
int executeUpdate (Collection< JpaCriteriaUpdate > jpaCriteriaUpdates)
 
int executeUpdate (WhereClause wc)
 
int executeUpdate (SqlClause sc)
 
int executeNativeUpdate (SqlClause sc, Object... pars)
 
int executeNativeUpdate (String query, Object... pars)
 
void poolObject (Object obj, int poolSize)
 
void finishPool ()
 

Static Public Member Functions

static String getObjectPath (Object object)
 
static Module getModule ()
 
- Static Public Member Functions inherited from org.turro.jpa.Dao
static String toJpaPositional (String query)
 
static Dao getDaoByPU (String pu)
 

Protected Member Functions

EntityManagerFactory getFactory ()
 
EntityManager createEntityManager ()
 
EntityManager createCachedEntityManager ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 39 of file ElephantPU.java.

Member Function Documentation

◆ closeElephant()

void org.turro.elephant.db.ElephantPU.closeElephant ( )

Implements org.turro.action.IElephantCloseable.

Definition at line 81 of file ElephantPU.java.

81  {
82 // try {
83 // DriverManager.getConnection("jdbc:derby:;shutdown=true");
84 // } catch (SQLException ex) {
85 // if(!"XJ015".equals(ex.getSQLState())) {
86 // Logger.getLogger(ElephantPU.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
87 // }
88 // }
89  }

◆ createCachedEntityManager()

EntityManager org.turro.elephant.db.ElephantPU.createCachedEntityManager ( )
protected

Reimplemented from org.turro.jpa.Dao.

Definition at line 54 of file ElephantPU.java.

54  {
55  return factory.createCachedEntityManager("elephantPU", "Elephant");
56  }
synchronized EntityManager createCachedEntityManager(String pu, String conf)
Definition: DaoFactory.java:64
Here is the call graph for this function:

◆ createEntityManager()

EntityManager org.turro.elephant.db.ElephantPU.createEntityManager ( )
protected

Reimplemented from org.turro.jpa.Dao.

Definition at line 49 of file ElephantPU.java.

49  {
50  return factory.createEntityManager("elephantPU", "Elephant");
51  }
EntityManager createEntityManager(String pu, String conf)
Definition: DaoFactory.java:54
Here is the call graph for this function:

◆ getFactory()

EntityManagerFactory org.turro.elephant.db.ElephantPU.getFactory ( )
protected

Reimplemented from org.turro.jpa.Dao.

Definition at line 44 of file ElephantPU.java.

44  {
45  return factory.getEmf();
46  }
EntityManagerFactory getEmf()
Definition: DaoFactory.java:89
Here is the call graph for this function:

◆ getModule()

static Module org.turro.elephant.db.ElephantPU.getModule ( )
static

Definition at line 76 of file ElephantPU.java.

76  {
77  return new Module(new Version("0"), "Elephant");
78  }

◆ getObjectPath()

static String org.turro.elephant.db.ElephantPU.getObjectPath ( Object  object)
static

Definition at line 63 of file ElephantPU.java.

63  {
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();
70  } else if(object instanceof EntityParticipation) {
71  return "/entity-participation/" + ((EntityParticipation) object).complexId().build();
72  }
73  return null;
74  }
Here is the caller graph for this function:

◆ getPath()

String org.turro.elephant.db.ElephantPU.getPath ( Object  object)

Reimplemented from org.turro.jpa.Dao.

Definition at line 59 of file ElephantPU.java.

59  {
60  return getObjectPath(object);
61  }
static String getObjectPath(Object object)
Definition: ElephantPU.java:63
Here is the call graph for this function:

The documentation for this class was generated from the following file: