Package wt.vc.config
Class EffectivityConfigSpec
java.lang.Object
wt.vc.config._EffectivityConfigSpec
wt.vc.config.EffectivityConfigSpec
- All Implemented Interfaces:
Externalizable,Serializable,wt.fc._NetFactor,wt.fc._ObjectMappable,NetFactor,ObjectMappable,ConfigSpec
@GenAsObjectMappable(interfaces=ConfigSpec.class,versions=2383786026590247081L,properties={@GeneratedProperty(name="effectiveDate",type=java.sql.Timestamp.class,supportedAPI=PUBLIC,javaDoc="When a date value is specified, only versions with a date range that includes the value are considered. Versions that are global (have a date effectivity that is not constrained by a configuration item) or based on the effectiveConfigurationItem (if there is one) are processed."),@GeneratedProperty(name="effectiveUnit",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="The string value that must fit in the range of a version using the standard string comparison (which would yield 9 > 10). This value is always in relation to a configuration item (i.e., this config spec would be invalid if the effectiveUnit had a value, but the effectiveConfigItem was null)."),@GeneratedProperty(name="effectiveConfigItemRef",type=ConfigurationItemReference.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={}))})
public class EffectivityConfigSpec
extends _EffectivityConfigSpec
The EffectivityConfigSpec can be used to filter elements to return only
those that are effective, given a date/unit value and (possibly) a configuration
item.
Use the newEffectivityConfigSpec static factory method(s),
not the EffectivityConfigSpec 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:
-
EffectivityManageable- Serialized Form
-
Field Summary
Fields inherited from class wt.vc.config._EffectivityConfigSpec
EFFECTIVE_DATE, EFFECTIVE_UNIT -
Method Summary
Modifier and TypeMethodDescriptionappendSearchCriteria(QuerySpec querySpec) For a non-null date value with no effectiveConfigItem, appends a "configItemRef = NULL AND getEffectiveDate() >= startDate AND (getEffectiveDate() <= endDate OR endDate = WTDatedEffectivity.END_DATE)".Gets the value of the attribute: EFFECTIVE_CONFIG_ITEM.Gets the value of the attribute: EFFECTIVITY_TYPE.protected voidinitialize(Timestamp effectiveDate) Supports initialization, following construction of an instance.protected voidinitialize(ConfigurationItem effectiveConfigItem, String effectiveUnit) Supports initialization, following construction of an instance.protected voidinitialize(ConfigurationItem effectiveConfigItem, Timestamp effectiveDate) Supports initialization, following construction of an instance.static EffectivityConfigSpecnewEffectivityConfigSpec(Timestamp effectiveDate) Constructs an EffectivityConfigSpec with a global effective date value.static EffectivityConfigSpecnewEffectivityConfigSpec(ConfigurationItem effectiveConfigItem, String effectiveUnit) Constructs a unit-based EffectivityConfigSpec with the given configuration item and effective value.static EffectivityConfigSpecnewEffectivityConfigSpec(ConfigurationItem effectiveConfigItem, Timestamp effectiveDate) Constructs an EffectivityConfigSpec with a configuration item-based date effective value.process(QueryResult results) Returns the latest version for each master if more than one version for a particular master is effective.voidsetEffectiveConfigItem(ConfigurationItem a_EffectiveConfigItem) Sets the value of the attribute: EFFECTIVE_CONFIG_ITEM.Methods inherited from class wt.vc.config._EffectivityConfigSpec
getEffectiveDate, getEffectiveUnit, setEffectiveDate, setEffectiveUnit
-
Method Details
-
getEffectivityType
Gets the value of the attribute: EFFECTIVITY_TYPE. The effectivityType can be any of the EffectivityType values.
Supported API: true- Returns:
- EffectivityType
- Throws:
ObjectNoLongerExistsException- See Also:
-
getEffectiveConfigItem
Gets the value of the attribute: EFFECTIVE_CONFIG_ITEM. The ConfigurationItem that constrains the effectiveDate/effectiveUnit values.
Supported API: true- Returns:
- ConfigurationItem
- Throws:
ObjectNoLongerExistsException
-
setEffectiveConfigItem
public void setEffectiveConfigItem(ConfigurationItem a_EffectiveConfigItem) throws WTPropertyVetoException Sets the value of the attribute: EFFECTIVE_CONFIG_ITEM. The ConfigurationItem that constrains the effectiveDate/effectiveUnit values.
Supported API: true- Parameters:
a_EffectiveConfigItem-- Throws:
WTPropertyVetoException
-
appendSearchCriteria
For a non-null date value with no effectiveConfigItem, appends a "configItemRef = NULL AND getEffectiveDate() >= startDate AND (getEffectiveDate() <= endDate OR endDate = WTDatedEffectivity.END_DATE)". For a date value with an effectiveConfigItem, appends a "(configItemRef = NULL OR configItemRef = getEffectiveConfigItem()) AND getEffectiveDate() >= startDate AND (getEffectiveDate() <= endDate OR endDate = WTDatedEffectivity.END_DATE)".For a non-null unit value, appends a "configItemRef = getEffectiveConfigItem() AND getEffectiveUnit() >= startNumber AND (getEffectiveUnit() <= endNumber OR endNumber = UnitEffectivity.END_NUMBER)".
Supported API: true- Parameters:
querySpec- A QuerySpec with a target class that is Iterated.- Returns:
- QuerySpec
- Throws:
WTExceptionQueryException- See Also:
-
process
Returns the latest version for each master if more than one version for a particular master is effective.
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:
-
newEffectivityConfigSpec
public static EffectivityConfigSpec newEffectivityConfigSpec(Timestamp effectiveDate) throws WTPropertyVetoException Constructs an EffectivityConfigSpec with a global effective date value.
Supported API: true- Parameters:
effectiveDate-- Returns:
- EffectivityConfigSpec
- Throws:
WTPropertyVetoException
-
initialize
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
effectiveDate-- Throws:
WTPropertyVetoException
-
newEffectivityConfigSpec
public static EffectivityConfigSpec newEffectivityConfigSpec(ConfigurationItem effectiveConfigItem, Timestamp effectiveDate) throws WTPropertyVetoException Constructs an EffectivityConfigSpec with a configuration item-based date effective value.
Supported API: true- Parameters:
effectiveConfigItem-effectiveDate-- Returns:
- EffectivityConfigSpec
- Throws:
WTPropertyVetoException
-
initialize
protected void initialize(ConfigurationItem effectiveConfigItem, Timestamp effectiveDate) throws WTPropertyVetoException Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
effectiveConfigItem-effectiveDate-- Throws:
WTPropertyVetoException
-
newEffectivityConfigSpec
public static EffectivityConfigSpec newEffectivityConfigSpec(ConfigurationItem effectiveConfigItem, String effectiveUnit) throws WTPropertyVetoException Constructs a unit-based EffectivityConfigSpec with the given configuration item and effective value.
Supported API: true- Parameters:
effectiveConfigItem-effectiveUnit-- Returns:
- EffectivityConfigSpec
- Throws:
WTPropertyVetoException
-
initialize
protected void initialize(ConfigurationItem effectiveConfigItem, String effectiveUnit) throws WTPropertyVetoException Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
effectiveConfigItem-effectiveUnit-- Throws:
WTPropertyVetoException
-