com.worklight.jsonstore.api

Class JSONStoreChangeOptions

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


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

      Methods 
      Modifier and Type Method and Description
      void addSearchFieldToCriteria(java.lang.String search_field)
      Add a search field to the criteria.
      java.util.List getSearchFieldCriteria() 
      boolean isAddNew()
      Determine if the add new flag is set or not.
      boolean isMarkDirty()
      Determine if the mark dirty flag is set or not.
      void setAddNew(boolean add_new)
      Enable or disable if the document should be added if a previously stored document could not be found.
      void setMarkDirty(boolean mark_dirty)
      Enable or disable the mark dirty flag.
      void setSearchFieldCriteria(java.util.List search_fields)
      Set the search field criteria to the list of strings that are passed.
      • Methods inherited from class java.lang.Object

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

      • JSONStoreChangeOptions

        public JSONStoreChangeOptions()
      • JSONStoreChangeOptions

        public JSONStoreChangeOptions(org.json.JSONObject js_options)
                               throws org.json.JSONException
        Throws:
        org.json.JSONException
    • Method Detail

      • addSearchFieldToCriteria

        public void addSearchFieldToCriteria(java.lang.String search_field)
        Add a search field to the criteria. This appends to an existing list of criteria and can be called multiple times.
        Parameters:
        search_field - A search field that is used to compare in the database that is found in the document.
      • setSearchFieldCriteria

        public void setSearchFieldCriteria(java.util.List search_fields)
        Set the search field criteria to the list of strings that are passed. Any existing criteria are replaced.
        Parameters:
        search_fields - The search criteria to use.
      • getSearchFieldCriteria

        public java.util.List getSearchFieldCriteria()
      • 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 changed.
      • 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 changed.
        See Also:
        JSONStoreChangeOptions.setMarkDirty(boolean)
      • setAddNew

        public void setAddNew(boolean add_new)
        Enable or disable if the document should be added if a previously stored document could not be found.
        Parameters:
        add_new - If true, the document will be added if a match could not be found in the collection.
      • isAddNew

        public boolean isAddNew()
        Determine if the add new flag is set or not.
        Returns:
        True if the document will be added if a match could not be found in the collection.
        See Also:
        JSONStoreChangeOptions.setAddNew(boolean)


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