|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.pds.PersistableItemBuilder
This class provides the functionality for building a "full" object from a result set. All of the attributes in the object are included in the result set.
The internal implementation relies on the WTResultSet class to perform
the relational to object mapping.
Supported API: false
Extendable: false
Field Summary | |
private int |
classIndex
|
private static String |
CLASSNAME
|
protected static DMLGenerator |
DMLGENERATOR
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private PersistentRetrieveIfc |
persistentRetrieve
|
private Persistable |
refreshObject
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static HashMap |
SQL_MAP
|
private Class |
targetClass
|
private static ConstantExpression |
TIMESTAMP_FORMAT_EXPRESSION
|
private boolean |
useViewTableAlias
|
Fields inherited from interface wt.pds.ItemBuilder |
ACCESS_CONTROLLED_FROM_INDICIES, COLUMNS, DESCENDANT_QUERY_TYPE_COMPATIBLE, FROM_INDICIES, ITEM_COUNT |
Constructor Summary | |
PersistableItemBuilder()
Supported API: false |
|
PersistableItemBuilder(int a_classIndex)
Supported API: false |
Method Summary | |
Object |
build()
Builds an object from the current row in the result set. |
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 |
buildColumnSelect(String a_alias,
AliasDescriptor a_columnName,
StringBuffer a_select)
Builds a select column for the object. |
protected void |
buildColumnSelect(String a_alias,
String a_columnName,
StringBuffer a_select)
Builds a select column for the object. |
int |
buildEmptyAggregateColumn(AttributeMapInfo a_attributeMapInfo,
StringBuffer a_select)
Builds the select columns for building an object. |
int |
buildSelect(Vector a_tableInfos,
Vector a_aliases,
AttributeMapInfo a_attributeMapInfo,
StringBuffer a_select)
Builds the select columns for building an object. |
protected void |
buildSQLSelect(ColumnDescriptor[] columns,
ClassInfo a_classInfo,
String a_alias,
StringBuffer a_select)
|
protected void |
buildTimestampSelect(String a_alias,
AliasDescriptor a_columnName,
StringBuffer a_select)
Builds a select Timestamp column for the object. |
protected void |
buildTimestampSelect(String a_alias,
String a_columnName,
StringBuffer a_select)
Builds a select Timestamp column for the object. |
int |
createPersistentRetrieve(ResultSet a_resultSet,
ObjectTable a_objectTable,
int a_resultOffset,
AttributeMapInfo a_attributeMapInfo)
Creates the persistent retrieve object for this item. |
int[] |
getAccessControlledFromIndicies()
Gets the value of the attribute: accessControlledFromIndicies; Array of index values for items in the FromClause. |
protected String |
getAlias(Vector a_aliases)
|
int |
getClassIndex()
Gets the value of the attribute: classIndex; Index of the class in the classInfos Vector. |
protected ClassInfo |
getClassInfo(Vector a_classInfos)
Supported API: false |
ColumnExpression[] |
getColumns()
Gets the value of the attribute: columns; Returns ColumnExpressions for this item. |
int[] |
getFromIndicies()
Gets the value of the attribute: fromIndicies; Array of index values for items in the FromClause. |
int |
getItemCount()
Gets the value of the attribute: itemCount; Number of items that are built. |
Class |
getPrimaryClass(Vector a_classInfos)
Returns the primary class for this Item. |
Persistable |
getRefreshObject()
Gets the object for the association that plays role: refreshObject. |
protected Map |
getSQLMap()
|
boolean |
isDescendantQueryTypeCompatible()
Gets the value of the attribute: descendantQueryTypeCompatible; Indicates whether descendant query results will be guranteed to be type compatible (i.e. |
boolean |
isUseViewTableAlias()
Gets the value of the attribute: useViewTableAlias. |
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(PersistableItemBuilder thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
reset()
Resets the instance so that it can be re-used to process a new result. |
void |
setClassIndex(int a_ClassIndex)
Sets the value of the attribute: classIndex; Index of the class in the classInfos Vector. |
void |
setRefreshObject(Persistable a_RefreshObject)
Sets the object for the association that plays role: refreshObject. |
void |
setTimeStampAttributeTimestampDisabled()
Set the DateExpression in the ItemBuilder to the TimstampEnabled to false Supported API: false |
void |
setUseViewTableAlias(boolean a_UseViewTableAlias)
Sets the value of the attribute: useViewTableAlias. |
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 |
private static final String RESOURCE
private static final String CLASSNAME
private int classIndex
private transient PersistentRetrieveIfc persistentRetrieve
private boolean useViewTableAlias
private Persistable refreshObject
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private transient Class targetClass
private static final ConstantExpression TIMESTAMP_FORMAT_EXPRESSION
private static final HashMap SQL_MAP
protected static final DMLGenerator DMLGENERATOR
Constructor Detail |
public PersistableItemBuilder(int a_classIndex) throws WTPropertyVetoException
a_classIndex
-
WTPropertyVetoException
public PersistableItemBuilder()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(PersistableItemBuilder thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public int getClassIndex()
public void setClassIndex(int a_ClassIndex) throws WTPropertyVetoException
a_ClassIndex
-
WTPropertyVetoException
public boolean isUseViewTableAlias()
public void setUseViewTableAlias(boolean a_UseViewTableAlias) throws WTPropertyVetoException
a_UseViewTableAlias
-
WTPropertyVetoException
public Persistable getRefreshObject()
public void setRefreshObject(Persistable a_RefreshObject) throws WTPropertyVetoException
a_RefreshObject
-
WTPropertyVetoException
protected ClassInfo getClassInfo(Vector a_classInfos) throws WTException
a_classInfos
-
WTException
protected void buildColumnSelect(String a_alias, String a_columnName, StringBuffer a_select) throws PersistenceException
a_alias
- a_columnName
- a_select
-
PersistenceException
protected void buildTimestampSelect(String a_alias, String a_columnName, StringBuffer a_select) throws PersistenceException
a_alias
- a_columnName
- a_select
-
PersistenceException
protected void buildClassnameSelect(String a_alias, String a_columnName, ClassInfo a_classInfo, StringBuffer a_select) throws PersistenceException
a_alias
- a_columnName
- a_classInfo
- a_select
-
PersistenceException
protected void buildColumnSelect(String a_alias, AliasDescriptor a_columnName, StringBuffer a_select) throws PersistenceException
a_alias
- a_columnName
- a_select
-
PersistenceException
protected void buildTimestampSelect(String a_alias, AliasDescriptor a_columnName, StringBuffer a_select) throws PersistenceException
a_alias
- a_columnName
- a_select
-
PersistenceException
public int getItemCount()
getItemCount
in interface ItemBuilder
public boolean isDescendantQueryTypeCompatible()
isDescendantQueryTypeCompatible
in interface ItemBuilder
public int[] getAccessControlledFromIndicies()
getAccessControlledFromIndicies
in interface ItemBuilder
public int[] getFromIndicies()
getFromIndicies
in interface ItemBuilder
public ColumnExpression[] getColumns() throws WTException
getColumns
in interface ItemBuilder
WTException
public int buildSelect(Vector a_tableInfos, Vector a_aliases, AttributeMapInfo a_attributeMapInfo, StringBuffer a_select) throws PersistenceException
buildSelect
in interface ItemBuilder
a_tableInfos
- a_aliases
- a_attributeMapInfo
- a_select
-
PersistenceException
public Object build() throws PersistenceException
build
in interface ItemBuilder
PersistenceException
public int createPersistentRetrieve(ResultSet a_resultSet, ObjectTable a_objectTable, int a_resultOffset, AttributeMapInfo a_attributeMapInfo) throws PersistenceException
createPersistentRetrieve
in interface ItemBuilder
a_resultSet
- a_objectTable
- a_resultOffset
- a_attributeMapInfo
-
PersistenceException
public Class getPrimaryClass(Vector a_classInfos)
getPrimaryClass
in interface ItemBuilder
a_classInfos
-
public void reset()
reset
in interface ItemBuilder
public int buildEmptyAggregateColumn(AttributeMapInfo a_attributeMapInfo, StringBuffer a_select) throws PersistenceException
buildEmptyAggregateColumn
in interface ItemBuilder
a_attributeMapInfo
- a_select
-
PersistenceException
public void setTimeStampAttributeTimestampDisabled() throws WTException
setTimeStampAttributeTimestampDisabled
in interface ItemBuilder
WTException
protected Map getSQLMap()
protected void buildSQLSelect(ColumnDescriptor[] columns, ClassInfo a_classInfo, String a_alias, StringBuffer a_select) throws PersistenceException
PersistenceException
protected String getAlias(Vector a_aliases)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |