wt.enterprise.tabularresults
Class UsesQuery

java.lang.Object
  extended bywt.enterprise.tabularresults.BaseQueryService
      extended bywt.enterprise.tabularresults.UsesQuery
All Implemented Interfaces:
Externalizable, NetFactor, Serializable

public class UsesQuery
extends BaseQueryService
implements Externalizable

Use the newUsesQuery static factory method(s), not the UsesQuery 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: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  String[] columnNames
           
private  String dataFormatName
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String tableFormatName
           
 
Constructor Summary
UsesQuery()
           
 
Method Summary
private  void dataFormatNameValidate(String a_DataFormatName)
           
 String[] getColumnNames()
          Gets the value of the attribute: columnNames; The instance variable is used to hold an array of the default or initial columns that will be presented in the table of results.
 String getConceptualClassname()
          Deprecated.  
 String getDataFormatName()
          Gets the value of the attribute: dataFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false
 Object getQuery(Object context_obj, Properties parameters, Locale locale)
          A call to getQuery should sent the object that is to be queried against to build a QueryResult.
 String getTableFormatName()
          Gets the value of the attribute: tableFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false
protected  void initialize()
           
static UsesQuery newUsesQuery()
          Default factory for the class.
 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(UsesQuery thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setColumnNames(String[] a_ColumnNames)
          Sets the value of the attribute: columnNames; The instance variable is used to hold an array of the default or initial columns that will be presented in the table of results.
 void setDataFormatName(String a_DataFormatName)
          Sets the value of the attribute: dataFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false
 void setTableFormatName(String a_TableFormatName)
          Sets the value of the attribute: tableFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false
private  void tableFormatNameValidate(String a_TableFormatName)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.enterprise.tabularresults.BaseQueryService
getClassInfo, readVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

tableFormatName

private String tableFormatName

dataFormatName

private String dataFormatName

columnNames

private String[] columnNames

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

UsesQuery

public UsesQuery()
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 BaseQueryService
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 BaseQueryService
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(UsesQuery 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

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

newUsesQuery

public static UsesQuery newUsesQuery()
                              throws WTException
Default factory for the class.

Supported API: false

Returns:
UsesQuery
Throws:
WTException

getTableFormatName

public String getTableFormatName()
Gets the value of the attribute: tableFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false

Specified by:
getTableFormatName in class BaseQueryService
Returns:
String
See Also:
that the query generated by a call to, wants to use to build the table for presenting the results of the query.

setTableFormatName

public void setTableFormatName(String a_TableFormatName)
                        throws WTPropertyVetoException
Sets the value of the attribute: tableFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false

Specified by:
setTableFormatName in class BaseQueryService
Parameters:
a_TableFormatName -
Throws:
WTPropertyVetoException
See Also:
that the query generated by a call to, wants to use to build the table for presenting the results of the query.

tableFormatNameValidate

private void tableFormatNameValidate(String a_TableFormatName)
                              throws WTPropertyVetoException
Parameters:
a_TableFormatName -
Throws:
WTPropertyVetoException

getDataFormatName

public String getDataFormatName()
Gets the value of the attribute: dataFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false

Specified by:
getDataFormatName in class BaseQueryService
Returns:
String
See Also:
that the query generated by a call to, wants to use to format the individual table enties for presenting the results of the query.

setDataFormatName

public void setDataFormatName(String a_DataFormatName)
                       throws WTPropertyVetoException
Sets the value of the attribute: dataFormatName; This instance variable can be used to provide a the name, full class path for example, of the subclass of

Supported API: false

Specified by:
setDataFormatName in class BaseQueryService
Parameters:
a_DataFormatName -
Throws:
WTPropertyVetoException
See Also:
that the query generated by a call to, wants to use to format the individual table enties for presenting the results of the query.

dataFormatNameValidate

private void dataFormatNameValidate(String a_DataFormatName)
                             throws WTPropertyVetoException
Parameters:
a_DataFormatName -
Throws:
WTPropertyVetoException

getColumnNames

public String[] getColumnNames()
Gets the value of the attribute: columnNames; The instance variable is used to hold an array of the default or initial columns that will be presented in the table of results. The subclasses of

Supported API: false

Specified by:
getColumnNames in class BaseQueryService
Returns:
String[]
See Also:
should implement, to initialize this class.

setColumnNames

public void setColumnNames(String[] a_ColumnNames)
                    throws WTPropertyVetoException
Sets the value of the attribute: columnNames; The instance variable is used to hold an array of the default or initial columns that will be presented in the table of results. The subclasses of

Supported API: false

Specified by:
setColumnNames in class BaseQueryService
Parameters:
a_ColumnNames -
Throws:
WTPropertyVetoException
See Also:
should implement, to initialize this class.

getQuery

public Object getQuery(Object context_obj,
                       Properties parameters,
                       Locale locale)
                throws WTException
A call to getQuery should sent the object that is to be queried against to build a QueryResult. After the query is completed, the queryresult should be enumerated against and placed into an array. One of the things that should be done at this point is any unform action on the queryresult for presentation should be done here. For example, if you get back and ChangeRecord and you need the Changeable object for presentation, you should retrieve the Changeable object and create a Changeable array with the Changeable objects. The Locale argument is passed in so that a sort may be done on the enumerated result if so desired. Here is some sample code of performing the query and sorting it.
         qr = ChangeHelper.service.getAddressingChangeOrders(change_request);
         if (qr == null)
         {
             return null;
         }
         String sorting_attribute = "number";
         QueryCollationKeyFactory key = new QueryCollationKeyFactory(locale,
 sorting_attribute);
         SortedEnumeration enum = new SortedEnumeration(qr.getEnumeration(),
 key);
         results = new Vector();
         while (enum.hasMoreElements())
           {
             ChangeOrder current_element = (ChangeOrder)enum.nextElement();
             System.out.println("ChangeOrder -> " + current_element);
             results.addElement(current_element);
           }
 


Supported API: false

Supported API: false

Specified by:
getQuery in class BaseQueryService
Parameters:
context_obj -
parameters -
locale -
Returns:
Object
Throws:
WTException

initialize

protected void initialize()