Code example for ArrayList

Methods: addAll

    public <T> List<T> queryForAllFromDatabase(Class<T> modelObjectClass) throws SQLException {
        List<T> allObjectsInTable = new ArrayList<T>();
        Dao<T, ?> dao = getDao(modelObjectClass);
        return allObjectsInTable;
    public <T, ID> T queryForIdFromDatabase(ID id, Class<T> modelObjectClass) throws SQLException {
        Dao<T, ID> dao = getDao(modelObjectClass);
        T result = dao.queryForId(id);
        return result;
    public CacheEntry queryCacheKeyForIdFromDatabase(String id) throws SQLException {
        Dao<CacheEntry, String> dao = getDao(CacheEntry.class);
Connect your IDE to all the code out there  Get Codota for Java