|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j256.ormlite.dao.RuntimeExceptionDao<T,ID>
public class RuntimeExceptionDao<T,ID>
Proxy to a Dao that wraps each Exception and rethrows it as RuntimeException. You can use this if your usage
pattern is to ignore all exceptions. That's not a pattern that I like so it's not the default.
RuntimeExceptionDao<Account, String> accountDao = RuntimeExceptionDao.createDao(connectionSource, Account.class);
| Constructor Summary | |
|---|---|
RuntimeExceptionDao(Dao<T,ID> dao)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RuntimeExceptionDao(Dao<T,ID> dao)
| Method Detail |
|---|
public static <T,ID> RuntimeExceptionDao<T,ID> createDao(ConnectionSource connectionSource,
Class<T> clazz)
throws SQLException
DaoManager.createDao(ConnectionSource, Class) with the returned DAO wrapped in a
RuntimeExceptionDao.
SQLException
public static <T,ID> RuntimeExceptionDao<T,ID> createDao(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
throws SQLException
DaoManager.createDao(ConnectionSource, DatabaseTableConfig) with the returned DAO wrapped
in a RuntimeExceptionDao.
SQLExceptionpublic T queryForId(ID id)
Dao.queryForId(Object)public T queryForFirst(PreparedQuery<T> preparedQuery)
Dao.queryForFirst(PreparedQuery)public List<T> queryForAll()
Dao.queryForAll()
public List<T> queryForEq(String fieldName,
Object value)
Dao.queryForEq(String, Object)public List<T> queryForMatching(T matchObj)
Dao.queryForMatching(Object)public List<T> queryForMatchingArgs(T matchObj)
Dao.queryForMatchingArgs(Object)public List<T> queryForFieldValues(Map<String,Object> fieldValues)
Dao.queryForFieldValues(Map)public List<T> queryForFieldValuesArgs(Map<String,Object> fieldValues)
Dao.queryForFieldValuesArgs(Map)public T queryForSameId(T data)
Dao.queryForSameId(Object)public QueryBuilder<T,ID> queryBuilder()
Dao.queryBuilder()public UpdateBuilder<T,ID> updateBuilder()
Dao.updateBuilder()public DeleteBuilder<T,ID> deleteBuilder()
Dao.deleteBuilder()public List<T> query(PreparedQuery<T> preparedQuery)
Dao.query(PreparedQuery)public int create(T data)
Dao.create(Object)public T createIfNotExists(T data)
Dao.createIfNotExists(Object)public Dao.CreateOrUpdateStatus createOrUpdate(T data)
Dao.createOrUpdate(Object)public int update(T data)
Dao.update(Object)
public int updateId(T data,
ID newId)
Dao.updateId(Object, Object)public int update(PreparedUpdate<T> preparedUpdate)
Dao.update(PreparedUpdate)public int refresh(T data)
Dao.refresh(Object)public int delete(T data)
Dao.delete(Object)public int deleteById(ID id)
Dao.deleteById(Object)public int delete(Collection<T> datas)
Dao.delete(Collection)public int deleteIds(Collection<ID> ids)
Dao.deleteIds(Collection)public int delete(PreparedDelete<T> preparedDelete)
Dao.delete(PreparedDelete)public CloseableIterator<T> iterator()
iterator in interface Iterable<T>Dao.iterator()public CloseableIterator<T> closeableIterator()
CloseableIterable
closeableIterator in interface CloseableIterable<T>public CloseableIterator<T> iterator(int resultFlags)
Dao.iterator(int)public CloseableWrappedIterable<T> getWrappedIterable()
Dao.getWrappedIterable()public CloseableWrappedIterable<T> getWrappedIterable(PreparedQuery<T> preparedQuery)
Dao.getWrappedIterable(PreparedQuery)public void closeLastIterator()
Dao.closeLastIterator()public CloseableIterator<T> iterator(PreparedQuery<T> preparedQuery)
Dao.iterator(PreparedQuery)
public CloseableIterator<T> iterator(PreparedQuery<T> preparedQuery,
int resultFlags)
Dao.iterator(PreparedQuery, int)
public GenericRawResults<String[]> queryRaw(String query,
String... arguments)
Dao.queryRaw(String, String...)
public long queryRawValue(String query,
String... arguments)
Dao.queryRawValue(String, String...)
public <UO> GenericRawResults<UO> queryRaw(String query,
RawRowMapper<UO> mapper,
String... arguments)
Dao.queryRaw(String, RawRowMapper, String...)
public GenericRawResults<Object[]> queryRaw(String query,
DataType[] columnTypes,
String... arguments)
Dao.queryRaw(String, DataType[], String...)
public int executeRaw(String statement,
String... arguments)
Dao.executeRaw(String, String...)public int executeRawNoArgs(String statement)
Dao.executeRawNoArgs(String)
public int updateRaw(String statement,
String... arguments)
Dao.updateRaw(String, String...)public <CT> CT callBatchTasks(Callable<CT> callable)
Dao.callBatchTasks(Callable)public String objectToString(T data)
Dao.objectToString(Object)
public boolean objectsEqual(T data1,
T data2)
Dao.objectsEqual(Object, Object)public ID extractId(T data)
Dao.extractId(Object)public Class<T> getDataClass()
Dao.getDataClass()public FieldType findForeignFieldType(Class<?> clazz)
Dao.findForeignFieldType(Class)public boolean isUpdatable()
Dao.isUpdatable()public boolean isTableExists()
Dao.isTableExists()public long countOf()
Dao.countOf()public long countOf(PreparedQuery<T> preparedQuery)
Dao.countOf(PreparedQuery)
public void assignEmptyForeignCollection(T parent,
String fieldName)
Dao.assignEmptyForeignCollection(Object, String)public <FT> ForeignCollection<FT> getEmptyForeignCollection(String fieldName)
Dao.getEmptyForeignCollection(String)public void setObjectCache(boolean enabled)
Dao.setObjectCache(boolean)public ObjectCache getObjectCache()
Dao.getObjectCache()public void setObjectCache(ObjectCache objectCache)
Dao.setObjectCache(ObjectCache)public void clearObjectCache()
Dao.clearObjectCache()public T mapSelectStarRow(DatabaseResults results)
Dao.mapSelectStarRow(DatabaseResults)public GenericRowMapper<T> getSelectStarRowMapper()
Dao.getSelectStarRowMapper()public boolean idExists(ID id)
Dao.idExists(Object)public DatabaseConnection startThreadConnection()
Dao.startThreadConnection()public void endThreadConnection(DatabaseConnection connection)
Dao.endThreadConnection(DatabaseConnection)@Deprecated public void setAutoCommit(boolean autoCommit)
Dao.setAutoCommit(boolean)
public void setAutoCommit(DatabaseConnection connection,
boolean autoCommit)
Dao.setAutoCommit(DatabaseConnection, boolean)@Deprecated public boolean isAutoCommit()
Dao.isAutoCommit()public boolean isAutoCommit(DatabaseConnection connection)
Dao.isAutoCommit(DatabaseConnection)public void commit(DatabaseConnection connection)
Dao.commit(DatabaseConnection)public void rollBack(DatabaseConnection connection)
Dao.rollBack(DatabaseConnection)public void setObjectFactory(ObjectFactory<T> objectFactory)
Dao.setObjectFactory(ObjectFactory)public RawRowMapper<T> getRawRowMapper()
Dao.getRawRowMapper()public ConnectionSource getConnectionSource()
Dao.getConnectionSource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||