wt.eff
Class EffConfigSpecGroup

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.enterprise.Simple
          extended bywt.eff.EffConfigSpecGroup
All Implemented Interfaces:
AccessControlled, BusinessInformation, ConfigSpec, DisplayIdentification, DomainAdministered, Externalizable, NetFactor, Notifiable, ObjectMappable, Ownable, Persistable, Serializable

public class EffConfigSpecGroup
extends Simple
implements ConfigSpec, Ownable, Externalizable

A container config spec allowing multiple PersistableEffConfigSpecs to be considered. It is currently used in WTPartEffectivityConfigSpec.appendSearchCriteria(wt.query.QuerySpec) when the user has not selected a specific type of config spec (i. e. Date, Serial or Lot), because this means there can be any of these config spec types and so there is a need for several config specs to be applied together. At one time it was thought that for a product structure, for example, with a lot of configuration items, this config spec could be used to navigate the entire structure by specifying a PersistableEffConfigSpec for each configuration item. Now it looks as though the 6.0 revamping of effectivity will make this usage unnecessary.

Use the newEffConfigSpecGroup static factory method(s), not the EffConfigSpecGroup 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:
wt.part.WTpartEffectivityConfigSpec, appendSearchCriteria(wt.query.QuerySpec), process(wt.fc.QueryResult), Serialized Form

Field Summary
private static String CLASSNAME
           
private  Vector effConfigSpecVector
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private  Ownership ownership
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String VIEW
          Label for the attribute; The view to consider.
static String VIEW_CONFIG_SPEC
          Label for the attribute; The ViewConfigSpec is used to append view-related information to the QuerySpec and process view-dependent objects in the result.
private  ViewConfigSpec viewConfigSpec
           
 
Fields inherited from class wt.enterprise.Simple
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.ownership.Ownable
OWNERSHIP
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.fc.BusinessInformation
BUSINESS_TYPE, IDENTITY
 
Fields inherited from interface wt.notify.Notifiable
EVENT_SET
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
EffConfigSpecGroup()
           
 
Method Summary
 void add(PersistableEffConfigSpec persistableEffConfigSpec)
          Adds an effectivity config spec to the group.
 QuerySpec appendSearchCriteria(QuerySpec querySpec)
          Appends the search criteria for each PersistableEffConfigSpec contained by this group, separating them with the OR operator.
 void clear()
          Removes all effectivity config specs from the group.
 boolean contains(PersistableEffConfigSpec persistableEffConfigSpec)
          Returns true if the effectivity config spec is in the group.
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 String getConceptualClassname()
          Deprecated.  
 Ownership getOwnership()
          Gets the object for the association that plays role: OWNERSHIP.
 View getView()
          Gets the value of the attribute: VIEW.
 ViewConfigSpec getViewConfigSpec()
          Gets the object for the association that plays role: VIEW_CONFIG_SPEC.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize()
          

Supported API: false
protected  void initialize(PersistableEffConfigSpec persistableEffConfigSpec)
          Supports initialization, following construction of an instance.
protected  void initialize(PersistableEffConfigSpec[] persistableEffConfigSpecs)
          Supports initialization, following construction of an instance.
protected  void initialize(View a_View)
          Supports initialization, following construction of an instance.
protected  void initialize(View a_View, PersistableEffConfigSpec persistableEffConfigSpec)
          Supports initialization, following construction of an instance.
protected  void initialize(View a_View, PersistableEffConfigSpec[] persistableEffConfigSpecs)
          Supports initialization, following construction of an instance.
static EffConfigSpecGroup newEffConfigSpecGroup()
          Constructs a new, empty group.
static EffConfigSpecGroup newEffConfigSpecGroup(PersistableEffConfigSpec persistableEffConfigSpec)
          Construct a group, adding the effectivity config spec.
static EffConfigSpecGroup newEffConfigSpecGroup(PersistableEffConfigSpec[] persistableEffConfigSpecs)
          Constructs a group with the given members.
static EffConfigSpecGroup newEffConfigSpecGroup(View a_View)
          Constructs an empty group set to the provided view.
