|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.pds.SequentialResultBuilder
This class is a basic implementation that defers processing to the ItemBuilders it contains. The SELECT columns of each Item Builder are appended squentially. A single ObjectTable is used for all Item Builders to optimize object building.
This class performs access checking as each object is built. If any
object does not pass access control, then the entire no results are returned
for the entire row.
Supported API: false
Extendable: false
Nested Class Summary | |
(package private) class |
SequentialResultBuilder.AllItemBuilders
|
Field Summary | |
private Vector |
accessControlItemBuilders
|
private AccessControllerProcessor |
accessControllerProcessor
|
private AttributeMapInfo |
attributeMapInfo
|
private static String |
CLASSNAME
|
static boolean |
DEBUG
|
static long |
EXTERNALIZATION_VERSION_UID
|
private boolean |
isAllPersistable
|
private Vector |
itemBuilders
|
private int |
itemCount
|
private int |
itemStartOffset
|
private static DebugWriter |
LOG
|
private ObjectTable |
objectTable
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
private ResultSet |
resultSet
|
(package private) static long |
serialVersionUID
|
Fields inherited from interface wt.pds.ResultBuilder |
ACCESS_CONTROLLER_PROCESSOR, ATTRIBUTE_MAP_INFO, DESCENDANT_QUERY_TYPE_COMPATIBLE, ITEM_BUILDERS, OBJECT_TABLE |
Constructor Summary | |
SequentialResultBuilder()
|
Method Summary | |
void |
addItemBuilder(ItemBuilder a_itemBuilder)
Add an ItemBuilder that will be used to build results. |
Object[] |
build(ResultSet a_resultSet,
StatementBuilder a_statementBuilder)
Builds object from the result set. |
String |
buildEmptyAggregateSelect()
Supported API: false |
String |
buildSelect(Vector a_tableInfos,
Vector a_aliases)
Builds the select columns for the results. |
Object |
clone()
Create a deep-copy of this object. |
private void |
createItemResultSets(ResultSet a_resultSet)
This method is used to create new result sets for each ItemBuilder. |
AccessControllerProcessor |
getAccessControllerProcessor()
Gets the object for the association that plays role: accessControllerProcessor. |
private Enumeration |
getAllItemBuilders()
|
AttributeMapInfo |
getAttributeMapInfo()
Gets the object for the association that plays role: attributeMapInfo. |
Vector |
getItemBuilders()
Gets the object for the association that plays role: itemBuilders. |
Class |
getItemPrimaryClass(Vector a_classInfos,
int a_itemBuilderIndex)
Returns the primary class for the specified ItemBuilder. |
ObjectTable |
getObjectTable()
Gets the value of the attribute: objectTable; Cache of objects valid for the lifetime of a retrieve. |
boolean |
isDescendantQueryTypeCompatible()
Gets the value of the attribute: descendantQueryTypeCompatible; Indicates whether descendant query results will be guranteed to be type compatible (i.e. |
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(SequentialResultBuilder 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 |
setAccessControllerProcessor(AccessControllerProcessor a_AccessControllerProcessor)
Sets the object for the association that plays role: accessControllerProcessor. |
void |
setAttributeMapInfo(AttributeMapInfo a_AttributeMapInfo)
Sets the object for the association that plays role: attributeMapInfo. |
boolean |
setCurrentResultBuilder(ResultBuilder a_resultBuilder,
int a_currentIndex)
Supported API: false |
void |
setItemStartOffset(int a_itemStartOffset)
Supported API: false |
void |
setNonEmptyComponentIndex(int a_nonEmptyComponentIndex)
Supported API: false |
void |
setObjectTable(ObjectTable a_ObjectTable)
Sets the value of the attribute: objectTable; Cache of objects valid for the lifetime of a retrieve. |
String |
toString()
|
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private transient ObjectTable objectTable
private transient int itemStartOffset
private transient AttributeMapInfo attributeMapInfo
private Vector itemBuilders
private transient AccessControllerProcessor accessControllerProcessor
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final boolean DEBUG
private static final DebugWriter LOG
private transient ResultSet resultSet
private transient int itemCount
private transient boolean isAllPersistable
private transient Vector accessControlItemBuilders
Constructor Detail |
public SequentialResultBuilder()
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(SequentialResultBuilder 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 ObjectTable getObjectTable()
getObjectTable
in interface ResultBuilder
public void setObjectTable(ObjectTable a_ObjectTable) throws WTPropertyVetoException
setObjectTable
in interface ResultBuilder
a_ObjectTable
-
WTPropertyVetoException
public AttributeMapInfo getAttributeMapInfo()
getAttributeMapInfo
in interface ResultBuilder
public void setAttributeMapInfo(AttributeMapInfo a_AttributeMapInfo) throws WTPropertyVetoException
setAttributeMapInfo
in interface ResultBuilder
a_AttributeMapInfo
-
WTPropertyVetoException
public Vector getItemBuilders()
getItemBuilders
in interface ResultBuilder
public AccessControllerProcessor getAccessControllerProcessor()
getAccessControllerProcessor
in interface ResultBuilder
public void setAccessControllerProcessor(AccessControllerProcessor a_AccessControllerProcessor) throws WTPropertyVetoException
setAccessControllerProcessor
in interface ResultBuilder
a_AccessControllerProcessor
-
WTPropertyVetoException
public String buildEmptyAggregateSelect() throws PersistenceException
PersistenceException
public boolean isDescendantQueryTypeCompatible()
isDescendantQueryTypeCompatible
in interface ResultBuilder
public String buildSelect(Vector a_tableInfos, Vector a_aliases) throws PersistenceException
buildSelect
in interface ResultBuilder
a_tableInfos
- Vector of TableExpression instances to use for building the Select statementa_aliases
- Vector of String aliases to use for building the Select statement
PersistenceException
public Object[] build(ResultSet a_resultSet, StatementBuilder a_statementBuilder) throws PersistenceException
build
in interface ResultBuilder
a_resultSet
- a_statementBuilder
-
PersistenceException
public void addItemBuilder(ItemBuilder a_itemBuilder)
addItemBuilder
in interface ResultBuilder
a_itemBuilder
- public Class getItemPrimaryClass(Vector a_classInfos, int a_itemBuilderIndex)
getItemPrimaryClass
in interface ResultBuilder
a_classInfos
- a_itemBuilderIndex
-
public void reset()
reset
in interface ResultBuilder
public void setItemStartOffset(int a_itemStartOffset)
setItemStartOffset
in interface ResultBuilder
a_itemStartOffset
- public boolean setCurrentResultBuilder(ResultBuilder a_resultBuilder, int a_currentIndex)
setCurrentResultBuilder
in interface ResultBuilder
a_resultBuilder
- a_currentIndex
-
public void setNonEmptyComponentIndex(int a_nonEmptyComponentIndex)
setNonEmptyComponentIndex
in interface ResultBuilder
a_nonEmptyComponentIndex
- private void createItemResultSets(ResultSet a_resultSet) throws PersistenceException
a_resultSet
-
PersistenceException
private Enumeration getAllItemBuilders()
public Object clone()
clone
in interface ResultBuilder
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |