Package net.pricefx.domain
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
-
Method Summary
Modifier and TypeMethodDescriptionasFilter()
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.static SellerGroup
Creates SellerGroup object from a Map object that represents SellerGroup.static 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.static SellerGroup
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:getLabel()
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:toString()
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
-
Constructor Details
-
SellerGroup
public SellerGroup()
-
-
Method Details
-
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 bycreateSellerGroupEntry
.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
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
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 bycreateSellerGroupEntry
.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
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
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 bycreateSellerGroupEntry
.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
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
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 bycreateSellerGroupEntry
.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
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
Returns a filter as deserialized JSON by a criteria selected from the seller group picker. The method is connected to the input field created bycreateSellerGroupEntry
.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
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
Returns a filter as JSON by a criteria selected from the seller group picker. The method is connected to the input field created bycreateSellerGroupEntry
.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
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
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
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
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
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
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
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
-
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 interfaceGroupObject
- Returns:
- The filter object.
-
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 interfaceGroupObject
- Returns:
- The domain object name
-
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 interfaceGroupObject
- Returns:
- The domain object type name
-