com.worklight.jsonstore.api

Class JSONStoreAddOptions

  • java.lang.Object
    • com.worklight.jsonstore.api.JSONStoreAddOptions


  • public class JSONStoreAddOptions
    extends java.lang.Object
    Options that are used to modify the add operation in JSONStoreCollection.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addAdditionalSearchField(java.lang.String key, java.lang.Boolean value)
      Add an additional search field for the add operation.
      void addAdditionalSearchField(java.lang.String key, java.lang.Integer value)
      Add an additional search field for the add operation.
      void addAdditionalSearchField(java.lang.String key, java.lang.Number value)
      Add an additional search field for the add operation.
      void addAdditionalSearchField(java.lang.String key, java.lang.String value)
      Add an additional search field for the add operation.
      void addAdditionalSearchFields(org.json.JSONObject additional_search_fields)
      Add an additional search field for the add operation.
      void addAdditionalSearchFields(java.util.Map additional_search_fields)
      Add multiple additional search fields for the add operation.
      boolean isMarkDirty()
      Determine if the mark dirty flag is set or not.
      void setMarkDirty(boolean mark_dirty)
      Enable or disable the mark dirty flag.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JSONStoreAddOptions

        public JSONStoreAddOptions()
      • JSONStoreAddOptions

        public JSONStoreAddOptions(org.json.JSONObject json)
    • Method Detail

      • addAdditionalSearchFields

        public void addAdditionalSearchFields(org.json.JSONObject additional_search_fields)
        Add an additional search field for the add operation.
        Parameters:
        additional_search_fields - A JSONObject that contains key/value pairs for additional search fields.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the additional_search_fields parameter is null or empty.
      • addAdditionalSearchFields

        public void addAdditionalSearchFields(java.util.Map additional_search_fields)
        Add multiple additional search fields for the add operation.
        Parameters:
        additional_search_fields - A Map that contains key/value pairs for additional search fields.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the additional_search_fields parameter is null or empty.
      • addAdditionalSearchField

        public void addAdditionalSearchField(java.lang.String key,
                                    java.lang.String value)
                                      throws java.lang.IllegalArgumentException
        Add an additional search field for the add operation.
        Parameters:
        key - The key of additional search field to include with the document.
        value - The value of additional search field for 'key' to include with the document.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the key or value parameter is null.
      • addAdditionalSearchField

        public void addAdditionalSearchField(java.lang.String key,
                                    java.lang.Integer value)
                                      throws java.lang.IllegalArgumentException
        Add an additional search field for the add operation.
        Parameters:
        key - The key of additional search field to include with the document.
        value - The value of additional search field for 'key' to include with the document.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the key or value parameter is null.
      • addAdditionalSearchField

        public void addAdditionalSearchField(java.lang.String key,
                                    java.lang.Number value)
                                      throws java.lang.IllegalArgumentException
        Add an additional search field for the add operation.
        Parameters:
        key - The key of additional search field to include with the document.
        value - The value of additional search field for 'key' to include with the document.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the key or value parameter is null.
      • addAdditionalSearchField

        public void addAdditionalSearchField(java.lang.String key,
                                    java.lang.Boolean value)
        Add an additional search field for the add operation.
        Parameters:
        key - The key of additional search field to include with the document.
        value - The value of additional search field for 'key' to include with the document.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the key or value parameter is null.
      • setMarkDirty

        public void setMarkDirty(boolean mark_dirty)
        Enable or disable the mark dirty flag.
        Parameters:
        mark_dirty - If true, the document that is added will be marked dirty when it is added.
      • isMarkDirty

        public boolean isMarkDirty()
        Determine if the mark dirty flag is set or not.
        Returns:
        True if the setMarkDirty method has been called to mark the document dirty when it is added.
        See Also:
        JSONStoreAddOptions.setMarkDirty(boolean)


© Copyright IBM Corp. 2006, 2015. All Rights Reserved.