本文整理匯總了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());
}
}
}
}
}