@Override public SqlStatementCustomizer createForType(Annotation annotation, Class sqlObjectType) { OverrideStatementLocatorWith sl = (OverrideStatementLocatorWith) annotation; final StatementLocator f; try { f = instantiate(sl.value(), sqlObjectType, null); } catch (Exception e) { throw new IllegalStateException("unable to instantiate a statement locator", e); } return new SqlStatementCustomizer() { @Override public void apply(SQLStatement q) { q.setStatementLocator(f); } }; }
public SqlStatementCustomizer createForType(Annotation annotation, Class sqlObjectType) { OverrideStatementLocatorWith sl = (OverrideStatementLocatorWith) annotation; final StatementLocator f; try { f = instantiate(sl.value(), sqlObjectType, null); } catch (Exception e) { throw new IllegalStateException("unable to instantiate a statement locator", e); } return new SqlStatementCustomizer() { public void apply(SQLStatement q) { q.setStatementLocator(f); } }; }
public SqlStatementCustomizer createForMethod(Annotation annotation, Class sqlObjectType, Method method) { OverrideStatementLocatorWith sl = (OverrideStatementLocatorWith) annotation; final org.skife.jdbi.v2.tweak.StatementLocator f; try { f = instantiate(sl.value(), sqlObjectType, method); } catch (Exception e) { throw new IllegalStateException("unable to instantiate a statement locator", e); } return new SqlStatementCustomizer() { public void apply(SQLStatement q) { q.setStatementLocator(f); } }; }
@Override public SqlStatementCustomizer createForMethod(Annotation annotation, Class sqlObjectType, Method method) { OverrideStatementLocatorWith sl = (OverrideStatementLocatorWith) annotation; final org.skife.jdbi.v2.tweak.StatementLocator f; try { f = instantiate(sl.value(), sqlObjectType, method); } catch (Exception e) { throw new IllegalStateException("unable to instantiate a statement locator", e); } return new SqlStatementCustomizer() { @Override public void apply(SQLStatement q) { q.setStatementLocator(f); } }; }