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

Public Member Functions

String getPath (Object object)
 
- 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 44 of file ContactsPU.java.

Member Function Documentation

◆ createCachedEntityManager()

EntityManager org.turro.contacts.db.ContactsPU.createCachedEntityManager ( )
protected

Reimplemented from org.turro.jpa.Dao.

Definition at line 59 of file ContactsPU.java.

59  {
60  return factory.createCachedEntityManager("contactsPU", "Contacts");
61  }
synchronized EntityManager createCachedEntityManager(String pu, String conf)
Definition: DaoFactory.java:64
Here is the call graph for this function:

◆ createEntityManager()

EntityManager org.turro.contacts.db.ContactsPU.createEntityManager ( )
protected

Reimplemented from org.turro.jpa.Dao.

Definition at line 54 of file ContactsPU.java.

54  {
55  return factory.createEntityManager("contactsPU", "Contacts");
56  }
EntityManager createEntityManager(String pu, String conf)
Definition: DaoFactory.java:54
Here is the call graph for this function:

◆ getFactory()

EntityManagerFactory org.turro.contacts.db.ContactsPU.getFactory ( )
protected

Reimplemented from org.turro.jpa.Dao.

Definition at line 49 of file ContactsPU.java.

49  {
50  return factory.getEmf();
51  }
EntityManagerFactory getEmf()
Definition: DaoFactory.java:89
Here is the call graph for this function:

◆ getModule()

static Module org.turro.contacts.db.ContactsPU.getModule ( )
static

Definition at line 95 of file ContactsPU.java.

95  {
96  return new Module(new Version("2.1"), "BrightSide Contacts");
97  }

◆ getObjectPath()

static String org.turro.contacts.db.ContactsPU.getObjectPath ( Object  object)
static

Definition at line 68 of file ContactsPU.java.

68  {
69  if(object instanceof Contact) {
70  return "/contact/" + ((Contact) object).getId();
71  } else if(object instanceof Address) {
72  return getObjectPath(((Address) object).getContact()) + "/address/" + ((Address) object).getId();
73  } else if(object instanceof Connector) {
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();
77  } else if(object instanceof BusinessRelation) {
78  return getObjectPath(((BusinessRelation) object).getBusiness()) + "/relation/" + ((BusinessRelation) object).getId();
79  } else if(object instanceof ContactService) {
80  return "/service/" + ((ContactService) object).getId();
81  } else if(object instanceof GroupIt) {
82  return "/groupit/" + ((GroupIt) object).getId();
83  } else if(object instanceof Convocation) {
84  return "/convocation/" + ((Convocation) object).getId();
85  } else if(object instanceof CommentIt) {
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();
91  }
92  return null;
93  }
static String getObjectPath(Object object)
Definition: ContactsPU.java:68
Here is the caller graph for this function:

◆ getPath()

String org.turro.contacts.db.ContactsPU.getPath ( Object  object)

Reimplemented from org.turro.jpa.Dao.

Definition at line 64 of file ContactsPU.java.

64  {
65  return getObjectPath(object);
66  }

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