wt.pds
Class PersistableViewItemBuilder

java.lang.Object
  extended bywt.pds.PersistableItemBuilder
      extended bywt.pds.PersistableViewItemBuilder
All Implemented Interfaces:
Externalizable, ItemBuilder, Serializable

public class PersistableViewItemBuilder
extends PersistableItemBuilder
implements Externalizable

This class provides the functionality for building a "full" Persistable object from a result set. All of the attributes in the object are included in the result set. The Persistable that is returned is specified by the view class attribute. Sub-classes that are queried return only the columns from the view class and instances are of the view class type.

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
           
private static HashMap SQL_MAP
           
private  Class viewClass
           
private  ClassInfo viewClassInfo
           
private  String viewTableAlias
           
 
Fields inherited from class wt.pds.PersistableItemBuilder
DMLGENERATOR
 
Fields inherited from interface wt.pds.ItemBuilder
ACCESS_CONTROLLED_FROM_INDICIES, COLUMNS, DESCENDANT_QUERY_TYPE_COMPATIBLE, FROM_INDICIES, ITEM_COUNT
 
Constructor Summary
PersistableViewItemBuilder()
          

Supported API: false
PersistableViewItemBuilder(int a_classIndex, Class a_viewClass)
          

Supported API: false
PersistableViewItemBuilder(int a_classIndex, Class a_viewClass, String a_viewTableAlias)
          

Supported API: false
 
Method Summary
protected  void buildClassnameSelect(String a_alias, String a_columnName, ClassInfo a_classInfo, StringBuffer a_select)
          Builds a select Classname column for the object.
protected  void buildSQLSelect(ColumnDescriptor[] columns, ClassInfo a_classInfo, String a_alias, StringBuffer a_select)
           
protected  void buildTimestampSelect(String a_alias, String a_columnName, StringBuffer a_select)
          Builds a select Timestamp column for the object.
protected  String getAlias(Vector a_aliases)
           
protected  ClassInfo getClassInfo(Vector a_classInfos)
          

Supported API: false
protected  Map getSQLMap()
           
 Class getViewClass()
          Gets the value of the attribute: viewClass; Persistable class for this view

Supported API: false
 String getViewTableAlias()
          Gets the value of the attribute: viewTableAlias.
 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(PersistableViewItemBuilder thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setViewClass(Class a_ViewClass)
          Sets the value of the attribute: viewClass; Persistable class for this view

Supported API: false
private  void viewClassValidate(Class a_ViewClass)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.pds.PersistableItemBuilder
build, buildColumnSelect, buildColumnSelect, buildEmptyAggregateColumn, buildSelect, buildTimestampSelect, createPersistentRetrieve, getAccessControlledFromIndicies, getClassIndex, getColumns, getFromIndicies, getItemCount, getPrimaryClass, getRefreshObject, isDescendantQueryTypeCompatible, isUseViewTableAlias, readVersion, reset, setClassIndex, setRefreshObject, setTimeStampAttributeTimestampDisabled, setUseViewTableAlias
 
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

viewClass

private Class viewClass

viewTableAlias

private String viewTableAlias

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

viewClassInfo

private transient ClassInfo viewClassInfo

SQL_MAP

private static final HashMap SQL_MAP
Constructor Detail

PersistableViewItemBuilder

public PersistableViewItemBuilder()


Supported API: false


PersistableViewItemBuilder

public PersistableViewItemBuilder(int a_classIndex,
                                  Class a_viewClass)
                           throws WTPropertyVetoException


Supported API: false

Parameters:
a_classIndex -
a_viewClass -
Throws:
WTPropertyVetoException

PersistableViewItemBuilder

public PersistableViewItemBuilder(int a_classIndex,
                                  Class a_viewClass,
                                  String a_viewTableAlias)
                           throws WTPropertyVetoException


Supported API: false

Parameters:
a_classIndex -
a_viewClass -
a_viewTableAlias -
Throws:
WTPropertyVetoException
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 PersistableItemBuilder
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 PersistableItemBuilder
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

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

getViewClass

public Class getViewClass()
Gets the value of the attribute: viewClass; Persistable class for this view

Supported API: false

Returns:
Class

setViewClass

public void setViewClass(Class a_ViewClass)
                  throws WTPropertyVetoException
Sets the value of the attribute: viewClass; Persistable class for this view

Supported API: false

Parameters:
a_ViewClass -
Throws:
WTPropertyVetoException

viewClassValidate

private void viewClassValidate(Class a_ViewClass)
                        throws WTPropertyVetoException
Parameters:
a_ViewClass -
Throws:
WTPropertyVetoException

getViewTableAlias

public String getViewTableAlias()
Gets the value of the attribute: viewTableAlias.

Supported API: false

Returns:
String

getClassInfo

protected ClassInfo getClassInfo(Vector a_classInfos)
                          throws WTException


Supported API: false

Overrides:
getClassInfo in class PersistableItemBuilder
Parameters:
a_classInfos -
Throws:
WTException

buildTimestampSelect

protected void buildTimestampSelect(String a_alias,
                                    String a_columnName,
                                    StringBuffer a_select)
                             throws PersistenceException
Builds a select Timestamp column for the object.

Supported API: false

Overrides:
buildTimestampSelect in class PersistableItemBuilder
Parameters:
a_alias -
a_columnName -
a_select -
Throws:
PersistenceException

buildClassnameSelect

protected void buildClassnameSelect(String a_alias,
                                    String a_columnName,
                                    ClassInfo a_classInfo,
                                    StringBuffer a_select)
                             throws PersistenceException
Builds a select Classname column for the object.

Supported API: false

Overrides:
buildClassnameSelect in class PersistableItemBuilder
Parameters:
a_alias -
a_columnName -
a_classInfo -
a_select -
Throws:
PersistenceException

getSQLMap

protected Map getSQLMap()
Overrides:
getSQLMap in class PersistableItemBuilder

buildSQLSelect

protected void buildSQLSelect(ColumnDescriptor[] columns,
                              ClassInfo a_classInfo,
                              String a_alias,
                              StringBuffer a_select)
                       throws PersistenceException
Overrides:
buildSQLSelect in class PersistableItemBuilder
Throws:
PersistenceException

getAlias

protected String getAlias(Vector a_aliases)
Overrides:
getAlias in class PersistableItemBuilder