本文整理汇总了Java中com.sap.conn.jco.JCoField.isTable方法的典型用法代码示例。如果您正苦于以下问题:Java JCoField.isTable方法的具体用法?Java JCoField.isTable怎么用?Java JCoField.isTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sap.conn.jco.JCoField
的用法示例。
在下文中一共展示了JCoField.isTable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFields
import com.sap.conn.jco.JCoField; //导入方法依赖的package包/类
private void getFields(JCoFieldIterator iter,LinkedHashMap resultList)
{
while(iter.hasNextField())
{
JCoField f = iter.nextField();
LinkedHashMap map = new LinkedHashMap();
map.put(f.getName(), f.getValue());
if(f.isTable())
{
resultList.put(f.getName(),getTableParameter(f));
}
else if (f.isStructure())
{
resultList.put(f.getName(),getStructureParameter(f));
}
else
{
resultList.put(f.getName(),f.getValue());
}
}
}
示例2: mapToMap
import com.sap.conn.jco.JCoField; //导入方法依赖的package包/类
private Map<String, Object> mapToMap(final JCoRecord record) {
final Map<String, Object> map = new HashMap<String, Object>();
if (record == null) {
return map;
}
final JCoFieldIterator iter = record.getFieldIterator();
while (iter.hasNextField()) {
final JCoField jcoField = iter.nextField();
final String sapFieldName = jcoField.getName();
if (jcoField.isStructure()) {
map.put(sapFieldName, mapToMap(jcoField.getStructure()));
} else if (jcoField.isTable()) {
final List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
final JCoTable table = jcoField.getTable();
for (int j = 0; j < table.getNumRows(); j++) {
table.setRow(j);
list.add(mapToMap(table));
}
map.put(sapFieldName, list);
} else {
final Object value = jcoField.getValue();
map.put(sapFieldName, value);
}
}
return map;
}
示例3: setSimpleParameterValue
import com.sap.conn.jco.JCoField; //导入方法依赖的package包/类
private void setSimpleParameterValue(JCoFieldIterator iter,String name, Object value)
{
while(iter.hasNextField())
{
JCoField f = iter.nextField();
if(f.getName().equals(name) &!f.isStructure() &!f.isTable())
{
f.setValue(value);
}
}
}
示例4: setTableParameter
import com.sap.conn.jco.JCoField; //导入方法依赖的package包/类
/**
* Sets a single Table parameter that is a structure
* @param name the name of the parameter
* @param list The value of the parameter (A LinkedList of LinkedHashmaps)
*/
public void setTableParameter(String name, LinkedList list)
{
//Find table parameter with this name and set the appropriate valies
JCoFieldIterator iter = function.getTableParameterList().getFieldIterator();
while(iter.hasNextField())
{
JCoField f = iter.nextField();
if(f.getName().equals(name) & f.isTable() )
{
Iterator recordIter = list.listIterator();
JCoTable table = f.getTable();
while(recordIter.hasNext())
{
table.appendRow();
LinkedHashMap fields = (LinkedHashMap)recordIter.next();
Iterator fieldIter = fields.entrySet().iterator();
while(fieldIter.hasNext())
{
Entry field = (Map.Entry)fieldIter.next();
table.setValue(field.getKey().toString(), field.getValue().toString());
}
}
}
}
}