Class ObjRefAction<T extends Help>
Object
Action
ObjRefAction<T>
- All Implemented Interfaces:
Help
public class ObjRefAction<T extends Help>
extends Action
This action renews the object references of a partition. It allows the user to schedule the
renewal in a Calculation Flow logic.
Use setPartition(), setTypeCode() and setFilter() to select the
objects whose references are renewed.
Object references let lookups such as api.customerToRelatedObjectsFilter() find the documents that apply to a
customer or a product. Renew them after a change in the customer or product master data, for example when a
customer is added to a customer group.
Obtain it with CalculationFlowActionBuilder.addObjRefAction(). The action has no setCalculate()
method: adding it starts the renewal. It requests one background job for each object type it renews: Price Records
(PR), Contracts (CT) and Rebate Agreements (RBA). If an identical job is still waiting, no new
job is added.
Example, renewing the references of Contracts:
actionBuilder.addObjRefAction()
.setTypeCode('CT')
- See Also:
-
Field Summary
Fields inherited from class Action
jobs -
Constructor Summary
ConstructorsConstructorDescriptionObjRefAction(T backLink, Invocations<MethodInvocationRecord> invocations) Not intended for public use. -
Method Summary
Modifier and TypeMethodDescriptionback()Returns the builder that added this action, so that the logic can add the next action in the same chain.Gets the filter set withsetFilter(Object).Not intended for public use.Gets the partition set withsetPartition(String).Gets the type code set withsetTypeCode(String).Restricts the renewal to the objects that match a filter.setPartition(String partition) Sets the partition that the renewal is meant for.setTypeCode(String typeCode) Restricts the renewal to one object type:PR,CTorRBA.toString()Returns a text representation of this action for debugging.
-
Constructor Details
-
ObjRefAction
Not intended for public use. An action created with this constructor is not added to the Calculation Flow, so it never runs. UseactionBuilder.addObjRefAction()instead.- See Also:
-
-
Method Details
-
setPartition
Sets the partition that the renewal is meant for. The renewal always runs in the partition of the logic. Outside the system partition, the action renews nothing when you set a different partition.- Parameters:
partition- partition the object references will be renewed for.- Returns:
- this action, for further configuration
-
setTypeCode
Restricts the renewal to one object type:PR,CTorRBA. If you do not set it, all three types are renewed. With any other type code, no job starts.- Parameters:
typeCode- type code of domain object the object references will be renewed for.- Returns:
- this action, for further configuration
-
setFilter
Restricts the renewal to the objects that match a filter. The filter must be aFilter, for example one built withFilter.equal(). With any other object, no job starts. The filter applies to the objects of each type that the action renews.- Parameters:
filter- restricts object references renewal to a subset defined by filter.- Returns:
- this action, for further configuration
-
back
Returns the builder that added this action, so that the logic can add the next action in the same chain.- Returns:
- the
actionBuilderthat added this action - See Also:
-
getObjectName
Not intended for public use.- Returns:
- the name of the builder that added this action, followed by
".ObjRefAction"
-
getPartition
Gets the partition set withsetPartition(String).- Returns:
- the partition
-
getTypeCode
Gets the type code set withsetTypeCode(String).- Returns:
- the type code
-
getFilter
Gets the filter set withsetFilter(Object).- Returns:
- the filter
-
toString
Returns a text representation of this action for debugging.
-