wt.vc.baseline
Class StandardBaselineDelegate

java.lang.Object
  extended bywt.vc.baseline.StandardBaselineDelegate
All Implemented Interfaces:
BaselineDelegate, Externalizable, Serializable
Direct Known Subclasses:
EPMAsStoredDelegate, EPMFamilyTableBaselineDelegate, IteratedPartialBaselineDelegate

public class StandardBaselineDelegate
extends Object
implements BaselineDelegate, Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
protected static StatementParameterFactory statementFactory
           
 
Constructor Summary
StandardBaselineDelegate()
           
 
Method Summary
 boolean add(Baseline a_baseline, ArrayList a_baselineMemberInfos)
          Deprecated. All BaselineMemberInfo-based APIs are obsolete.
 void add(WTCollection baselineMembers, Baseline baseline)
          Handles the persistence of the baselineMembers WTCollection.
protected  boolean executeCall(String functionName, StatementParameter[] procArgs)
          This method invokes the proper stored procedure to add/replace/remove baselinemember links procArgs must be set up as StatementParameters by the calling method Return value indicates success or failure
protected  Class getBaselineMemberClass()
           
 WTCollection getBaselineMembers(WTCollection baselineables, Baseline baseline)
          Returns the BaselineMember associations that link elements in the collection to the baseline.
 WTValuedMap getBaselineMembersToReplacingBaselineablesMap(WTValuedMap masterToIterationMap, Baseline baseline)
          Responsible for finding the existing (in-the-database) BaselineMember links that associate the baseline with any iterations of the given masters.
protected  void prepareArgsForReplace(ArrayList replacementInfo, Object[] linkOids, Object[] newBaselineableOids)
           
protected  Object[] prepareBaselineablesArgForAdd(ArrayList memberLinkInfos)
           
protected  Object[] prepareBaselineArg(Baseline a_baseline)
           
protected  long[] prepareLinksForRemove(ArrayList memberLinks)
           
protected  Object[] prepareSQLArg(BaselineMemberInfo info)
           
protected  StatementParameter[] prepareStmtParamForAdd(Baseline a_baseline, ArrayList a_baselineMemberInfos)
           
protected  StatementParameter[] prepareStmtParamForRemove(ArrayList baselineMembers)
           
