wt.eff
Class EffHelper

java.lang.Object
  extended bywt.eff.EffHelper
All Implemented Interfaces:
ApplicationContextChild, Externalizable, Serializable

public class EffHelper
extends Object
implements ApplicationContextChild, Externalizable

This helper is used to access an implementation of EffService via the static reference EffHelper.service. Other functionality is provided by EffConfigSpecAssistant and EffGroupAssistant.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private  ApplicationContext applicationContext
           
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
private static EffHelper factory
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static EffService service
          

Supported API: true
 
Fields inherited from interface wt.services.applicationcontext.ApplicationContextChild
APPLICATION_CONTEXT
 
Constructor Summary
EffHelper()
           
 
Method Summary
static boolean equals(Eff e1, Eff e2)
          Returns true if and only if the argument Eff objects are equal (that is, their respective range values are equal).
 ApplicationContext getApplicationContext()
          Gets the object for the association that plays role: applicationContext.
static Class getEffRange(Class effClass)
          For a given Eff class, returns the valid EffRange class.
static Class getEffRangeType(Class rangeClass)
          For a given EffRange class, returns the datatype for start/end.
static Class[] getValidEffs(EffContext context)
          Returns all Eff classes that are valid in the given context.
static boolean isContextRequired(Class effClass)
          Returns true if the Eff class requires a context (has cardinality 1).
static boolean isCurrent(Eff eff)
          Returns true if and only if the argument Eff object is current (i.e., it has not been factually deleted and thus relegated to effectivity history).
static boolean isLegacy(Eff eff)
          Returns true if and only if the argument Eff object is legacy (i.e., it does not reference a valid creation EffChangeAudit object).
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
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(EffHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setApplicationContext(ApplicationContext a_ApplicationContext)
          Sets the object for the association that plays role: applicationContext.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

service

public static final EffService service


Supported API: true


applicationContext

private ApplicationContext applicationContext

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

factory

private static EffHelper factory
Constructor Detail

EffHelper

public EffHelper()
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(EffHelper 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

getValidEffs

public static Class[] getValidEffs(EffContext context)
Returns all Eff classes that are valid in the given context. If context is null, returns only effs that are optional (have a 0..1 cardinality). The ValidEffsDelegate is used to process this.

Supported API: true

Parameters:
context -
Returns:
Class[]

getEffRange

public static Class getEffRange(Class effClass)
For a given Eff class, returns the valid EffRange class.

Supported API: true

Parameters:
effClass -
Returns:
Class

getEffRangeType

public static Class getEffRangeType(Class rangeClass)
For a given EffRange class, returns the datatype for start/end.

Supported API: true

Parameters:
rangeClass -
Returns:
Class

isContextRequired

public static boolean isContextRequired(Class effClass)
Returns true if the Eff class requires a context (has cardinality 1).

Supported API: true

Parameters:
effClass -
Returns:
boolean

isCurrent

public static boolean isCurrent(Eff eff)
Returns true if and only if the argument Eff object is current (i.e., it has not been factually deleted and thus relegated to effectivity history).

Supported API: true

Parameters:
eff - Eff object whose status as current or historical is to be determined -- may not be null
Returns:
boolean

isLegacy

public static boolean isLegacy(Eff eff)
Returns true if and only if the argument Eff object is legacy (i.e., it does not reference a valid creation EffChangeAudit object).

Supported API: true

Parameters:
eff - Eff object whose status as legacy is to be determined -- may not be null
Returns:
boolean

equals

public static boolean equals(Eff e1,
                             Eff e2)
Returns true if and only if the argument Eff objects are equal (that is, their respective range values are equal).

Supported API: true

Parameters:
e1 - Eff object to be compared to the other Eff argument for equality -- may not be null
e2 - Eff object to be compared to the other Eff argument for equality -- may not be null
Returns:
boolean

getApplicationContext

public ApplicationContext getApplicationContext()
Gets the object for the association that plays role: applicationContext.

Supported API: false

Specified by:
getApplicationContext in interface ApplicationContextChild
Returns:
ApplicationContext

setApplicationContext

public void setApplicationContext(ApplicationContext a_ApplicationContext)
                           throws WTPropertyVetoException
Sets the object for the association that plays role: applicationContext.

Supported API: false

Specified by:
setApplicationContext in interface ApplicationContextChild
Parameters:
a_ApplicationContext -
Throws:
WTPropertyVetoException