Class SellerGroup

Object
DomainObject
SellerGroup
All Implemented Interfaces:
GroupObject

@Embeddable public class SellerGroup extends DomainObject implements GroupObject
SellerGroup
  • Field Summary

    Fields inherited from class DomainObject

    DEFAULT_MAX_PACKET_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts SellerGroup to a filter object.
    asFilter(DMDataSource sellerDS)
    Returns resolved filter using the given Data Source, which should represent the Seller attributed object class.
    asFilter(DMDataSource sellerDS, Collection<DMDataSource> pxExtDS)
    Returns resolved filter using the given Seller Data Source and external Data Source, which should represent the Seller attributed object class.
    Converts SellerGroup into a filter including converting any SX searchable items into a custom filter.
    fromMap(ObjectMapper mapper, Map<String,Object> map)
    Creates SellerGroup object from a Map object that represents SellerGroup.
    Creates SellerGroup object from a Map object that represents SellerGroup.
    Allows you, for example, to use this object in a Datamart query with usage of the "where" clause.
    fromSimpleFilter(String sellerFieldName, String sellerFieldValue)
    Returns SellerGroup created from a simple fieldName and fieldValue filter.
    Get GroupObject as a filter including any extension valid for particular DomainObject into a custom filter Example:
    Get group context parameter name for the particular DomainObject Example:
    Get context parameter name for the particular DomainObject Example:
    Returns the seller field label when an item (not a filter statement) from the seller group picker is selected.
    Returns the seller field label when an item (not a filter statement) from the seller group picker is selected.
    Returns the seller field name when an item (not a filter statement) from the seller group picker is selected.
    Returns the seller field value when an item (not a filter statement) from the seller group picker is selected.
    Returns a filter as JSON by a criteria selected from the seller group picker.
    protected String
    Returns a filter as deserialized JSON by a criteria selected from the seller group picker.
    void
    Sets the new Seller Group input label.
    Example:
    void
    setSellerFieldLabel(String sellerFieldLabel)
    Sets a field label value of the SellerGroup object.
    Example:
    void
    setSellerFieldName(String sellerFieldName)
    Sets a field name value of the SellerGroup object.
    Example:
    void
    setSellerFieldValue(String sellerFieldValue)
    Sets a field value of the SellerGroup object.
    Example:
    void
    setSellerFilterCriteria(Map<String,Object> sellerFilterCriteriaMap)
    Sets the filter criteria from a map of filters for the SellerGroup.
    Example:
    protected void
    setSellerFilterCriteriaJson(String sellerFilterCriteria)
    Sets the filter criteria from a JSON filter for the SellerGroup.
    Example:
     

    Methods inherited from class DomainObject

    deepCopy, getNewMidnightDate, getNewMidnightDateTime, isMidnight, isMidnight, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerializedSizeOK, jsonSerializeToBytes, jsonSerializeToBytes, setToDayEnd, setToDayEnd, setToMidnight, setToMidnight, setToMidnightAsLocalDateTime, toPropertyMap

    Methods inherited from class Object

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

    • SellerGroup

      public SellerGroup()
  • Method Details

    • getLabel

      public String getLabel()
      Returns the seller field label when an item (not a filter statement) from the seller group picker is selected. The method is connected to the input field created by createSellerGroupEntry.

      Example:

      
       def inputMap = input.SellerGroup
       if (inputMap == null){
         return
       }
      
       def input = SellerGroup.fromMap(inputMap)
       String inputLabel = input.getLabel()
      
       return inputLabel
       
       
      Returns:
      The label value.
    • setLabel

      public void setLabel(String label)
      Sets the new Seller Group input label.
      Example:
      
       SellerGroup cg = api.sellerGroupEntry("SellerGroup")
       cg.setLabel("The new seller group label")
       
      Parameters:
      label - The new label of the Seller Group.
    • getSellerFieldName

      public String getSellerFieldName()
      Returns the seller field name when an item (not a filter statement) from the seller group picker is selected. The method is connected to the input field created by createSellerGroupEntry.

      Example:

      
       def inputMap = input.SellerGroup
       if (inputMap == null){
         return
       }
      
       def input = SellerGroup.fromMap(inputMap)
       String inputName = input.getSellerFieldName()
      
       return inputName
       
       
      Returns:
      The sellerFieldName value.
    • setSellerFieldName

      public void setSellerFieldName(String sellerFieldName)
      Sets a field name value of the SellerGroup object.
      Example:
      
       SellerGroup sellers = new SellerGroup()
       sellers.setSellerFieldName("sellerId")
       
      Parameters:
      sellerFieldName - The value of the seller field name.
    • getSellerFieldLabel

      public String getSellerFieldLabel()
      Returns the seller field label when an item (not a filter statement) from the seller group picker is selected. The method is connected to the input field created by createSellerGroupEntry.

      Example:

      
       def inputMap = input.SellerGroup
       if (inputMap == null){
         return
       }
      
       def input = SellerGroup.fromMap(inputMap)
       String inputLabel = input.getSellerFieldLabel()
      
       return inputLabel
       
       
      Returns:
      The value of the label for the SellerGroup object.
    • setSellerFieldLabel

      public void setSellerFieldLabel(String sellerFieldLabel)
      Sets a field label value of the SellerGroup object.
      Example:
      
        SellerGroup sellers = new SellerGroup()
        sellers.setSellerFieldLabel("The Seller Label")
       
      Parameters:
      sellerFieldLabel - The value of the seller field label for the SellerGroup object.
    • getSellerFieldValue

      public String getSellerFieldValue()
      Returns the seller field value when an item (not a filter statement) from the seller group picker is selected. The method is connected to the input field created by createSellerGroupEntry.

      Example:

      
       def inputMap = input.SellerGroup
       if (inputMap == null){
         return
       }
      
       def input = SellerGroup.fromMap(inputMap)
       String inputValue = input.getSellerFieldValue()
      
       return inputValue
       
       
      Returns:
      The sellerFieldValue value.
    • setSellerFieldValue

      public void setSellerFieldValue(String sellerFieldValue)
      Sets a field value of the SellerGroup object.
      Example:
      
       SellerGroup sellers = new SellerGroup()
       sellers.setSellerFieldValue("123456789")
       
      Parameters:
      sellerFieldValue - The value of the field for the SellerGroup object.
    • getSellerFilterCriteriaJson

      protected String getSellerFilterCriteriaJson()
      Returns a filter as deserialized JSON by a criteria selected from the seller group picker. The method is connected to the input field created by createSellerGroupEntry.

      Example:

      
       def inputMap = input.SellerGroup
       if (inputMap == null){
         return
       }
      
       def input = SellerGroup.fromMap(inputMap)
       String inputFilterJson = input.getSellerFilterCriteria()
      
       return inputFilterJson
       
       
      Returns:
      The deserialized JSON formatted filter object.
    • setSellerFilterCriteriaJson

      protected void setSellerFilterCriteriaJson(String sellerFilterCriteria)
      Sets the filter criteria from a JSON filter for the SellerGroup.
      Example:
      
      
       def inputMap = input.SellerGroup
                if (inputMap == null){
                 return
                  }
       def input = SellerGroup.fromMap(inputMap)
       Map filterJson = """{
          "_constructor":"AdvancedCriteria",
          "operator":"and",
          "criteria":[
             {
                "fieldName":"sellerId",
                "operator":"iEquals",
                "value":"123456789"
             }
          ]
       }
       """
      
       SellerGroup newsg = new SellerGroup()
       newsg.setSellerFilterCriteriaJson(filterJson)
       return newsg
       >
      Parameters:
      sellerFilterCriteria - The filter criteria as a JSON representation.
    • getSellerFilterCriteria

      public Map<String,Object> getSellerFilterCriteria()
      Returns a filter as JSON by a criteria selected from the seller group picker. The method is connected to the input field created by createSellerGroupEntry.

      Example:

      
       def inputMap = input.SellerGroup
       if (inputMap == null){
         return
       }
      
       def input = SellerGroup.fromMap(inputMap)
       String inputFilterJson = input.getSellerFilterCriteriaJson()
      
       return inputFilterJson
       
       
      Returns:
      The JSON formatted filter.
    • setSellerFilterCriteria

      public void setSellerFilterCriteria(Map<String,Object> sellerFilterCriteriaMap)
      Sets the filter criteria from a map of filters for the SellerGroup.
      Example:
      
       def inputMap = input.SellerGroup
                if (inputMap == null){
                 return
                  }
       def input = SellerGroup.fromMap(inputMap)
       Map filterJson = [_constructor: "AdvancedCriteria",
                                        operator    : "and",
                                        criteria    : [
                                                [
                                                        fieldName   : "sellerId",
                                                        operator    : "equals",
                                                        value       : "123456789",
                                                        _constructor: "AdvancedCriteria"
                                                ]
                                        ]
           ]
      
      
       SellerGroup newsg = new SellerGroup()
       newsg.setSellerFilterCriteria(filterJson)
       return newsg
       
      Parameters:
      sellerFilterCriteriaMap - The seller filter criteria as a map.
    • asFilter

      public Filter asFilter()
      Converts SellerGroup to a filter object. Creates Filter from instance properties sellerFieldName and sellerFieldValue, or from sellerCriteria. Can return null.

      Example:

      
       def sellerGroupMap = input.SellerGroup
       if (sellerGroupMap == null){
         return
       }
      
       def sellers = api.find("P", (input.SellerGroup as SellerGroup)?.asFilter())
       return sellers
       
      Returns:
      The filter object.
    • asFilterWithSXSubQuery

      public Filter asFilterWithSXSubQuery()
      Converts SellerGroup into a filter including converting any SX searchable items into a custom filter. Not intended for PA.

      Example:

      >
       def sellerGroup = input.SellerGroup
      
       SellerGroup sg = SellerGroup.fromMap(input.SellerGroup)
       def sellers = api.find("SL", sg.asFilterWithSXSubQuery())
       
      Returns:
      The filter object.
    • asFilter

      public Filter asFilter(DMDataSource sellerDS) throws DMFieldNotFoundException
      Returns resolved filter using the given Data Source, which should represent the Seller attributed object class.
      Parameters:
      sellerDS - Seller Data Source.
      Returns:
      The filter object.
      Throws:
      DMFieldNotFoundException
    • asFilter

      public Filter asFilter(DMDataSource sellerDS, Collection<DMDataSource> pxExtDS) throws DMFieldNotFoundException
      Returns resolved filter using the given Seller Data Source and external Data Source, which should represent the Seller attributed object class.
      Parameters:
      sellerDS - Seller Data Source. Must not be null.
      pxExtDS - External Data Source.
      Returns:
      The filter object.
      Throws:
      DMFieldNotFoundException
    • fromMap

      public static SellerGroup fromMap(Map<String,Object> map)
      Creates SellerGroup object from a Map object that represents SellerGroup.
      Allows you, for example, to use this object in a Datamart query with usage of the "where" clause.

      Example:

      
       def sgInput = api.sellerGroupEntry("Entry")
       SellerGroup cg = SellerGroup.fromMap(sgInput)
       
      Parameters:
      map - The representation of SellerGroup as a Map.
      Returns:
      The SellerGroup object.
    • fromMap

      public static SellerGroup fromMap(ObjectMapper mapper, Map<String,Object> map)
      Creates SellerGroup object from a Map object that represents SellerGroup.
      Parameters:
      mapper - The JSON object mapper.
      map - The representation of SellerGroup as a Map.
      Returns:
      The SellerGroup object.
    • fromSimpleFilter

      public static SellerGroup fromSimpleFilter(String sellerFieldName, String sellerFieldValue)
      Returns SellerGroup created from a simple fieldName and fieldValue filter.

      Example:

      
       SellerGroup sellerGroup = SellerGroup.fromSimpleFilter('sellerId', "P12345")
       
      Parameters:
      sellerFieldName - The name of the field from the Seller Master table used in the simple filter.
      sellerFieldValue - The value of the field from the Seller Master table used in the simple filter.
      Returns:
      The SellerGroup object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDomainFilter

      public Filter getDomainFilter()
      Description copied from interface: net.pricefx.domain.GroupObject
      Get GroupObject as a filter including any extension valid for particular DomainObject into a custom filter Example:
      
       def customerGroup = api.customerGroupEntry('Select customers:')
       def domainFilter = customerGroup.getDomainFilter()
       def customers = api.find('C', domainFilter)
       
      Specified by:
      getDomainFilter in interface GroupObject
      Returns:
      The filter object.
    • getDomainTableName

      public String getDomainTableName()
      Description copied from interface: net.pricefx.domain.GroupObject
      Get context parameter name for the particular DomainObject Example:
      
       def customerGroup = api.customerGroupEntry('Select customers:')
       def domainTableName = customerGroup.getDomainTableName()
       api.trace('domain table', domainTableName)   // == 'Customer'
       
      Specified by:
      getDomainTableName in interface GroupObject
      Returns:
      The domain object name
    • getDomainObjectType

      public String getDomainObjectType()
      Description copied from interface: net.pricefx.domain.GroupObject
      Get group context parameter name for the particular DomainObject Example:
      
       def customerGroup = api.customerGroupEntry('Select customers:')
       def domainObjectType = customerGroup.getDomainObjectType()
       api.trace('domain type', domainObjectType)   // == 'CustomerGroup'
       
      Specified by:
      getDomainObjectType in interface GroupObject
      Returns:
      The domain object type name