me.saro.sap.jco.SapFunctionResult Maven / Gradle / Ivy
package me.saro.sap.jco;
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import com.sap.conn.jco.JCoField;
import com.sap.conn.jco.JCoFunction;
import com.sap.conn.jco.JCoParameterList;
import com.sap.conn.jco.JCoTable;
import me.saro.commons.function.ThrowableBiConsumer;
/**
* Sap Function Result
* @author PARK Yong Seo
* @since 0.1
*/
public class SapFunctionResult {
final JCoFunction function;
/**
* @param jCoFunction
* @see SapFunctionFunction
*/
SapFunctionResult(JCoFunction function) {
this.function = function;
}
/**
* get export parameters
* @return
*/
public JCoParameterList getExportParameterList() {
return function.getExportParameterList();
}
/**
* get result table count
* @return
*/
public int getTableCount() {
return function.getTableParameterList().getFieldCount();
}
/**
* get table by index
* @param index
* @return
*/
public JCoTable getJCoTable(int index) {
return function.getTableParameterList().getTable(index);
}
/**
* get table by name
* @param name
* @return
*/
public JCoTable getJCoTable(String name) {
return function.getTableParameterList().getTable(name);
}
/**
* get map list table
* @param index
* @return
*/
public List