public interface Model
A model is a collection of tables, and a collection of reports.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Clears all caches for all tables for the current thread.default void
executeTransaction
(Runnable runnable) Deprecated, for removal: This API element is subject to removal in a future version.Comparator
<? super String> Gets the comparator used by this model.getName()
Gets the name of this model.Gets the set of all reports that are supported by this repository implementation, keyed on its unique name.Gets the set of all tables in this model.default <V> V
transactionCall
(CallableE<? extends V, ? extends SQLException> callable) Executes an arbitrary transaction, providing automatic commit, rollback, and connection management.<V,
Ex extends Throwable>
VtransactionCall
(Class<? extends Ex> exClass, CallableE<? extends V, ? extends Ex> callable) Executes an arbitrary transaction, providing automatic commit, rollback, and connection management.default void
transactionRun
(RunnableE<? extends SQLException> runnable) Executes an arbitrary transaction, providing automatic commit, rollback, and connection management.default <Ex extends Throwable>
voidtransactionRun
(Class<? extends Ex> exClass, RunnableE<? extends Ex> runnable) Executes an arbitrary transaction, providing automatic commit, rollback, and connection management.
-
Method Details
-
getName
String getName()Gets the name of this model. -
getComparator
Comparator<? super String> getComparator()Gets the comparator used by this model. -
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 SQLExceptionExecutes an arbitrary transaction, providing automatic commit, rollback, and connection management.- Throws:
SQLException
- See Also:
-
transactionCall
<V,Ex extends Throwable> V transactionCall(Class<? extends Ex> exClass, CallableE<? extends V, ? extends Ex> callable) throws SQLException, ExExecutes an arbitrary transaction, providing automatic commit, rollback, and connection management.- Type Parameters:
Ex
- An arbitrary exception type that may be thrown- Throws:
SQLException
Ex
- See Also:
-
transactionRun
Executes an arbitrary transaction, providing automatic commit, rollback, and connection management.- Throws:
SQLException
- See Also:
-
executeTransaction
Deprecated, for removal: This API element is subject to removal in a future version.Please usetransactionRun(com.aoapps.lang.RunnableE)
Executes an arbitrary transaction, providing automatic commit, rollback, and connection management.- Throws:
SQLException
-
transactionRun
default <Ex extends Throwable> void transactionRun(Class<? extends Ex> exClass, RunnableE<? extends Ex> runnable) throws SQLException, Ex Executes an arbitrary transaction, providing automatic commit, rollback, and connection management.- Type Parameters:
Ex
- An arbitrary exception type that may be thrown- Throws:
SQLException
Ex
- See Also:
-
getReports
Gets the set of all reports that are supported by this repository implementation, keyed on its unique name.- Throws:
SQLException
-
transactionRun(com.aoapps.lang.RunnableE)