@Override public void bind(SQLStatement<?> query, PhaseUsageKeysCollectionBinder bind, Collection<String> keys) { query.define("keys", keys); int idx = 0; for (String state : keys) { query.bind("key_" + idx, state); idx++; } } };
@Override public void bind(SQLStatement<?> query, UsageTierKeysCollectionBinder bind, Collection<String> keys) { query.define("keys", keys); int idx = 0; for (String state : keys) { query.bind("key_" + idx, state); idx++; } } };
@Override public void bind(SQLStatement<?> query, TierBlockKeysCollectionBinder bind, Collection<String> keys) { query.define("keys", keys); int idx = 0; for (String state : keys) { query.bind("key_" + idx, state); idx++; } } };
@Override public void apply(SQLStatement q) throws SQLException { q.define(key, ns); } };
public void apply(SQLStatement q) throws SQLException { q.define(key, ns); } };
public void apply(SQLStatement q) { q.define(key, arg); } };
@Override public void apply(SQLStatement q) { q.define(key, arg); } };
public void override(SQLStatement<?> statement) { statement.define(ATTRIBUTE_NAME, objectMapper); }
@Override public void bind(SQLStatement<?> query, TierBlockKeysCollectionBinder bind, Collection<String> keys) { query.define("keys", keys); int idx = 0; for (String state : keys) { query.bind("key_" + idx, state); idx++; } } };
@Override public void bind(SQLStatement<?> query, RecordIdCollectionBinder bind, Collection<Long> ids) { query.define("record_ids", ids); int idx = 0; for (Long id : ids) { query.bind("id_" + idx, id); idx++; } } };
@Override public void bind(SQLStatement<?> query, UUIDCollectionBinder bind, Collection<String> ids) { query.define("tag_definition_ids", ids); int idx = 0; for (String id : ids) { query.bind("id_" + idx, id); idx++; } } };
@Override public void bind(SQLStatement<?> query, PhaseUsageKeysCollectionBinder bind, Collection<String> keys) { query.define("keys", keys); int idx = 0; for (String state : keys) { query.bind("key_" + idx, state); idx++; } } };
@Override public void bind(SQLStatement<?> query, UsageTierKeysCollectionBinder bind, Collection<String> keys) { query.define("keys", keys); int idx = 0; for (String state : keys) { query.bind("key_" + idx, state); idx++; } } };
@Override public void bind(SQLStatement q, BindDefineBean bind, Object arg) { final String prefix; if ("___jdbi_bare___".equals(bind.value())) { prefix = ""; } else { prefix = bind.value() + "."; } try { BeanInfo infos = Introspector.getBeanInfo(arg.getClass()); PropertyDescriptor[] props = infos.getPropertyDescriptors(); for (PropertyDescriptor prop : props) { String key = prefix + prop.getName(); Object value = prop.getReadMethod().invoke(arg); q.bind(key, value); q.define(key, value); } } catch (Exception e) { throw new IllegalStateException("unable to bind bean properties", e); } } };