Java Code Examples for com.j256.ormlite.dao.RuntimeExceptionDao#setObjectCache()
The following examples show how to use
com.j256.ormlite.dao.RuntimeExceptionDao#setObjectCache() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZulipApp.java From zulip-android with Apache License 2.0 | 5 votes |
@SuppressWarnings("unchecked") public <C, T> RuntimeExceptionDao<C, T> getDao(Class<C> cls, boolean useCache) { try { RuntimeExceptionDao<C, T> ret = new RuntimeExceptionDao<>( (Dao<C, T>) databaseHelper.getDao(cls)); if (useCache) { ret.setObjectCache(getObjectCache()); } return ret; } catch (SQLException e) { // Well that's sort of awkward. throw new RuntimeException(e); } }