@SqlQuery // Magic value to force MySQL to stream from the database // See http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html (ResultSet) @FetchSize(Integer.MIN_VALUE) public Iterator<M> getAll(@BindBean final InternalTenantContext context);
@Override public void apply(SQLStatement q) throws SQLException { assert q instanceof Query; ((Query) q).setFetchSize(fs.value()); } };
@SqlQuery // Magic value to force MySQL to stream from the database // See http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html (ResultSet) @FetchSize(Integer.MIN_VALUE) public Iterator<AuditLogModelDao> getAuditLogsForAccountRecordId(@BindBean final InternalTenantContext context);
public void apply(SQLStatement q) throws SQLException { assert q instanceof Query; ((Query) q).setFetchSize(fs.value()); } };
@Override @SqlQuery("select rolling_cohort, serial, start_time, origin_uri, prep_uri, archive_key, archive_uri, archive_group," + " state, owner_uri, bytes, created_at, updated_at from log_files where owner_uri = :owner_uri and state = ANY(:states) order by start_time asc") @FetchSize(50) ResultIterator<LogFile> findByOwnerAndState(@Bind("owner_uri") String ownerUri, @Bind(value = "states", binder = StringCollectionBinder.class) Set<String> states);
@Override public void apply(SQLStatement q) throws SQLException { assert q instanceof Query; ((Query) q).setFetchSize(fs.value()); } };
@Override @SqlQuery("select rolling_cohort, serial, start_time, origin_uri, prep_uri, archive_key, archive_uri, archive_group," + " state, owner_uri, bytes, created_at, updated_at from log_files where start_time >= :first_ts and start_time <= :last_ts" + " order by start_time asc") @FetchSize(50) ResultIterator<LogFile> listLogFilesByDate(@Bind("first_ts") DateTime startDate, @Bind("last_ts") DateTime endDate);
public void apply(SQLStatement q) throws SQLException { assert q instanceof Query; ((Query) q).setFetchSize(fs.value()); } };
@SqlQuery // Magic value to force MySQL to stream from the database // See http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html (ResultSet) @FetchSize(Integer.MIN_VALUE) public Iterator<AuditLogModelDao> getAuditLogsForTableNameAndAccountRecordId(@Bind("tableName") final String tableName, @BindBean final InternalTenantContext context);
@SqlQuery("select id, name from something") @FetchSize(2) public List<Something> findAll();
@SqlQuery("select id, name from something") @FetchSize(2) public List<Something> findAll();
@SqlQuery("select id, name from something") public List<Something> findAll(@FetchSize(1) int fetchSize);
@SqlQuery("select id, name from something") public List<Something> findAll(@FetchSize(1) int fetchSize);
@Override @SqlQuery("select rolling_cohort, serial, start_time, origin_uri, prep_uri, archive_key, archive_uri, archive_group," + " state, owner_uri, bytes, created_at, updated_at from log_files where state = :state and start_time >= :first_ts and start_time <= :last_ts" + " order by start_time asc") @FetchSize(50) ResultIterator<LogFile> listLogFilesByDateAndState(@Bind("state") String state, @Bind("first_ts") DateTime startDate, @Bind("last_ts") DateTime endDate);
@Override @SqlQuery("select rolling_cohort, serial, start_time, origin_uri, prep_uri, archive_key, archive_uri, archive_group," + " state, owner_uri, bytes, created_at, updated_at from log_files where state = ANY(:states) and start_time >= :first_ts and start_time <= :last_ts" + " order by start_time asc") @FetchSize(50) ResultIterator<LogFile> listLogFilesByDateAndState( @Bind(value="states", binder = StringCollectionBinder.class) Set<String> states, @Bind("first_ts") DateTime startDate, @Bind("last_ts") DateTime endDate);
@SqlQuery // Magic value to force MySQL to stream from the database // See http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html (ResultSet) @FetchSize(Integer.MIN_VALUE) public Iterator<PaymentModelDao> getByPluginName(@Bind("pluginName") final String pluginName, @Bind("offset") final Long offset, @Bind("rowCount") final Long rowCount, @BindBean final InternalTenantContext context); }
@SqlQuery // Magic value to force MySQL to stream from the database // See http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html (ResultSet) @FetchSize(Integer.MIN_VALUE) public Iterator<PaymentMethodModelDao> getByPluginName(@Bind("pluginName") final String pluginName, @Bind("offset") final Long offset, @Bind("rowCount") final Long rowCount, @BindBean final InternalTenantContext context); }
@SqlQuery // Magic value to force MySQL to stream from the database // See http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html (ResultSet) @FetchSize(Integer.MIN_VALUE) public Iterator<InvoiceModelDao> searchInvoices(@Bind("searchKey") final String searchKey, @Bind("offset") final Long offset, @Bind("rowCount") final Long rowCount, @BindBean final InternalTenantContext context);
@Override @SqlQuery("select rolling_cohort, serial, start_time, origin_uri, prep_uri, archive_key, archive_uri, archive_group," + " state, owner_uri, bytes, created_at, updated_at from log_files" + " where owner_uri = :owner and state = ANY(:states) and start_time >= :first_ts and start_time <= :last_ts" + " order by start_time asc") @FetchSize(50) ResultIterator<LogFile> listLogFilesByOwnerAndDateAndState( @Bind(value="states", binder = StringCollectionBinder.class) Set<String> states, @Bind("owner") String owner, @Bind("first_ts") DateTime startDate, @Bind("last_ts") DateTime endDate); }
@Override @SqlQuery("select rolling_cohort, serial, start_time, origin_uri, prep_uri, archive_key, archive_uri, archive_group," + " state, owner_uri, bytes, created_at, updated_at from log_files" + " where owner_uri = :owner, state = :state and start_time >= :first_ts and start_time <= :last_ts" + " order by start_time asc") @FetchSize(50) ResultIterator<LogFile> listLogFilesByOwnerAndDateAndState(@Bind("state") String state, @Bind("owner") String owner, @Bind("first_ts") DateTime startDate, @Bind("last_ts") DateTime endDate);