Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.server
Class JboEventObject

java.lang.Object
  extended byjava.util.EventObject
      extended byoracle.jbo.server.JboEventObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JboMessageObject

public class JboEventObject
extends java.util.EventObject

The event transmitter for JboEvent instances.

This class carries information about an event from the event's publisher to all its subscribers. This class is used by code generated for events defined by JDeveloper Wizards.

Instances contain a hash table containing name-value pairs to be transmited through the event mechanism.

Instances may be distinguished by their names.

Since:
JDeveloper 3.0
See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable mData
          Stores the name-value pairs that this event carries as a payload from the publisher of this event.
protected  java.lang.String mName
          Name of the event for which this event object is created.
static NullValue nullValue
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
JboEventObject(java.lang.Object source)
          Creates an event object.
JboEventObject(java.lang.Object source, java.lang.String name)
          Creates an event object.
 
Method Summary
 boolean contains(java.lang.Object value)
          Tests for the presence of an entry having the given value in this event object's hash table.
 boolean containsKey(java.lang.String name)
          Tests for the presence of an entry having the given key in this event object's hash table.
 java.util.Enumeration elements()
          Enumerates the name-value pairs in this event object's hash table.
 java.lang.Object get(java.lang.String name)
          Gets a value associated with the given name.
 java.util.Hashtable getData()
          Creates a copy of the hashtable containing name-value pairs of this event's properties.
 java.lang.Object[] getElementsArray()
          Constructs an array of the name-value pairs in this event object's hash table.
 java.lang.String getName()
          Gets this event object's name.
 java.lang.String[] getNamesArray()
          Constructs an array of the names used as keys in this event object's hash table.
 boolean isEmpty()
          Tests if this event object's hash table is empty.
 java.util.Enumeration names()
          Enumerates the names used as keys in this event object's hash table.
 java.lang.Object put(java.lang.String name, java.lang.Object value)
          Adds a name-value pair to this event object's hash table.
 java.lang.Object remove(java.lang.String name)
          Deletes a name-value pair from this event object's hash table.
 void setName(java.lang.String name)
          Gives this event object a name.
 int size()
          Counts the name-value pairs in this event object's hash table.
 java.lang.String toString()
          Gets this event object's name.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nullValue

public static NullValue nullValue

mData

protected java.util.Hashtable mData
Stores the name-value pairs that this event carries as a payload from the publisher of this event.


mName

protected java.lang.String mName
Name of the event for which this event object is created. This is used by JDeveloper wizards.

Constructor Detail

JboEventObject

public JboEventObject(java.lang.Object source)
Creates an event object.

Parameters:
source - the object that spawned the event.

JboEventObject

public JboEventObject(java.lang.Object source,
                      java.lang.String name)
Creates an event object.

Parameters:
source - the object that spawned the event.
name - the name of this event.
Method Detail

getData

public java.util.Hashtable getData()
Creates a copy of the hashtable containing name-value pairs of this event's properties. Note that JboEventObject.nullValue in the elements of this hashtable indicates that the element value was null when data was put into this event.

Returns:
a copy of this event's properties table.

contains

public boolean contains(java.lang.Object value)
Tests for the presence of an entry having the given value in this event object's hash table.

Parameters:
value - an object associated with a name in the hash table.
Returns:
true if value is found.

containsKey

public boolean containsKey(java.lang.String name)
Tests for the presence of an entry having the given key in this event object's hash table.

Parameters:
name - a string to be used as a Hashtable key.
Returns:
true if name is found.

elements

public java.util.Enumeration elements()
Enumerates the name-value pairs in this event object's hash table.

Returns:
the enumeration.

get

public java.lang.Object get(java.lang.String name)
Gets a value associated with the given name. Returns null if a entry with the given name is not found. Returns null for keys whose values were null when stored during event creation.

Parameters:
name - a string to be used as a Hashtable key.
Returns:
the value bound to name in this event object's hash table.

getElementsArray

public java.lang.Object[] getElementsArray()
Constructs an array of the name-value pairs in this event object's hash table.

Returns:
an array of strings generated by the enumeration of the hash table.

getNamesArray

public java.lang.String[] getNamesArray()
Constructs an array of the names used as keys in this event object's hash table.

Returns:
the array of names.

isEmpty

public boolean isEmpty()
Tests if this event object's hash table is empty.

Returns:
true if the hash table is empty.

names

public java.util.Enumeration names()
Enumerates the names used as keys in this event object's hash table.

Returns:
an enumeration of the name strings.

put

public java.lang.Object put(java.lang.String name,
                            java.lang.Object value)
Adds a name-value pair to this event object's hash table. If value is null, JboEventObject.nullValue is stored in the hashtable for the given name.

Parameters:
name - a string to be used as a hash table key.
value - an object to be associated with name.
Returns:
the previous value associated with name, if any, or null otherwise.

remove

public java.lang.Object remove(java.lang.String name)
Deletes a name-value pair from this event object's hash table.

Parameters:
name - a string to be used as a hash table key.
Returns:
the value associated with name, if any, or null otherwise.

size

public int size()
Counts the name-value pairs in this event object's hash table.

Returns:
the number of entries.

setName

public void setName(java.lang.String name)
Gives this event object a name.

Parameters:
name - a string used as a name.

getName

public java.lang.String getName()
Gets this event object's name.

Returns:
the name of this event object.

toString

public java.lang.String toString()
Gets this event object's name.

Returns:
the name of this event object.

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

Copyright © 1997, 2004, Oracle. All rights reserved.