Class BatchUpdate

java.lang.Object
org.apache.unomi.api.BatchUpdate

public class BatchUpdate extends Object
A representation of an operation to update the value of a property on items matching a specific condition.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the condition which items we want to update must satisfy.
    Retrieves the property name which value needs to be updated.
    Retrieves the new property value.
    int
    Batch update will perform scroll queries to query document to be updated, the scroll batch size allow specifying how many document we want to load per scroll.
    Batch update will perform scroll queries to query document to be updated, the scroll time validity allow specifying how much time the scroll context should stay open in memory to be able to complete the update.
    Retrieves the identifier for the PropertyMergeStrategyType to use during the update if needed.
    void
    Specifies the condition which items to update.
    void
    setPropertyName(String propertyName)
    Specifies (as an Apache Commons BeanUtils expression) which property needs to be updated.
    void
    setPropertyValue(Object propertyValue)
    Sets the new property value to use for the update.
    void
    setScrollBatchSize(int scrollBatchSize)
    Batch update will perform scroll queries to query document to be updated, the scroll batch size allow specifying how many document we want to load per scroll.
    void
    setScrollTimeValidity(String scrollTimeValidity)
    Batch update will perform scroll queries to query document to be updated, the scroll time validity allow specifying how much time the scroll context should stay open in memory to be able to complete the update.
    void
    setStrategy(String strategy)
    Sets the identifier for the PropertyMergeStrategyType to use during the update if needed.

    Methods inherited from class java.lang.Object

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

    • BatchUpdate

      public BatchUpdate()
  • Method Details

    • getPropertyName

      public String getPropertyName()
      Retrieves the property name which value needs to be updated. Note that the property name follows the Apache Commons BeanUtils expression format
      Returns:
      an Apache Commons BeanUtils expression identifying which property we want to update
    • setPropertyName

      public void setPropertyName(String propertyName)
      Specifies (as an Apache Commons BeanUtils expression) which property needs to be updated.
      Parameters:
      propertyName - an Apache Commons BeanUtils expression identifying which property we want to update
    • getPropertyValue

      public Object getPropertyValue()
      Retrieves the new property value.
      Returns:
      the new property value
    • setPropertyValue

      public void setPropertyValue(Object propertyValue)
      Sets the new property value to use for the update.
      Parameters:
      propertyValue - the new property value to use for the update
    • getCondition

      public Condition getCondition()
      Retrieves the condition which items we want to update must satisfy.
      Returns:
      the condition which items we want to update must satisfy
    • setCondition

      public void setCondition(Condition condition)
      Specifies the condition which items to update.
      Parameters:
      condition - the condition specifying which items to update
    • getStrategy

      public String getStrategy()
      Retrieves the identifier for the PropertyMergeStrategyType to use during the update if needed.
      Returns:
      the identifier for the PropertyMergeStrategyType to use during the update if needed
    • setStrategy

      public void setStrategy(String strategy)
      Sets the identifier for the PropertyMergeStrategyType to use during the update if needed.
      Parameters:
      strategy - the identifier for the PropertyMergeStrategyType to use during the update if needed
    • getScrollTimeValidity

      public String getScrollTimeValidity()
      Batch update will perform scroll queries to query document to be updated, the scroll time validity allow specifying how much time the scroll context should stay open in memory to be able to complete the update.
      Returns:
      the scroll time validity (default: 10m)
    • setScrollTimeValidity

      public void setScrollTimeValidity(String scrollTimeValidity)
      Batch update will perform scroll queries to query document to be updated, the scroll time validity allow specifying how much time the scroll context should stay open in memory to be able to complete the update.
      Parameters:
      scrollTimeValidity - the scroll time validity in time unit
    • getScrollBatchSize

      public int getScrollBatchSize()
      Batch update will perform scroll queries to query document to be updated, the scroll batch size allow specifying how many document we want to load per scroll.
      Returns:
      the scroll batch size (default: 1000)
    • setScrollBatchSize

      public void setScrollBatchSize(int scrollBatchSize)
      Batch update will perform scroll queries to query document to be updated, the scroll batch size allow specifying how many document we want to load per scroll.
      Parameters:
      scrollBatchSize - the scroll batch size (default: 1000)