Package wt.part

Class WTPartEffectivityConfigSpec

java.lang.Object
wt.part._WTPartEffectivityConfigSpec
wt.part.WTPartEffectivityConfigSpec
All Implemented Interfaces:
Externalizable, Serializable, wt.fc._NetFactor, wt.fc._ObjectMappable, NetFactor, ObjectMappable, ConfigSpec
Direct Known Subclasses:
wt.part._PlantEffectivityConfigSpec

@GenAsObjectMappable(interfaces=ConfigSpec.class,versions={2439911398243154438L,-2444886883263310700L},properties={@GeneratedProperty(name="effectiveDate",type=java.sql.Timestamp.class,supportedAPI=PUBLIC,javaDoc="Effective revisions will have an effective date range which includes this date. @see wt.effectivity.Effectivity"),@GeneratedProperty(name="effectiveUnit",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="Effective revisions will have a unit number range which inclues this number. @see wt.effectivity.Effectivity"),@GeneratedProperty(name="effectiveContextRef",type=ObjectReference.class,supportedAPI=PRIVATE,javaDoc="Internal representation of a ConfigurationItem. Effective revisions will have effectivity which specifies this ConfigurationItem. @see wt.effectivity.Effectivity",accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={})),@GeneratedProperty(name="viewRef",type=ViewReference.class,supportedAPI=PRIVATE,javaDoc="A reference to a View object.",accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={})),@GeneratedProperty(name="variation1",type=Variation1.class,supportedAPI=PUBLIC,javaDoc="If set, only those objects assigned to the variation1 are returned. If no WTParts match the variation1, other variation1s are checked from the bottom of the hierarchy up(until there is either at least one match or no parent). WTParts with null variation1 are checked last. If this is not set only WTParts with null variation1 will be returned."),@GeneratedProperty(name="variation2",type=Variation2.class,supportedAPI=PUBLIC,javaDoc="If set, only those objects assigned to the variation2 are returned. If no WTParts match the variation2, other variation2s are checked from the bottom of the hierarchy up(until there is either at least one match or no parent). WTParts with null variation2 are checked last. If this is not set only WTParts with null variation2 will be returned."),@GeneratedProperty(name="effType",type=java.lang.String.class,supportedAPI=PUBLIC)}) public class WTPartEffectivityConfigSpec extends _WTPartEffectivityConfigSpec
A ConfigSpec used to filter WTParts based on their PDM Effectivity and membership in a view. This filtering can be done in different ways by populating various combinations of the class attributes. The following combinations are valid:
  • 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:
  • Method Details

    • getEffectiveDate

      public Timestamp 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:
      getEffectiveDate in class _WTPartEffectivityConfigSpec
      Returns:
      Timestamp
      See Also:
    • setEffectiveDate

      public void setEffectiveDate(Timestamp a_EffectiveDate) throws WTPropertyVetoException
      Sets the value of the attribute: EFFECTIVE_DATE. Effective revisions will have an effective date range which includes this date.

      Supported API: true
      Overrides:
      setEffectiveDate in class _WTPartEffectivityConfigSpec
      Parameters:
      a_EffectiveDate -
      Throws:
      WTPropertyVetoException
      See Also:
    • setEffectiveUnit

      public void setEffectiveUnit(String a_EffectiveUnit) throws WTPropertyVetoException
      Sets the value of the attribute: EFFECTIVE_UNIT. Effective revisions will have a unit number range which inclues this number.

      Supported API: true
      Overrides:
      setEffectiveUnit in class _WTPartEffectivityConfigSpec
      Parameters:
      a_EffectiveUnit -
      Throws:
      WTPropertyVetoException
      See Also:
    • getEffectivityType

      public EffectivityType 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

      public EffContext 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

      public void setEffectiveContext(EffContext a_EffectiveContext) throws WTPropertyVetoException
      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

      public ConfigurationItem 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

      public WTProductInstance 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 instead
      Sets 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

      public WTPartMaster 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

      public void setEffectiveProduct(WTPartMaster a_EffectiveProduct) throws WTPropertyVetoException
      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

      public View 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

      public void setView(View a_View) throws WTPropertyVetoException
      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

      public void setEffType(String a_EffType) throws WTPropertyVetoException
      Sets the value of the attribute: EFF_TYPE.

      Supported API: true
      Overrides:
      setEffType in class _WTPartEffectivityConfigSpec
      Parameters:
      a_EffType -
      Throws:
      WTPropertyVetoException
      See Also:
    • appendSearchCriteria

      public QuerySpec appendSearchCriteria(QuerySpec querySpec) throws WTException, QueryException
      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:
      WTException
      QueryException
      See Also:
    • process

      public QueryResult process(QueryResult results) throws WTException
      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

      public wt.vc.config.RelationalConfigSpec getRelationalConfigSpec() throws WTException
      Returns a RelationalConfigSpec that wraps the RelationalConfigSpecBridge to ensure proper ranking by Variation1 and Variation2. Returns the ConfigSpec to use when relationalizing this config spec. This is either a ConfigSpec or a RelationalConfigSpec. A relatianalized config spec utilizes the database (via appendSearchCriteria(QuerySpec)) to remove the need to post-process the QueryResult using ConfigSpec.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 the RelationalConfigSpecBridge) 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 WTPartUsageLink and 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