com.ptc.wvs.common.util
Class ConfigSpecProxy

java.lang.Object
  extended bycom.ptc.wvs.common.util.ConfigSpecProxy
All Implemented Interfaces:
ConfigSpec, Externalizable, Serializable

public class ConfigSpecProxy
extends Object
implements ConfigSpec

See Also:
Serialized Form

Field Summary
private  ConfigSpec configSpec
           
private  String currentContainerString
           
private  int type
           
static int TYPE_AS_STORED
           
static int TYPE_CONFIG_SPEC
           
static int TYPE_DEFAULT
           
static int TYPE_LATEST
           
 
Constructor Summary
ConfigSpecProxy()
           
ConfigSpecProxy(ConfigSpec cs)
           
ConfigSpecProxy(ConfigSpec cs, int t)
           
ConfigSpecProxy(ConfigSpec cs, int t, String ccs)
           
ConfigSpecProxy(int t)
           
 
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.
 ConfigSpec getConfigSpec()
           
 String getCurrentContainerString()
           
 int getType()
           
 QueryResult process(QueryResult results)
          Process the QueryResult of iterations, returning only those that "match" according to the algorithm.
 void readExternal(ObjectInput input)
           
 void setConfigSpec(ConfigSpec cs)
           
 void setCurrentContainerString(String ccs)
           
 void setType(int t)
           
 void writeExternal(ObjectOutput output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_CONFIG_SPEC

public static final int TYPE_CONFIG_SPEC
See Also:
Constant Field Values

TYPE_DEFAULT

public static final int TYPE_DEFAULT
See Also:
Constant Field Values

TYPE_AS_STORED

public static final int TYPE_AS_STORED
See Also:
Constant Field Values

TYPE_LATEST

public static final int TYPE_LATEST
See Also:
Constant Field Values

configSpec

private ConfigSpec configSpec

type

private int type

currentContainerString

private String currentContainerString
Constructor Detail

ConfigSpecProxy

public ConfigSpecProxy()

ConfigSpecProxy

public ConfigSpecProxy(ConfigSpec cs)

ConfigSpecProxy

public ConfigSpecProxy(int t)

ConfigSpecProxy

public ConfigSpecProxy(ConfigSpec cs,
                       int t)

ConfigSpecProxy

public ConfigSpecProxy(ConfigSpec cs,
                       int t,
                       String ccs)
Method Detail

setConfigSpec

public void setConfigSpec(ConfigSpec cs)

getConfigSpec

public ConfigSpec getConfigSpec()

setType

public void setType(int t)

getType

public int getType()

setCurrentContainerString

public void setCurrentContainerString(String ccs)

getCurrentContainerString

public String getCurrentContainerString()

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

appendSearchCriteria

public QuerySpec appendSearchCriteria(QuerySpec querySpec)
                               throws WTException,
                                      QueryException
Description copied from interface: ConfigSpec
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:
QueryException
WTException
See Also:
QuerySpec, SearchCondition

process

public QueryResult process(QueryResult results)
                    throws WTException
Description copied from interface: ConfigSpec
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