Search in sources :

Example 1 with IDocDocumentList

use of com.sap.conn.idoc.IDocDocumentList in project Tundra by Permafrost.

the class idoc method partition.

public static final void partition(IData pipeline) throws ServiceException {
    // --- <<IS-START(partition)>> ---
    // @subtype unknown
    // @sigtype java 3.5
    // [i] object:0:optional $idoclist
    // [i] field:0:optional $limit
    // [o] object:1:optional $idoclists
    IDataCursor cursor = pipeline.getCursor();
    try {
        IDocDocumentList list = IDataHelper.get(cursor, "$idoclist", IDocDocumentList.class);
        int limit = IDataHelper.getOrDefault(cursor, "$limit", Integer.class, 0);
        IDocDocumentList[] table = IDocDocumentListHelper.partition(list, limit);
        IDataHelper.put(cursor, "$idoclists", table, false);
        IDataHelper.put(cursor, "$idoclists.length", table == null ? 0 : table.length, String.class);
    } catch (IDocException ex) {
        ExceptionHelper.raise(ex);
    } finally {
        cursor.destroy();
    }
// --- <<IS-END>> ---
}
Also used : IDocDocumentList(com.sap.conn.idoc.IDocDocumentList) IDocException(com.sap.conn.idoc.IDocException)

Example 2 with IDocDocumentList

use of com.sap.conn.idoc.IDocDocumentList in project Tundra by Permafrost.

the class idoc method length.

public static final void length(IData pipeline) throws ServiceException {
    // --- <<IS-START(length)>> ---
    // @subtype unknown
    // @sigtype java 3.5
    // [i] object:0:optional $idoclist
    // [o] field:0:required $idoclist.length
    IDataCursor cursor = pipeline.getCursor();
    try {
        IDocDocumentList list = IDataHelper.get(cursor, "$idoclist", IDocDocumentList.class);
        IDataHelper.put(cursor, "$idoclist.length", list == null ? 0 : list.size(), String.class);
    } finally {
        cursor.destroy();
    }
// --- <<IS-END>> ---
}
Also used : IDocDocumentList(com.sap.conn.idoc.IDocDocumentList)

Example 3 with IDocDocumentList

use of com.sap.conn.idoc.IDocDocumentList in project Tundra by Permafrost.

the class idoc method identify.

// ---( server methods )---
public static final void identify(IData pipeline) throws ServiceException {
    // --- <<IS-START(identify)>> ---
    // @subtype unknown
    // @sigtype java 3.5
    // [i] object:0:optional $idoclist
    // [o] object:0:optional $idoclist
    IDataCursor cursor = pipeline.getCursor();
    try {
        IDocDocumentList list = IDataHelper.get(cursor, "$idoclist", IDocDocumentList.class);
        IDataHelper.put(cursor, "$idoclist", IDocDocumentListHelper.identify(list), false);
    } catch (Exception ex) {
        ExceptionHelper.raise(ex);
    } finally {
        cursor.destroy();
    }
// --- <<IS-END>> ---
}
Also used : IDocDocumentList(com.sap.conn.idoc.IDocDocumentList) InvocationTargetException(java.lang.reflect.InvocationTargetException) ServiceException(com.wm.app.b2b.server.ServiceException) IDocException(com.sap.conn.idoc.IDocException)

Aggregations

IDocDocumentList (com.sap.conn.idoc.IDocDocumentList)3 IDocException (com.sap.conn.idoc.IDocException)2 ServiceException (com.wm.app.b2b.server.ServiceException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1