|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.admin.Selector
wt.notify.AttributeValueSelector
AttributeValueSelector
adds to Selector the ability to specify
attribute names and their values to select an object. There is a limit
on the number of pairs that can be specified. This limit depends on
the length of the names and values, as they are represented internally
by a WTStringMap object, that is limited to the maximum allowed in a
database column.
Use the newAttributeValueSelector
static factory method(s),
not the AttributeValueSelector
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
Field Summary | |
protected static String |
ATTR_VALUE_MAP
Label for the attribute. |
private static int |
ATTR_VALUE_MAP_UPPER_LIMIT
|
private WTStringMap |
attrValueMap
|
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 boolean |
VERBOSE_EXECUTION
|
Fields inherited from class wt.admin.Selector |
ALL_EVENTS, ALL_STATES, EVENT_KEY, OWNER_REF, PRE_R6_VERSION_UID, SELECTOR_NAME, STATE_NAME, TOP_CLASS, TYPE_ID |
Constructor Summary | |
AttributeValueSelector()
|
Method Summary | |
private void |
attrValueMapValidate(WTStringMap a_AttrValueMap)
|
boolean |
checkAttributeValues(Object object)
Determines whether the object passed as argument matches the subscription, as far as attribute values are concerned. |
Selector |
copy()
Returns a copy of the selector. |
boolean |
equals(Object obj)
Returns true if the object passed as argument is a equal, false otherwise. |
private String |
eventToString(String event)
|
Enumeration |
getAttributeNames()
Returns an enumeration containing all attribute names. |
String |
getAttributeValue(String name)
Returns the attribute value for the named attribute. |
protected WTStringMap |
getAttrValueMap()
Gets the value of the attribute: ATTR_VALUE_MAP. |
String |
getConceptualClassname()
Deprecated. |
boolean |
hasAttributes()
Returns 'true' if there are attribute-value pairs defined; 'false' otherwise. |
int |
hashCode()
Returns the hash code for the selector. |
protected void |
initialize(Selector sel)
Supports initialization, following construction of an instance. |
boolean |
isMoreGeneral(Selector sel)
Returns whether a selector is "more general" than another. |
static AttributeValueSelector |
newAttributeValueSelector()
No-arg constructor. |
static AttributeValueSelector |
newAttributeValueSelector(Selector sel)
Copy constructor. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
void |
readExternal(PersistentRetrieveIfc input)
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store. |
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(AttributeValueSelector thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
removeAttribute(String name)
Removes attribute given its name. |
void |
setAttributeValue(String name,
String value)
Sets an attribute value for the named attribute. |
protected void |
setAttrValueMap(WTStringMap a_AttrValueMap)
Sets the value of the attribute: ATTR_VALUE_MAP. |
String |
toString()
Produces a String representation of the object. |
private String |
typeToString(String type_id)
|
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
void |
writeExternal(PersistentStoreIfc output)
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store. |
Methods inherited from class wt.admin.Selector |
getChildren, getClassInfo, getEventKey, getLocalizedEventKey, getOwnerRef, getParents, getQuerySpec, getStateName, getTypeId, initialize, initialize, isGoodForList, isGoodForRule, newSelector, newSelector, newSelector, readVersion, setEventKey, setLocalizedEventKey, setOwnerRef, setStateName, setTypeId |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
protected static final String ATTR_VALUE_MAP
private static int ATTR_VALUE_MAP_UPPER_LIMIT
private WTStringMap attrValueMap
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static boolean VERBOSE_EXECUTION
Constructor Detail |
public AttributeValueSelector()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class Selector
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class Selector
input
-
IOException
ClassNotFoundException
protected boolean readVersion(AttributeValueSelector 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 void writeExternal(PersistentStoreIfc output) throws SQLException, DatastoreException
(Not intended for general use.)
Supported API: false
writeExternal
in interface ObjectMappable
writeExternal
in class Selector
output
-
SQLException
DatastoreException
public void readExternal(PersistentRetrieveIfc input) throws SQLException, DatastoreException
(Not intended for general
use.)
Supported API: false
readExternal
in interface ObjectMappable
readExternal
in class Selector
input
-
SQLException
DatastoreException
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class Selector
protected WTStringMap getAttrValueMap()
protected void setAttrValueMap(WTStringMap a_AttrValueMap) throws WTPropertyVetoException
a_AttrValueMap
-
WTPropertyVetoException
private void attrValueMapValidate(WTStringMap a_AttrValueMap) throws WTPropertyVetoException
a_AttrValueMap
-
WTPropertyVetoException
public static AttributeValueSelector newAttributeValueSelector() throws WTException
WTException
public static AttributeValueSelector newAttributeValueSelector(Selector sel) throws WTException
sel
-
WTException
protected void initialize(Selector sel) throws WTException
initialize
in class Selector
sel
-
WTException
public boolean equals(Object obj)
equals
in class Selector
obj
-
public int hashCode()
hashCode
in class Selector
public Selector copy() throws WTException
WTException
public String getAttributeValue(String name)
name
-
public void setAttributeValue(String name, String value)
name
- value
- public void removeAttribute(String name)
name
- public Enumeration getAttributeNames()
public boolean hasAttributes()
public String toString()
toString
in class Selector
public boolean checkAttributeValues(Object object) throws WTException
object
-
WTException
public boolean isMoreGeneral(Selector sel)
Selector
A selector Note that this relationship is transitive and reflexive but not
symmetric.
typeId1 is more general than typeId2 if they are the same or typeId2
is derived from typeId1; state1 is more general than state2 if they
are the same or state1 is Selector.ALL_STATES; finally, event1 is
more general than event2 if they are the same or event1 is Selector.ALL_EVENTS.
Supported API: false
isMoreGeneral
in class Selector
sel
-
private String typeToString(String type_id)
private String eventToString(String event)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |