com.ibm.tivoli.maximo.fdmbo

Class CloudantMboSet

    • Constructor Detail

      • CloudantMboSet

        public CloudantMboSet(MboServerInterface ms)
                       throws java.rmi.RemoteException
        Constructor
        Parameters:
        ms - The Cloudant MboSet.
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
    • Method Detail

      • getURI

        public java.lang.String getURI()
        Returns URL.
        Returns:
        URL
      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Generate a new Clodant object.
        Overrides:
        getMboInstance in class RESTMboSet
        Parameters:
        ms -
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • addOrderBy

        protected java.lang.String addOrderBy(java.lang.String url,
                                              java.lang.String orderBy)
        Adds Order By to URL. THis method does not have to be implemented for Cloudant
        Overrides:
        addOrderBy in class RESTMboSet
        Parameters:
        url - REST URL
        orderBy - order by clause
        Returns:
        formated URL
        Throws:
        MXException - Maximo Exception
      • getHTTPQueryMethod

        public java.lang.String getHTTPQueryMethod()
        Return HTTP method for the call.
        Overrides:
        getHTTPQueryMethod in class RESTMboSet
        Returns:
        POST for the Cludant
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • formatPostData

        public byte[] formatPostData(int index,
                                     boolean forCount)
                              throws java.rmi.RemoteException,
                                     MXException
        Formats where clause for POST.
        Overrides:
        formatPostData in class RESTMboSet
        Parameters:
        index - Index of the row from getMbo(index)
        forCount - indicates if only count need to be retrieved
        Returns:
        byte data for POST
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • formatPostDataForNextPage

        public byte[] formatPostDataForNextPage(byte[] data,
                                                int index)
                                         throws java.rmi.RemoteException,
                                                MXException
        Formats data for next page. Used if paging is enabled
        Overrides:
        formatPostDataForNextPage in class RESTMboSet
        Parameters:
        data - original POST data
        index - Index of the row from getMbo(index)
        Returns:
        byte data for next page retrieval
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • format

        public JSONQuery format(JSONQuery formater,
                                JSONResourceInfo resourceInfo,
                                java.lang.String where,
                                boolean forCount,
                                int index)
                         throws java.rmi.RemoteException,
                                MXException
        Formats full where clause.
        Parameters:
        formater - JSONQuery
        resourceInfo - resource info
        where - where clause
        index - Index of the row from getMbo(index)
        forCount - indicates if only count need to be retrieved
        Returns:
        JSONQuery with data for POST
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • addPaging

        public JSONQuery addPaging(JSONQuery formater,
                                   int index,
                                   boolean forCount)
                            throws java.rmi.RemoteException,
                                   MXException
        Add paging parameters if paging is enabled.
        Parameters:
        formater - JSONQuery
        index - Index of the row from getMbo(index)
        forCount - indicates if only count need to be retrieved
        Returns:
        JSONQuery
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • formatQBE

        public JSONQuery formatQBE(JSONQuery formater,
                                   JSONResourceInfo resourceInfo,
                                   boolean forCount,
                                   int index)
                            throws java.rmi.RemoteException,
                                   MXException
        Formats QBE.
        Parameters:
        formater - JSONQuery
        resourceInfo - resource info
        index - Index of the row from getMbo(index)
        forCount - indicates if only count need to be retrieved
        Returns:
        JSONQuery
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • bulkUpdate

        public void bulkUpdate()
                        throws java.rmi.RemoteException,
                               MXException
        Performs bulk update back to Cloudant.
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • setAdditionalData

        public void setAdditionalData(MboRemote mbo,
                                      com.ibm.json.java.JSONObject jo)
                               throws MXException,
                                      java.rmi.RemoteException
        It will set id and revision.
        Overrides:
        setAdditionalData in class JSONMboSet
        Parameters:
        mbo - Maximo object
        jo - JSON Object to get data
        mbo - processing object
        jo - JSON object
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • setAttributeValue

        protected void setAttributeValue(java.lang.String attributeName,
                                         java.lang.Object value,
                                         MboRemote mbo)
                                  throws java.rmi.RemoteException,
                                         MXException
        Set the attribute value to a serialized mbo from JSON.
        Parameters:
        attributeName - The attribute name.
        value - The value to be set.
        mbo - The serialized mbo.
        Throws:
        java.rmi.RemoteException
        MXException
      • getUrl

        public java.lang.String getUrl(HTTPHandler handler,
                                       boolean forCount)
                                throws MXException,
                                       java.rmi.RemoteException
        Returns URL.
        Overrides:
        getUrl in class RESTMboSet
        Parameters:
        handler - Handler name
        forCount - indicates if only count need to be retrieved
        Returns:
        URL
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • getStringQualifier

        public java.lang.String getStringQualifier()
        Return string qualifies. If null - no qualifier. So value can be abc or 'abc'
        Overrides:
        getStringQualifier in class RESTMboSet
        Returns:
        count clause