Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.skife.jdbi.v2.sqlobject.customizers;
 
 
public @interface FetchSize
    int value() default 0;
    static class Factory implements SqlStatementCustomizerFactory
    {
        public SqlStatementCustomizer createForMethod(Annotation annotationClass sqlObjectTypeMethod method)
        {
            final FetchSize fs = (FetchSizeannotation;
            return new SqlStatementCustomizer()
            {
                public void apply(SQLStatement qthrows SQLException
                {
                    assert q instanceof Query;
                    ((Queryq).setFetchSize(fs.value());
                }
            };
        }
        public SqlStatementCustomizer createForType(Annotation annotationClass sqlObjectType)
        {
            final FetchSize fs = (FetchSizeannotation;
            return new SqlStatementCustomizer()
            {
                public void apply(SQLStatement qthrows SQLException
                {
                    assert q instanceof Query;
                    ((Queryq).setFetchSize(fs.value());
                }
            };
        }
        public SqlStatementCustomizer createForParameter(Annotation annotationClass sqlObjectTypeMethod methodObject arg)
        {
            final Integer va = (Integerarg;
            return new SqlStatementCustomizer()
            {
                public void apply(SQLStatement qthrows SQLException
                {
                    assert q instanceof Query;
                    ((Queryq).setFetchSize(va);
                }
            };
        }
    }
New to GrepCode? Check out our FAQ X