
de.zalando.sprocwrapper.proxy.InvocationContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zalando-sprocwrapper Show documentation
Show all versions of zalando-sprocwrapper Show documentation
Library to make PostgreSQL stored procedures available through simple Java "*SProcService" interfaces
including automatic object serialization and deserialization (using typemapper and
convention-over-configuration). Supports sharding, advisory locking, statement timeouts and PostgreSQL types
such as enums and hstore.
package de.zalando.sprocwrapper.proxy;
import java.lang.reflect.Method;
import java.util.Arrays;
import com.google.common.base.Preconditions;
public class InvocationContext {
private final Object proxy;
private final Method method;
private final Object[] args;
public InvocationContext(final Object proxy, final Method method, final Object[] args) {
this.proxy = Preconditions.checkNotNull(proxy, "proxy");
this.method = Preconditions.checkNotNull(method, "method");
this.args = args;
}
public Object getProxy() {
return proxy;
}
public Method getMethod() {
return method;
}
public Object[] getArgs() {
return args;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("InvocationContext [proxy=");
builder.append(proxy);
builder.append(", method=");
builder.append(method);
builder.append(", args=");
builder.append(Arrays.toString(args));
builder.append("]");
return builder.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy