callObject.setOpnum ( 1 );
callObject.setOpnum ( 0 );
    public KeyedResultSet<OPCITEMDEF, OPCITEMRESULT> add ( OPCITEMDEF ... items ) throws JIException    {        if ( items.length == 0 )            return new KeyedResultSet<OPCITEMDEF, OPCITEMRESULT> ();                JICallObject callObject = new JICallObject ( _opcItemMgt.getIpid (), true );        callObject.setOpnum ( 1 );                JIStruct struct[] = new JIStruct[items.length];        for ( int i = 0; i < items.length; i++ )        {            struct[i] = items[i].toStruct ();        }        JIArray itemArray = new JIArray ( struct, true);                callObject.addInParamAsInt ( items.length, JIFlags.FLAG_NULL );        callObject.addInParamAsArray ( itemArray, JIFlags.FLAG_NULL );        callObject.addOutParamAsObject ( new JIPointer ( new JIArray ( OPCITEMRESULT.getStruct (), null, 1, true ) ), JIFlags.FLAG_NULL );        callObject.addOutParamAsObject ( new JIPointer ( new JIArray ( Integer.class, null, 1, true ) ), JIFlags.FLAG_NULL );                Object result[] = Helper.callRespectSFALSE ( _opcItemMgt, callObject );                JIStruct[] results = (JIStruct[]) ( (JIArray) ( (JIPointer)result[0] ).getReferent () ).getArrayInstance ();        Integer[] errorCodes = (Integer[]) ( (JIArray) ( (JIPointer)result[1] ).getReferent () ).getArrayInstance ();                KeyedResultSet<OPCITEMDEF, OPCITEMRESULT> resultList = new KeyedResultSet<OPCITEMDEF, OPCITEMRESULT> ( items.length );        for ( int i = 0; i < items.length ; i++ )        {            OPCITEMRESULT itemResult = OPCITEMRESULT.fromStruct ( results[i] );            KeyedResult<OPCITEMDEF,OPCITEMRESULT> resultEntry = new KeyedResult<OPCITEMDEF,OPCITEMRESULT> ( items[i], itemResult, errorCodes[i] );            resultList.add ( resultEntry );        }                return resultList;    }