Package com.aoindustries.dao
Interface Model
-
public interface ModelA model is a collection of tables, and a collection of reports.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidclearAllCaches()Clears all caches for all tables for the current thread.default voidexecuteTransaction(Runnable runnable)Deprecated.Comparator<? super String>getComparator()Gets the comparator used by this model.StringgetName()Gets the name of this model.default Map<String,? extends Report>getReports()Gets the set of all reports that are supported by this repository implementation, keyed on its unique name.Map<String,? extends Table<?,?>>getTables()Gets the set of all tables in this model.default <V> VtransactionCall(CallableE<? extends V,? extends SQLException> callable)Executes a transaction between any number of calls to this model and its tables.<V,E extends Throwable>
VtransactionCall(Class<? extends E> eClass, CallableE<? extends V,? extends E> callable)Executes a transaction between any number of calls to this model and its tables.default voidtransactionRun(RunnableE<? extends SQLException> runnable)Executes a transaction between any number of calls to this model and its tables.default <E extends Throwable>
voidtransactionRun(Class<? extends E> eClass, RunnableE<? extends E> runnable)Executes a transaction between any number of calls to this model and its tables.
-
-
-
Method Detail
-
getName
String getName()
Gets the name of this model.
-
getComparator
Comparator<? super String> getComparator()
Gets the comparator used by this model.
-
getTables
Map<String,? extends Table<?,?>> getTables()
Gets the set of all tables in this model. This is a map keyed on table name to be useful in JSP EL without requiring a separate getter for each table.
-
clearAllCaches
default void clearAllCaches()
Clears all caches for all tables for the current thread.
-
transactionCall
default <V> V transactionCall(CallableE<? extends V,? extends SQLException> callable) throws SQLException
Executes a transaction between any number of calls to this model and its tables.- Throws:
SQLException- See Also:
transactionRun(com.aoindustries.lang.RunnableE)
-
transactionCall
<V,E extends Throwable> V transactionCall(Class<? extends E> eClass, CallableE<? extends V,? extends E> callable) throws SQLException, E extends Throwable
Executes a transaction between any number of calls to this model and its tables.- Throws:
SQLExceptionE extends Throwable- See Also:
transactionRun(java.lang.Class, com.aoindustries.lang.RunnableE)
-
transactionRun
default void transactionRun(RunnableE<? extends SQLException> runnable) throws SQLException
Executes a transaction between any number of calls to this model and its tables.- Throws:
SQLException- See Also:
transactionCall(com.aoindustries.util.concurrent.CallableE)
-
executeTransaction
@Deprecated default void executeTransaction(Runnable runnable) throws SQLException
Deprecated.- Throws:
SQLException
-
transactionRun
default <E extends Throwable> void transactionRun(Class<? extends E> eClass, RunnableE<? extends E> runnable) throws SQLException, E extends Throwable
Executes a transaction between any number of calls to this model and its tables.- Throws:
SQLExceptionE extends Throwable- See Also:
transactionCall(java.lang.Class, com.aoindustries.util.concurrent.CallableE)
-
getReports
default Map<String,? extends Report> getReports() throws SQLException
Gets the set of all reports that are supported by this repository implementation, keyed on its unique name.- Throws:
SQLException
-
-