Search in sources :

Example 6 with QueryOption

use of siena.core.options.QueryOption in project siena by mandubian.

the class AbstractPersistenceManagerAsync method release.

public <T> void release(QueryAsync<T> query) {
    QueryOptionOffset offset = (QueryOptionOffset) query.option(QueryOptionOffset.ID);
    QueryOption reuse = query.option(QueryOptionState.ID);
    // resets offset
    if (offset.isActive())
        offset.offset = 0;
    // disables reusable and cludge
    if (reuse.isActive()) {
        reuse.passivate();
    }
}
Also used : QueryOptionOffset(siena.core.options.QueryOptionOffset) QueryOption(siena.core.options.QueryOption)

Aggregations

QueryOption (siena.core.options.QueryOption)6 Field (java.lang.reflect.Field)2 SQLException (java.sql.SQLException)2 ArrayList (java.util.ArrayList)2 SienaException (siena.SienaException)2 PersonLongAutoID (siena.base.test.model.PersonLongAutoID)2 QueryOptionOffset (siena.core.options.QueryOptionOffset)2 QueryOptionPage (siena.core.options.QueryOptionPage)2 IOException (java.io.IOException)1 Date (java.util.Date)1 ClassInfo (siena.ClassInfo)1 Json (siena.Json)1 SienaRestrictedApiException (siena.SienaRestrictedApiException)1