AbstractRepository

public abstract class AbstractRepository

Base for all repository classes used in Motech

Methods

doubleQuote

protected String doubleQuote(String str)

Simple util method that wraps the given String in double quotes.

Parameters:
  • str – the text to wrap in double quotes
Returns:

the text wrapped in double quotes

getPersistenceManager

public PersistenceManager getPersistenceManager()

getPersistenceManagerFactory

public PersistenceManagerFactory getPersistenceManagerFactory()

setPersistenceManagerFactory

public void setPersistenceManagerFactory(PersistenceManagerFactory persistenceManagerFactory)

usingPsql

public boolean usingPsql()

Simple util method that determines the database in use, based on the chosen connection driver.

Returns:true, if the driver in use belongs to PostgreSQL, false otherwise