Package com.portal.bas
Class PCollectingModelHandle
java.lang.Object
com.portal.bas.PModelHandle
com.portal.bas.PCollectingModelHandle
- All Implemented Interfaces:
Serializable
PCollectingModelHandle is a version of PModelHandle
that contains a hash map. Use it to collect data that might otherwise
require a client-server round trip.
This behavior should be completely hidden.- Version:
- %version: 5 % %date_modified: Mon Dec 17 21:18:17 2001 %
- Author:
- larrylf
- See Also:
-
Field Summary
Fields inherited from class com.portal.bas.PModelHandle
LOOKUP_DONT_UPDATE, LOOKUP_FORCE_UPDATE, LOOKUP_UPDATE_IF_NEEDED, UNTYPED -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of the collecting handle that is otherwise a clone of another model handle. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the local collection.booleanGets thecollectOnlyproperty.Gets an entire set of description:value pairs as sets ofMap.Entryvalues.Gets a local value.booleanTests to see if the local collection has a certain field description.voidsetCollectOnly(boolean colOnly) Sets thecollectOnlyproperty.voidSets a local value.Methods inherited from class com.portal.bas.PModelHandle
equals, getHash, getModel, getType, hashCode, isGivenHash, toString
-
Constructor Details
-
PCollectingModelHandle
Creates an instance of the collecting handle that is otherwise a clone of another model handle.- Parameters:
mh- aPModelHandleto copy
-
-
Method Details
-
setValue
Sets a local value.- Parameters:
fieldDesc- a description of the field to setval- the value to set it to
-
getValue
Gets a local value.- Parameters:
fieldDesc- aStringdescription of the field to get- Returns:
- The field's value.
-
hasField
Tests to see if the local collection has a certain field description.- Parameters:
fieldDesc- the description to look for- Returns:
- True if present; false otherwise.
-
getEntrySet
Gets an entire set of description:value pairs as sets ofMap.Entryvalues.- Returns:
- A set of
Map.Entryvalues.
-
clear
public void clear()Clears the local collection. -
setCollectOnly
public void setCollectOnly(boolean colOnly) Sets thecollectOnlyproperty. This property controls whether or not the model cache is automatically updated with values from the local cache.- Parameters:
colOnly- true if the model handle should only collect data and not update the cache when possible; false otherwise
-
getCollectOnly
public boolean getCollectOnly()Gets thecollectOnlyproperty. This property controls whether or not the model cache is automatically updated with values from the local cache.- Returns:
- True if the model handle should only collect data and not update the cache when possible; false otherwise.
-