protected  StatementParameter[] prepareStmtParamForReplace(Baseline a_baseline, ArrayList replacementInfo)
           
 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(StandardBaselineDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 boolean remove(Baseline a_baseline, ArrayList a_baselineMembers)
          Deprecated. All BaselineMemberInfo-based APIs are obsolete.
 void remove(WTCollection baselineMembers, Baseline baseline)
          Handles the removal of the baselineMembers from the database.
 boolean replace(Baseline a_baseline, ArrayList replacementInfo)
          Deprecated. All BaselineMemberInfo-based APIs are obsolete.
 void replace(WTValuedMap addToReplaceBaselineMembersMap, Baseline baseline)
          This API is responsible for the persistence operations necessary to replace iterations in the baseline with other iterations.
protected  void setAdditionalFields(BaselineMember addMember, BaselineMember replaceMember)
           
protected  void updateEmptyTables(String className)
          This method update the EmptyTableManager to let the MethodServer know that a table is no longer empty.
 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

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

statementFactory

protected static StatementParameterFactory statementFactory
Constructor Detail

StandardBaselineDelegate

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

getBaselineMembersToReplacingBaselineablesMap

public WTValuedMap getBaselineMembersToReplacingBaselineablesMap(WTValuedMap masterToIterationMap,
                                                                 Baseline baseline)
                                                          throws WTException
Responsible for finding the existing (in-the-database) BaselineMember links that associate the baseline with any iterations of the given masters. These represent the iterations for which the baseline already has a member; these existing members will be replaced by the new iterations. The API then returns a map where the existing members are keys and the iterations (from the masterToIterationMap) to replace are the values.

NOTE: this API should return an entry for a member even if that member points to the same iteration as the one that will be added -- the calling API will handle the recognition of this and will then neither "add" nor "replace" that iteration.

Supported API: false

Specified by:
getBaselineMembersToReplacingBaselineablesMap in interface BaselineDelegate
Parameters:
masterToIterationMap -
baseline -
Returns:
WTValuedMap
Throws:
WTException

getBaselineMembers

public WTCollection getBaselineMembers(WTCollection baselineables,
                                       Baseline baseline)
                                throws WTException
Returns the BaselineMember associations that link elements in the collection to the baseline. These results are used to delete elements from the baseline.

Supported API: false

Specified by:
getBaselineMembers in interface BaselineDelegate
Parameters:
baselineables -
baseline -
Returns:
WTCollection
Throws:
WTException

add

public boolean add(Baseline a_baseline,
                   ArrayList a_baselineMemberInfos)
            throws WTException
Deprecated. All BaselineMemberInfo-based APIs are obsolete.



Supported API: false

Specified by:
add in interface BaselineDelegate
Parameters:
a_baseline -
a_baselineMemberInfos -
Returns:
boolean
Throws:
WTException

replace

public boolean replace(Baseline a_baseline,
                       ArrayList replacementInfo)
                throws WTException
Deprecated. All BaselineMemberInfo-based APIs are obsolete.



Supported API: false

Specified by:
replace in interface BaselineDelegate
Parameters:
a_baseline -
replacementInfo - The replacementInfo contains information needed for replacing one link in the baseline with another. In this case, each element consists of an Object[3] containing the BaselineMemberInfo for the new baselineable, the BaselineMember link, and the original baselineable.
Returns:
boolean
Throws:
WTException

remove

public boolean remove(Baseline a_baseline,
                      ArrayList a_baselineMembers)
               throws WTException
Deprecated. All BaselineMemberInfo-based APIs are obsolete.



Supported API: false

Specified by:
remove in interface BaselineDelegate
Parameters:
a_baseline -
a_baselineMembers - ArrayList of BaselineMembers which will be removed
Returns:
boolean
Throws:
WTException

add

public void add(WTCollection baselineMembers,
                Baseline baseline)
         throws WTException
Handles the persistence of the baselineMembers WTCollection.

Supported API: false

Specified by:
add in interface BaselineDelegate
Parameters:
baselineMembers -
baseline -
Throws:
WTException

replace

public void replace(WTValuedMap addToReplaceBaselineMembersMap,
                    Baseline baseline)
             throws WTException
This API is responsible for the persistence operations necessary to replace iterations in the baseline with other iterations. The addToReplaceBaselineMembersMap has the BaselineMember association (unpersisted) originally indicated to be "added" as the key and the association found in the baseline for the same master as the value.

Supported API: false

Specified by:
replace in interface BaselineDelegate
Parameters:
addToReplaceBaselineMembersMap -
baseline -
Throws:
WTException

remove

public void remove(WTCollection baselineMembers,
                   Baseline baseline)
            throws WTException
Handles the removal of the baselineMembers from the database.

Supported API: false

Specified by:
remove in interface BaselineDelegate
Parameters:
baselineMembers -
baseline -
Throws:
WTException

prepareStmtParamForAdd

protected StatementParameter[] prepareStmtParamForAdd(Baseline a_baseline,
                                                      ArrayList a_baselineMemberInfos)
                                               throws WTException
Throws:
WTException

prepareStmtParamForReplace

protected StatementParameter[] prepareStmtParamForReplace(Baseline a_baseline,
                                                          ArrayList replacementInfo)
                                                   throws WTException
Throws:
WTException

prepareBaselineArg

protected Object[] prepareBaselineArg(Baseline a_baseline)

prepareSQLArg

protected Object[] prepareSQLArg(BaselineMemberInfo info)
                          throws WTException
Throws:
WTException

prepareBaselineablesArgForAdd

protected Object[] prepareBaselineablesArgForAdd(ArrayList memberLinkInfos)
                                          throws WTException
Throws:
WTException

prepareArgsForReplace

protected void prepareArgsForReplace(ArrayList replacementInfo,
                                     Object[] linkOids,
                                     Object[] newBaselineableOids)
                              throws WTException
Throws:
WTException

prepareStmtParamForRemove

protected StatementParameter[] prepareStmtParamForRemove(ArrayList baselineMembers)
                                                  throws WTException
Throws:
WTException

prepareLinksForRemove

protected long[] prepareLinksForRemove(ArrayList memberLinks)

executeCall

protected boolean executeCall(String functionName,
                              StatementParameter[] procArgs)
                       throws WTException
This method invokes the proper stored procedure to add/replace/remove baselinemember links procArgs must be set up as StatementParameters by the calling method Return value indicates success or failure

Throws:
WTException

updateEmptyTables

protected void updateEmptyTables(String className)
                          throws WTException
This method update the EmptyTableManager to let the MethodServer know that a table is no longer empty.

Throws:
WTException

getBaselineMemberClass

protected Class getBaselineMemberClass()

setAdditionalFields

protected void setAdditionalFields(BaselineMember addMember,
                                   BaselineMember replaceMember)
                            throws WTException
Throws:
WTException