Method Summary |
|
public static void | addPersistenceListener(PersistenceListener listener) Adds a PersistenceListener to the framework. |
protected static void | closeContext() |
public static void | closeIteration() |
public static void | commitTransaction() Commits the current transaction. |
public static int | count(Class<T> c, Query qry) Counts the objects which match the provided query. |
public static int | count(Class<T> c, QueryFilter filter) Counts the objects which match the provided queryfilter. |
public static PersistenceContext | createContext(DataSource source) |
public static T | createInstance(Class<T> c) Creates a new instance of the provided object. |
public static PersistenceContext | currentContext() |
public static Transaction | currentTransaction() |
public static void | delete(T obj) Deletes the object. |
public static void | delete(Class<T> c, QueryFilter filter) Deletes all the objects of class c matching the provided QueryFilter. |
public static List<Field> | diff(T obj1, T obj2) |
public static DataSource | getDataSource() |
public static Connection | getDbConnection() Returns a connection to the underlying database. |
public static Metadata | getMetadata(Class c) Returns the metadata for the objects that belong to the provided class. |
public static Field | getPrimaryKeyField(Class c) |
public static T | intern(T obj) Similarly to java.lang.String.intern() method, returns the internal, cached
version of the provided object, if present; otherwise returns the same
object and puts the provided one into the cache. |
public static Iterable<T> | iterate(Class<T> c, Query qry) |
public static T | load(Class<T> c, Object primaryKey) |
public static T | load(Class<T> c, Object... primaryKeys) Loads the object with the provided composite primary key. |
public static List<T> | load(Class<T> c, Query qry) Loads the objects which match the provided query. |
public static List<T> | load(Class<T> c, QueryFilter filter) Loads the objects which match the provided query. |
protected static boolean | loadDeeply(Class<T> c, T obj, Object primaryKey) |
public static T | loadUnique(Class<T> c, Query query) This method represents a shortcut for loading objects with queries when the
expected return value is only one object. |
public static T | loadUnique(Class<T> c, QueryFilter filter) This method represents a shortcut for loading objects with queries when the
expected return value is only one object. |
public static List<T> | loadUpdatable(Class<T> c, Query qry) Returns an updatable list of objects which match the provided query. |
public static T | lookup(Class<T> c, Object primaryKey) Lookup the object of the provided class whith the specified primary key. |
protected static void | openContext(PersistenceContext context) |
public static void | openTransaction() Opens a transaction to the datatabse. |
public static void | openTransaction(int isolationLevel) Opens a transaction to the datatabse. |
public static void | override(T obj) Saves the provided object instance, regardless the object is already present
into the target domain. |
public static void | removePersistenceListener(PersistenceListener listener) |
public static void | rollbackTransaction() Rolls back the current transaction. |
public static void | save(T obj) Saves the provided object instance. |
public static void | setDataSource(DataSource source) |
public static void | validate(Class<T> c, T obj) |