Class WTPartEffectivityConfigSpec
- All Implemented Interfaces:
Externalizable,Serializable,wt.fc._NetFactor,wt.fc._ObjectMappable,NetFactor,ObjectMappable,ConfigSpec
- Direct Known Subclasses:
wt.part._PlantEffectivityConfigSpec
- Date- Selects parts which have date effectivity without regard to Configuration Item.
- Date and View- Same as "Date," but the part must also be in the specified View.
- Date and Configuration Item- Selects parts which have date effectivity for the specified Configuration Item; also selects parts which have date effectivity without regard to Configuration Item.
- Date and Configuration Item and View- Same as "Date and Configuration Item," but the part must also be in the specified view.
- Date and Configuration Item and Unit Number (Serial or Lot)- Selects parts which have unit effectivity for the specified Configuration Item; also selects parts which have date effectivity with regard to no Configuration Item.
- Date and Configuration Item and Unit Number (Serial or Lot) and View- Same as "Date and Configuration Item and Unit Number," but the part must also be in the specified View.
- Configuration Item and Unit Number (Serial or Lot)- Selects parts which have unit effectivity with regard to the specified Configuration Item.
- Configuration Item and Unit Number (Serial or Lot) and View- Same as "Configuration Item and Unit Number," but the part must also be in in the specified View.
This ConfigSpec considers only versions (latest iterations), and returns at most one version per master (the latest eligible version).
Use the newWTPartEffectivityConfigSpec static factory method(s), not the
WTPartEffectivityConfigSpec constructor, to construct instances of this class. Instances must be
constructed using the static factory(s), in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields inherited from class wt.part._WTPartEffectivityConfigSpec
EFF_TYPE, EFFECTIVE_DATE, EFFECTIVE_UNIT, VARIATION1, VARIATION2 -
Method Summary
Modifier and TypeMethodDescriptionappendSearchCriteria(QuerySpec querySpec) Appends to the supplied QuerySpec additional search criteria to reduce the resulting iterations to only those that will be considered by this ConfigSpec.Gets the value of the attribute: EFFECTIVE_CONFIG_ITEM.Gets the value of the attribute: EFFECTIVE_CONTEXT.Gets the value of the attribute: EFFECTIVE_DATE.Gets the value of the attribute: EFFECTIVE_PRODUCT.Gets the value of the attribute: EFFECTIVE_PRODUCT_INSTANCE.Gets the value of the attribute: EFFECTIVITY_TYPE.wt.vc.config.RelationalConfigSpecReturns aRelationalConfigSpecthat wraps theRelationalConfigSpecBridgeto ensure proper ranking byVariation1andVariation2.getView()Gets the value of the attribute: VIEW.process(QueryResult results) Process the QueryResult of iterations, returning only those that "match" according to the algorithm.voidsetEffectiveConfigItem(ConfigurationItem a_EffectiveConfigItem) Sets the value of the attribute: EFFECTIVE_CONFIG_ITEM.voidsetEffectiveContext(EffContext a_EffectiveContext) Sets the value of the attribute: EFFECTIVE_CONTEXT.voidsetEffectiveDate(Timestamp a_EffectiveDate) Sets the value of the attribute: EFFECTIVE_DATE.voidsetEffectiveProduct(WTPartMaster a_EffectiveProduct) Sets the value of the attribute: EFFECTIVE_PRODUCT.voidsetEffectiveProductInstance(WTProductInstance a_EffectiveProductInstance) Deprecated.use supported SetEffectiveContext and setEffectiveUnit insteadvoidsetEffectiveUnit(String a_EffectiveUnit) Sets the value of the attribute: EFFECTIVE_UNIT.voidsetEffType(String a_EffType) Sets the value of the attribute: EFF_TYPE.voidSets the value of the attribute: VIEW.Methods inherited from class wt.part._WTPartEffectivityConfigSpec
getEffectiveUnit, getEffType, getVariation1, getVariation2, setVariation1, setVariation2
-
Method Details
-
getEffectiveDate
Gets the value of the attribute: EFFECTIVE_DATE. Effective revisions will have an effective date range which includes this date.
Supported API: true- Overrides:
getEffectiveDatein class_WTPartEffectivityConfigSpec- Returns:
- Timestamp
- See Also:
-
setEffectiveDate
Sets the value of the attribute: EFFECTIVE_DATE. Effective revisions will have an effective date range which includes this date.
Supported API: true- Overrides:
setEffectiveDatein class_WTPartEffectivityConfigSpec- Parameters:
a_EffectiveDate-- Throws:
WTPropertyVetoException- See Also:
-
setEffectiveUnit
Sets the value of the attribute: EFFECTIVE_UNIT. Effective revisions will have a unit number range which inclues this number.
Supported API: true- Overrides:
setEffectiveUnitin class_WTPartEffectivityConfigSpec- Parameters:
a_EffectiveUnit-- Throws:
WTPropertyVetoException- See Also:
-
getEffectivityType
Gets the value of the attribute: EFFECTIVITY_TYPE. The EffectivityType of the effectiveConfigItem attribute; A derived attribute.
Supported API: true- Returns:
- EffectivityType
- See Also:
-
getEffectiveContext
Gets the value of the attribute: EFFECTIVE_CONTEXT. Effective revisions will have effectivity which specifies this effectivity context. A derived attribute.
Supported API: true- Returns:
- EffContext
- See Also:
-
setEffectiveContext
Sets the value of the attribute: EFFECTIVE_CONTEXT. Effective revisions will have effectivity which specifies this effectivity context. A derived attribute.
Supported API: true- Parameters:
a_EffectiveContext-- Throws:
WTPropertyVetoException- See Also:
-
getEffectiveConfigItem
Gets the value of the attribute: EFFECTIVE_CONFIG_ITEM. Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
Supported API: true- Returns:
- ConfigurationItem
- See Also:
-
setEffectiveConfigItem
public void setEffectiveConfigItem(ConfigurationItem a_EffectiveConfigItem) throws WTPropertyVetoException Sets the value of the attribute: EFFECTIVE_CONFIG_ITEM. Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
Supported API: true- Parameters:
a_EffectiveConfigItem-- Throws:
WTPropertyVetoException- See Also:
-
getEffectiveProductInstance
Gets the value of the attribute: EFFECTIVE_PRODUCT_INSTANCE. Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
Supported API: true- Returns:
- WTProductInstance
- See Also:
-
setEffectiveProductInstance
public void setEffectiveProductInstance(WTProductInstance a_EffectiveProductInstance) throws WTPropertyVetoException Deprecated.use supported SetEffectiveContext and setEffectiveUnit insteadSets the value of the attribute: EFFECTIVE_PRODUCT_INSTANCE. Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
Supported API: true- Parameters:
a_EffectiveProductInstance-- Throws:
WTPropertyVetoException- See Also:
-
getEffectiveProduct
Gets the value of the attribute: EFFECTIVE_PRODUCT. Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
Supported API: true- Returns:
- WTPartMaster
- See Also:
-
setEffectiveProduct
Sets the value of the attribute: EFFECTIVE_PRODUCT. Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
Supported API: true- Parameters:
a_EffectiveProduct-- Throws:
WTPropertyVetoException- See Also:
-
getView
Gets the value of the attribute: VIEW. If set, only those objects assigned to the view or view-independent are returned. If no WTParts match the view, the parent is checked (until there is either at least one match or no parent).
Supported API: true- Returns:
- View
-
setView
Sets the value of the attribute: VIEW. If set, only those objects assigned to the view or view-independent are returned. If no WTParts match the view, the parent is checked (until there is either at least one match or no parent).
Supported API: true- Parameters:
a_View-- Throws:
WTPropertyVetoException
-
setEffType
Sets the value of the attribute: EFF_TYPE.
Supported API: true- Overrides:
setEffTypein class_WTPartEffectivityConfigSpec- Parameters:
a_EffType-- Throws:
WTPropertyVetoException- See Also:
-
appendSearchCriteria
Appends to the supplied QuerySpec additional search criteria to reduce the resulting iterations to only those that will be considered by this ConfigSpec. Appending additional classes to the QuerySpec is allowed (for join purposes), but those that are marked as selectable will be trimmed by "filteredIterationsOf" prior to it calling the "process" API.The QueryResult returned should be a copy of the passed in one (taking advantage of side-effects is not encouraged).
Supported API: true- Parameters:
querySpec- A QuerySpec with a target class that is Iterated.- Returns:
- QuerySpec
- Throws:
WTExceptionQueryException- See Also:
-
process
Process the QueryResult of iterations, returning only those that "match" according to the algorithm.The QueryResult returned should be a copy of the passed-in QueryResult (side-effects should be avoided).
Supported API: true- Parameters:
results- QueryResult of iterations to filter. Assumed to be the result of a query that included the additional search conditions applied by appendSearchCriteria. Note that after enumerating through the elements of this QueryResult, it should be reset.- Returns:
- QueryResult
- Throws:
WTException- See Also:
-
getRelationalConfigSpec
Returns aRelationalConfigSpecthat wraps theRelationalConfigSpecBridgeto ensure proper ranking byVariation1andVariation2. Returns the ConfigSpec to use when relationalizing this config spec. This is either aConfigSpecor aRelationalConfigSpec. A relatianalized config spec utilizes the database (viaappendSearchCriteria(QuerySpec)) to remove the need to post-process the QueryResult usingConfigSpec.process(QueryResult).Typical return values are:
- null if the config spec can not/does not support moving everything to the database
- this if the config spec itself supports relationalization
- a
RelationalConfigSpec(such as theRelationalConfigSpecBridge) which wraps the existing config spec to move processing into the database.
Note: It is discouraged to return null as config specs that don't support relationalization can not be used by straight-query implementations. For example, it is possible to navigate the
WTPartUsageLinkand the other side iterations in one database hit by applying a relational config spec; a non-relational config spec would need to navigate to the master in one hit and then resolve the masters to iterations in a second, followed by post-processing to remove unnecessary iterations.
Supported API: true- Returns:
- null if the ConfigSpec does not support relationalization, otherwise a config spec that does
- Throws:
WTException- anticipates the case where factory methods needlessly throw WTExeception
-