Search in sources :

Example 1 with NamedArgumentFinder

use of org.jdbi.v3.core.argument.NamedArgumentFinder in project jdbi by jdbi.

the class Binding method toString.

@Override
public String toString() {
    boolean wrote = false;
    StringBuilder b = new StringBuilder();
    b.append("{ positional:{");
    for (Map.Entry<Integer, Argument> entry : positionals.entrySet()) {
        wrote = true;
        b.append(entry.getKey()).append(":").append(entry.getValue()).append(",");
    }
    if (wrote) {
        wrote = false;
        b.deleteCharAt(b.length() - 1);
    }
    b.append("}");
    b.append(", named:{");
    for (Map.Entry<String, Argument> entry : named.entrySet()) {
        wrote = true;
        b.append(entry.getKey()).append(":").append(entry.getValue()).append(",");
    }
    if (wrote) {
        wrote = false;
        b.deleteCharAt(b.length() - 1);
    }
    b.append("}");
    b.append(", finder:[");
    for (NamedArgumentFinder argument : namedArgumentFinder) {
        wrote = true;
        b.append(argument).append(",");
    }
    if (wrote) {
        b.deleteCharAt(b.length() - 1);
    }
    b.append("]");
    b.append("}");
    return b.toString();
}
Also used : Argument(org.jdbi.v3.core.argument.Argument) NamedArgumentFinder(org.jdbi.v3.core.argument.NamedArgumentFinder) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 Argument (org.jdbi.v3.core.argument.Argument)1 NamedArgumentFinder (org.jdbi.v3.core.argument.NamedArgumentFinder)1