static EffConfigSpecGroup newEffConfigSpecGroup(View a_View, PersistableEffConfigSpec persistableEffConfigSpec)
          Construct a group, adding the effectivity config spec and assigning the view.
static EffConfigSpecGroup newEffConfigSpecGroup(View a_View, PersistableEffConfigSpec[] persistableEffConfigSpecs)
          Constructs a group with the given members and view.
 Enumeration persistableEffConfigSpecs()
          Returns an enumeration of the effectivity config specs in the group.
 QueryResult process(QueryResult results)
          Returns the latest effective version for each master based on view.
 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(EffConfigSpecGroup thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 boolean remove(PersistableEffConfigSpec persistableEffConfigSpec)
          Removes an effectivity config spec from the group.
 void setOwnership(Ownership a_Ownership)
          Sets the object for the association that plays role: OWNERSHIP.
 void setView(View a_View)
          Sets the value of the attribute: VIEW.
 void setViewConfigSpec(ViewConfigSpec a_ViewConfigSpec)
          Sets the object for the association that plays role: VIEW_CONFIG_SPEC.
 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 wt.enterprise.Simple
getBusinessType, getDomainRef, getEventSet, getIdentity, isInheritedDomain, readVersion, setDomainRef, setEventSet, setInheritedDomain
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

effConfigSpecVector

private Vector effConfigSpecVector

VIEW

public static final String VIEW
Label for the attribute; The view to consider.

Supported API: true

See Also:
Constant Field Values

VIEW_CONFIG_SPEC

public static final String VIEW_CONFIG_SPEC
Label for the attribute; The ViewConfigSpec is used to append view-related information to the QuerySpec and process view-dependent objects in the result.

Supported API: true

See Also:
Constant Field Values

viewConfigSpec

private ViewConfigSpec viewConfigSpec

ownership

private Ownership ownership

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
Constructor Detail

EffConfigSpecGroup

public EffConfigSpecGroup()
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
Overrides:
writeExternal in class Simple
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
Overrides:
readExternal in class Simple
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(EffConfigSpecGroup 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
Overrides:
writeExternal in class Simple
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
Overrides:
readExternal in class Simple
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

getView

public View getView()
             throws ObjectNoLongerExistsException
Gets the value of the attribute: VIEW. The view to consider.

Supported API: true

Returns:
View
Throws:
ObjectNoLongerExistsException

setView

public void setView(View a_View)
             throws WTPropertyVetoException
Sets the value of the attribute: VIEW. The view to consider.

Supported API: true

Parameters:
a_View -
Throws:
WTPropertyVetoException

getViewConfigSpec

public ViewConfigSpec getViewConfigSpec()
Gets the object for the association that plays role: VIEW_CONFIG_SPEC. The ViewConfigSpec is used to append view-related information to the QuerySpec and process view-dependent objects in the result.

Supported API: true

Returns:
ViewConfigSpec

setViewConfigSpec

public void setViewConfigSpec(ViewConfigSpec a_ViewConfigSpec)
                       throws WTPropertyVetoException
Sets the object for the association that plays role: VIEW_CONFIG_SPEC. The ViewConfigSpec is used to append view-related information to the QuerySpec and process view-dependent objects in the result.

Supported API: true

Parameters:
a_ViewConfigSpec -
Throws:
WTPropertyVetoException

add

public void add(PersistableEffConfigSpec persistableEffConfigSpec)
Adds an effectivity config spec to the group.

Supported API: true

Parameters:
persistableEffConfigSpec -

remove

public boolean remove(PersistableEffConfigSpec persistableEffConfigSpec)
Removes an effectivity config spec from the group.

Supported API: true

Parameters:
persistableEffConfigSpec -
Returns:
boolean

contains

public boolean contains(PersistableEffConfigSpec persistableEffConfigSpec)
Returns true if the effectivity config spec is in the group.

Supported API: true

Parameters:
persistableEffConfigSpec -
Returns:
boolean

clear

public void clear()
Removes all effectivity config specs from the group.

Supported API: true


persistableEffConfigSpecs

public Enumeration persistableEffConfigSpecs()
Returns an enumeration of the effectivity config specs in the group.

Supported API: true

Returns:
Enumeration

appendSearchCriteria

public QuerySpec appendSearchCriteria(QuerySpec querySpec)
                               throws WTException,
                                      QueryException
Appends the search criteria for each PersistableEffConfigSpec contained by this group, separating them with the OR operator.

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
Returns the latest effective version for each master based on view.

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

newEffConfigSpecGroup

public static EffConfigSpecGroup newEffConfigSpecGroup()
                                                throws WTException
Constructs a new, empty group.

Supported API: false

Returns:
EffConfigSpecGroup
Throws:
WTException

newEffConfigSpecGroup

public static EffConfigSpecGroup newEffConfigSpecGroup(PersistableEffConfigSpec persistableEffConfigSpec)
                                                throws WTException
Construct a group, adding the effectivity config spec.

Supported API: true

Parameters:
persistableEffConfigSpec -
Returns:
EffConfigSpecGroup
Throws:
WTException

initialize

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

Supported API: true

Parameters:
persistableEffConfigSpec -
Throws:
WTException

newEffConfigSpecGroup

public static EffConfigSpecGroup newEffConfigSpecGroup(PersistableEffConfigSpec[] persistableEffConfigSpecs)
                                                throws WTException
Constructs a group with the given members.

Supported API: true

Parameters:
persistableEffConfigSpecs -
Returns:
EffConfigSpecGroup
Throws:
WTException

initialize

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

Supported API: true

Parameters:
persistableEffConfigSpecs -
Throws:
WTException

newEffConfigSpecGroup

public static EffConfigSpecGroup newEffConfigSpecGroup(View a_View)
                                                throws WTException,
                                                       WTPropertyVetoException
Constructs an empty group set to the provided view.

Supported API: true

Parameters:
a_View -
Returns:
EffConfigSpecGroup
Throws:
WTException
WTPropertyVetoException

initialize

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

Supported API: true

Parameters:
a_View -
Throws:
WTException
WTPropertyVetoException

newEffConfigSpecGroup

public static EffConfigSpecGroup newEffConfigSpecGroup(View a_View,
                                                       PersistableEffConfigSpec persistableEffConfigSpec)
                                                throws WTException,
                                                       WTPropertyVetoException
Construct a group, adding the effectivity config spec and assigning the view.

Supported API: true

Parameters:
a_View -
persistableEffConfigSpec -
Returns:
EffConfigSpecGroup
Throws:
WTException
WTPropertyVetoException

initialize

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

Supported API: true

Parameters:
a_View -
persistableEffConfigSpec -
Throws:
WTException
WTPropertyVetoException

newEffConfigSpecGroup

public static EffConfigSpecGroup newEffConfigSpecGroup(View a_View,
                                                       PersistableEffConfigSpec[] persistableEffConfigSpecs)
                                                throws WTException,
                                                       WTPropertyVetoException
Constructs a group with the given members and view.

Supported API: true

Parameters:
a_View -
persistableEffConfigSpecs -
Returns:
EffConfigSpecGroup
Throws:
WTException
WTPropertyVetoException

initialize

protected void initialize(View a_View,
                          PersistableEffConfigSpec[] persistableEffConfigSpecs)
                   throws WTException,
                          WTPropertyVetoException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
a_View -
persistableEffConfigSpecs -
Throws:
WTException
WTPropertyVetoException

getOwnership

public Ownership getOwnership()
Gets the object for the association that plays role: OWNERSHIP. The persistent state for an Ownable object is maintained via the Ownership object. Access to information for the Ownership object should be done via methods on the OwnershipHelper.

Supported API: false

Specified by:
getOwnership in interface Ownable
Returns:
Ownership

setOwnership

public void setOwnership(Ownership a_Ownership)
Sets the object for the association that plays role: OWNERSHIP. The persistent state for an Ownable object is maintained via the Ownership object. Access to information for the Ownership object should be done via methods on the OwnershipHelper.

Supported API: false

Specified by:
setOwnership in interface Ownable
Parameters:
a_Ownership -

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class Simple
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class Simple
Returns:
int

initialize

protected void initialize()
                   throws WTException
Description copied from class: Simple


Supported API: false

Overrides:
initialize in class Simple
Throws:
WTException