org.jfaster.mango.binding.InvocationContextFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mango Show documentation
Show all versions of mango Show documentation
mango is a dao framework.
package org.jfaster.mango.binding;
/**
* @author ash
*/
public class InvocationContextFactory {
private ParameterContext parameterContext;
private InvocationContextFactory(ParameterContext parameterContext) {
this.parameterContext = parameterContext;
}
public static InvocationContextFactory create(ParameterContext parameterContext) {
return new InvocationContextFactory(parameterContext);
}
public InvocationContext newInvocationContext(Object[] values) {
InvocationContext context = DefaultInvocationContext.create();
for (int i = 0; i < values.length; i++) {
String parameterName = parameterContext.getParameterNameByPosition(i);
context.addParameter(parameterName, values[i]);
}
return context;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy