wt.part
Class WTPartEffectivityConfigSpec

java.lang.Object
  extended bywt.part.WTPartEffectivityConfigSpec
All Implemented Interfaces:
ConfigSpec, Externalizable, NetFactor, ObjectMappable, Serializable

public class WTPartEffectivityConfigSpec
extends Object
implements ObjectMappable, ConfigSpec, Externalizable

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:

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:
Effectivity, Serialized Form

Field Summary
private static String CLASSNAME
           
private static DateEffGroupRangeDelegate degrd
           
static String EFFECTIVE_CONFIG_ITEM
          Label for the attribute; Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
static String EFFECTIVE_CONTEXT
          Label for the attribute; Effective revisions will have effectivity which specifies this effectivity context.
static String EFFECTIVE_DATE
          Label for the attribute; Effective revisions will have an effective date range which includes this date.
static String EFFECTIVE_PRODUCT
          Label for the attribute; Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
static String EFFECTIVE_PRODUCT_INSTANCE
          Label for the attribute; Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.
static String EFFECTIVE_UNIT
          Label for the attribute; Effective revisions will have a unit number range which inclues this number.
private static int EFFECTIVE_UNIT_UPPER_LIMIT
           
private  ObjectReference effectiveContextRef
           
private  Timestamp effectiveDate
           
private  String effectiveUnit
           
static String EFFECTIVITY_TYPE
          Label for the attribute; The EffectivityType of the effectiveConfigItem attribute; A derived attribute.
private static String EFFECTIVITYRESOURCE
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static boolean VERBOSE
           
static String VIEW
          Label for the attribute; If set, only those objects assigned to the view or view-independent are returned.
private  ViewReference viewRef
           
 
Constructor Summary
WTPartEffectivityConfigSpec()
           
 
Method Summary
 QuerySpec appendSearchCriteria(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.
 void checkAttributes(ConfigSpec configSpec)
          Validate the state of this instance of WTPartEffectivityConfigSpec prior to persisting WTPartConfigSpec.
private  void effectiveUnitValidate(String a_EffectiveUnit)
           
 ClassInfo getClassInfo()
          Returns the ClassInfo object for this class.
 String getConceptualClassname()
          Deprecated.  
 ConfigurationItem getEffectiveConfigItem()
          Gets the value of the attribute: EFFECTIVE_CONFIG_ITEM.
 EffContext getEffectiveContext()
          Gets the value of the attribute: EFFECTIVE_CONTEXT.
 Timestamp getEffectiveDate()
          Gets the value of the attribute: EFFECTIVE_DATE.
 WTProductMaster getEffectiveProduct()
          Gets the value of the attribute: EFFECTIVE_PRODUCT.
 WTProductInstance getEffectiveProductInstance()
          Gets the value of the attribute: EFFECTIVE_PRODUCT_INSTANCE.
 String getEffectiveUnit()
          Gets the value of the attribute: EFFECTIVE_UNIT.
 EffectivityType getEffectivityType()
          Gets the value of the attribute: EFFECTIVITY_TYPE.
 View getView()
          Gets the value of the attribute: VIEW.
protected  void initialize()
          Supports initialization, following construction of an instance.
protected  void initialize(ConfigurationItem an_EffectiveConfigItem, String a_Unit, Timestamp an_EffectiveDate)
          Supports initialization, following construction of an instance.
protected  void initialize(Timestamp an_EffectiveDate)
          Supports initialization, following construction of an instance.
protected  void initialize(WTProductInstance a_ProductInstance, Timestamp an_EffectiveDate)
          Supports initialization, following construction of an instance.
protected  void initialize(WTProductMaster an_EffectiveProduct, String a_Unit, Timestamp an_EffectiveDate)
          Supports initialization, following construction of an instance.
static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec()
          

Supported API: false
static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(ConfigurationItem an_EffectiveConfigItem, String a_Unit, Timestamp an_EffectiveDate)
          

Supported API: false
static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(Timestamp an_EffectiveDate)
          

Supported API: false
static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(WTProductInstance a_ProductInstance, Timestamp an_EffectiveDate)
          

Supported API: false
static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(WTProductMaster an_EffectiveProduct, String a_Unit, Timestamp an_EffectiveDate)
          

Supported API: false
 QueryResult process(QueryResult results)
          Process the QueryResult of iterations, returning only those that "match" according to the algorithm.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(WTPartEffectivityConfigSpec thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setEffectiveConfigItem(ConfigurationItem a_EffectiveConfigItem)
          Sets the value of the attribute: EFFECTIVE_CONFIG_ITEM.
 void setEffectiveContext(EffContext a_EffectiveContext)
          Sets the value of the attribute: EFFECTIVE_CONTEXT.
 void setEffectiveDate(Timestamp a_EffectiveDate)
          Sets the value of the attribute: EFFECTIVE_DATE.
 void setEffectiveProduct(WTProductMaster a_EffectiveProduct)
          Sets the value of the attribute: EFFECTIVE_PRODUCT.
 void setEffectiveProductInstance(WTProductInstance a_EffectiveProductInstance)
          Sets the value of the attribute: EFFECTIVE_PRODUCT_INSTANCE.
 void setEffectiveUnit(String a_EffectiveUnit)
          Sets the value of the attribute: EFFECTIVE_UNIT.
 void setView(View a_View)
          Sets the value of the attribute: VIEW.
 String toString()
          Returns the conceptual (modeled) name for the class.
private  void validateInstance()
          Helper method of appendSearchCriteria to validate the state of this instance of WTPartEffectivityConfigSpec prior to appending search criteria.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

EFFECTIVE_DATE

public static final String EFFECTIVE_DATE
Label for the attribute; Effective revisions will have an effective date range which includes this date.

Supported API: true

See Also:
Effectivity, Constant Field Values

effectiveDate

private Timestamp effectiveDate

EFFECTIVE_UNIT

public static final String EFFECTIVE_UNIT
Label for the attribute; Effective revisions will have a unit number range which inclues this number.

Supported API: true

See Also:
Effectivity, Constant Field Values

EFFECTIVE_UNIT_UPPER_LIMIT

private static int EFFECTIVE_UNIT_UPPER_LIMIT

effectiveUnit

private String effectiveUnit

EFFECTIVITY_TYPE

public static final String EFFECTIVITY_TYPE
Label for the attribute; The EffectivityType of the effectiveConfigItem attribute; A derived attribute.

Supported API: true

See Also:
Effectivity, Constant Field Values

EFFECTIVE_CONTEXT

public static final String EFFECTIVE_CONTEXT
Label for the attribute; Effective revisions will have effectivity which specifies this effectivity context. A derived attribute.

Supported API: true

See Also:
Effectivity, Constant Field Values

EFFECTIVE_CONFIG_ITEM

public static final String EFFECTIVE_CONFIG_ITEM
Label for the attribute; Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.

Supported API: true

See Also:
Effectivity, Constant Field Values

EFFECTIVE_PRODUCT_INSTANCE

public static final String EFFECTIVE_PRODUCT_INSTANCE
Label for the attribute; Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.

Supported API: true

See Also:
Effectivity, Constant Field Values

EFFECTIVE_PRODUCT

public static final String EFFECTIVE_PRODUCT
Label for the attribute; Effective revisions will have effectivity which specifies this ConfigurationItem; A derived attribute.

Supported API: true

See Also:
Effectivity, Constant Field Values

effectiveContextRef

private ObjectReference effectiveContextRef

VIEW

public static final String VIEW
Label for the attribute; 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

See Also:
Constant Field Values

viewRef

private ViewReference viewRef

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

EFFECTIVITYRESOURCE

private static final String EFFECTIVITYRESOURCE
See Also:
Constant Field Values

degrd

private static final DateEffGroupRangeDelegate degrd

VERBOSE

private static final boolean VERBOSE
Constructor Detail

WTPartEffectivityConfigSpec

public WTPartEffectivityConfigSpec()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WTPartEffectivityConfigSpec thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

toString

public String toString()
Returns the conceptual (modeled) name for the class.

Supported API: false

Returns:
String

getClassInfo

public ClassInfo getClassInfo()
                       throws WTIntrospectionException
Returns the ClassInfo object for this class.

Supported API: false

Specified by:
getClassInfo in interface NetFactor
Returns:
ClassInfo
Throws:
WTIntrospectionException

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

Returns:
Timestamp
See Also:
Effectivity

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

Parameters:
a_EffectiveDate -
Throws:
WTPropertyVetoException
See Also:
Effectivity

getEffectiveUnit

public String getEffectiveUnit()
Gets the value of the attribute: EFFECTIVE_UNIT. Effective revisions will have a unit number range which inclues this number.

Supported API: true

Returns:
String
See Also:
Effectivity

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

Parameters:
a_EffectiveUnit -
Throws:
WTPropertyVetoException
See Also:
Effectivity

effectiveUnitValidate

private void effectiveUnitValidate(String a_EffectiveUnit)
                            throws WTPropertyVetoException
Parameters:
a_EffectiveUnit -
Throws:
WTPropertyVetoException

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:
Effectivity

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:
Effectivity

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:
Effectivity

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:
Effectivity

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:
Effectivity

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:
Effectivity

setEffectiveProductInstance

public void setEffectiveProductInstance(WTProductInstance a_EffectiveProductInstance)
                                 throws WTPropertyVetoException
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:
Effectivity

getEffectiveProduct

public WTProductMaster 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:
WTProductMaster
See Also:
Effectivity

setEffectiveProduct

public void setEffectiveProduct(WTProductMaster 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:
Effectivity

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

newWTPartEffectivityConfigSpec

public static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec()
                                                                  throws WTException


Supported API: false

Returns:
WTPartEffectivityConfigSpec
Throws:
WTException

initialize

protected void initialize()
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Throws:
WTException

newWTPartEffectivityConfigSpec

public static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(Timestamp an_EffectiveDate)
                                                                  throws WTException


Supported API: false

Parameters:
an_EffectiveDate -
Returns:
WTPartEffectivityConfigSpec
Throws:
WTException

initialize

protected void initialize(Timestamp an_EffectiveDate)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
an_EffectiveDate -
Throws:
WTException

newWTPartEffectivityConfigSpec

public static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(ConfigurationItem an_EffectiveConfigItem,
                                                                         String a_Unit,
                                                                         Timestamp an_EffectiveDate)
                                                                  throws WTException


Supported API: false

Parameters:
an_EffectiveConfigItem -
a_Unit -
an_EffectiveDate -
Returns:
WTPartEffectivityConfigSpec
Throws:
WTException

initialize

protected void initialize(ConfigurationItem an_EffectiveConfigItem,
                          String a_Unit,
                          Timestamp an_EffectiveDate)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
an_EffectiveConfigItem -
a_Unit -
an_EffectiveDate -
Throws:
WTException

newWTPartEffectivityConfigSpec

public static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(WTProductMaster an_EffectiveProduct,
                                                                         String a_Unit,
                                                                         Timestamp an_EffectiveDate)
                                                                  throws WTException


Supported API: false

Parameters:
an_EffectiveProduct -
a_Unit -
an_EffectiveDate -
Returns:
WTPartEffectivityConfigSpec
Throws:
WTException

initialize

protected void initialize(WTProductMaster an_EffectiveProduct,
                          String a_Unit,
                          Timestamp an_EffectiveDate)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
an_EffectiveProduct -
a_Unit -
an_EffectiveDate -
Throws:
WTException

newWTPartEffectivityConfigSpec

public static WTPartEffectivityConfigSpec newWTPartEffectivityConfigSpec(WTProductInstance a_ProductInstance,
                                                                         Timestamp an_EffectiveDate)
                                                                  throws WTException


Supported API: false

Parameters:
a_ProductInstance -
an_EffectiveDate -
Returns:
WTPartEffectivityConfigSpec
Throws:
WTException

initialize

protected void initialize(WTProductInstance a_ProductInstance,
                          Timestamp an_EffectiveDate)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
a_ProductInstance -
an_EffectiveDate -
Throws:
WTException

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

Specified by:
appendSearchCriteria in interface ConfigSpec
Parameters:
querySpec - A QuerySpec with a target class that is Iterated.
Returns:
QuerySpec
Throws:
WTException
QueryException
See Also:
QuerySpec, SearchCondition

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

Specified by:
process in interface ConfigSpec
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:
QueryResult, Iterated

validateInstance

private void validateInstance()
                       throws WTException
Helper method of appendSearchCriteria to validate the state of this instance of WTPartEffectivityConfigSpec prior to appending search criteria.

Throws:
WTException - If the instance is not valid.

checkAttributes

public void checkAttributes(ConfigSpec configSpec)
                     throws InvalidAttributeException
Validate the state of this instance of WTPartEffectivityConfigSpec prior to persisting WTPartConfigSpec. This method is invoked by WTPartConfigSpec.checkAttributes.

Throws:
WTException - If the instance is not valid.
InvalidAttributeException
See Also:
WTPartConfigSpec