com.github.aidensuen.mongo.command.StaticCommandSource Maven / Gradle / Ivy
package com.github.aidensuen.mongo.command;
import com.github.aidensuen.mongo.mapping.BoundCommand;
import com.github.aidensuen.mongo.mapping.ParameterHolder;
import com.github.aidensuen.mongo.session.Configuration;
public class StaticCommandSource implements CommandSource {
private final String command;
private final Configuration configuration;
public StaticCommandSource(String command, Configuration configuration) {
this.command = command;
this.configuration = configuration;
}
@Override
public BoundCommand getBoundCommand(Object parameterObject) {
return new BoundCommand(command, new ParameterHolder(this.configuration, parameterObject));
}
public String getCommand() {
return command;
}
public Configuration getConfiguration() {
return configuration;
}
}