Oracle Application Server Wireless Java API Reference
B14043-01


oracle.edge.common
Class EdgeEvent

java.lang.Object
  extended byoracle.edge.common.EdgeEvent

All Implemented Interfaces:
oracle.jdbc.internal.ObjectData, oracle.sql.ORAData

public class EdgeEvent
extends java.lang.Object
implements oracle.sql.ORAData

This is java wrapper for the ADT event type in the database. To send a ADT payload to streams in the edge schema, create an EdgeEvent object, and then set the ADT payload in the JMS messsage.


Constructor Summary
EdgeEvent(boolean init)
Constructor with specified error code.

Method Summary
java.lang.String getCorrelationId()
Returns the correlation id field of this event
java.lang.String getData()
Returns the data field of this event
java.sql.Timestamp getDate()
Returns the date field of this event
java.lang.String getDeviceName()
Returns the device name field of this event
java.lang.String getId()
Returns the id field of this event
static EdgeEvent getInstance(javax.jms.Message msg)
Required method from the ORAData interface.
java.lang.String getSitename()
Returns the sitename field of this event
java.lang.String getSourceName()
Returns the source name field of this event
int getSubType()
Returns the subtype field of this event
int getType()
Returns the type field of this event
void setCorrelationId(java.lang.String corr_id)
Sets the correlation id field of this event
void setData(java.lang.String data)
Sets the data field of this event
void setDate(java.sql.Timestamp date)
Sets the date field of this event
void setDeviceName(java.lang.String devicename)
Sets the devicename field of this event
void setId(java.lang.String id)
Sets the id field of this event
void setSitename(java.lang.String sitename)
Sets the sitename field of this event
void setSourceName(java.lang.String source)
Sets the source field of this event
void setSubType(int subtype)
Sets the subtype field of this event
void setType(int type)
Sets the type field of this event
oracle.sql.Datum toDatum(java.sql.Connection oracleConnection)
Required method from the ORAData interface.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EdgeEvent

public EdgeEvent(boolean init)
Constructor with specified error code.
Parameters:
init - If true, will create the underlying MutableStruct object. If constructing and sending msgs should set this to true. If false, will not create underlying MutableStruct object, all accessor methods will throw a NullPointerException

Method Detail

getCorrelationId

public java.lang.String getCorrelationId()
                                  throws java.sql.SQLException
Returns the correlation id field of this event
Returns:
the correlation id name
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the correlation id name.

getData

public java.lang.String getData()
                         throws java.sql.SQLException
Returns the data field of this event
Returns:
the data
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the data.

getDate

public java.sql.Timestamp getDate()
                           throws java.sql.SQLException
Returns the date field of this event
Returns:
the date
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the date.

getDeviceName

public java.lang.String getDeviceName()
                               throws java.sql.SQLException
Returns the device name field of this event
Returns:
the device name
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the device name .

getId

public java.lang.String getId()
                       throws java.sql.SQLException
Returns the id field of this event
Returns:
the id
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the id.

getInstance

public static EdgeEvent getInstance(javax.jms.Message msg)
                             throws javax.jms.JMSException
Required method from the ORAData interface. Constructs a EdgeEvent from a JMSMessage which is carrying an Oracle ADT payload. Shouldn't be used. To get an EdgeEvent you should cast the javax.jms.Message to a oracle.jms.AdtMessage and then call oracle.jms.AdtMessage.getAdtPayload().
Parameters:
msg - The JMS Message containing the Adt payload.
Throws:
javax.jms.JMSException

getSitename

public java.lang.String getSitename()
                             throws java.sql.SQLException
Returns the sitename field of this event
Returns:
the sitename
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the sitename.

getSourceName

public java.lang.String getSourceName()
                               throws java.sql.SQLException
Returns the source name field of this event
Returns:
the source name
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the source name.

getSubType

public int getSubType()
               throws java.sql.SQLException
Returns the subtype field of this event
Returns:
the subtype
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the subtype.

getType

public int getType()
            throws java.sql.SQLException
Returns the type field of this event
Returns:
the value of the type field
Throws:
java.sql.SQLException - Thrown if there is a underlying error when retrieving the type.

setCorrelationId

public void setCorrelationId(java.lang.String corr_id)
                      throws java.sql.SQLException
Sets the correlation id field of this event
Parameters:
corr_id - The value the correlation id field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the correlation id.

setData

public void setData(java.lang.String data)
             throws java.sql.SQLException
Sets the data field of this event
Parameters:
data - The value the data field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the data.

setDate

public void setDate(java.sql.Timestamp date)
             throws java.sql.SQLException
Sets the date field of this event
Parameters:
date - The value the date field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the date.

setDeviceName

public void setDeviceName(java.lang.String devicename)
                   throws java.sql.SQLException
Sets the devicename field of this event
Parameters:
devicename - The value the devicename field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the devicename.

setId

public void setId(java.lang.String id)
           throws java.sql.SQLException
Sets the id field of this event
Parameters:
id - The value the id field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the id.

setSitename

public void setSitename(java.lang.String sitename)
                 throws java.sql.SQLException
Sets the sitename field of this event
Parameters:
sitename - The value the sitename field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the sitename.

setSourceName

public void setSourceName(java.lang.String source)
                   throws java.sql.SQLException
Sets the source field of this event
Parameters:
source - The value the source field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the source.

setSubType

public void setSubType(int subtype)
                throws java.sql.SQLException
Sets the subtype field of this event
Parameters:
subtype - The value the subtype field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the subtype.

setType

public void setType(int type)
             throws java.sql.SQLException
Sets the type field of this event
Parameters:
type - The value the type field of this event should be set to
Throws:
java.sql.SQLException - Thrown if there is a underlying error when setting the type.

toDatum

public oracle.sql.Datum toDatum(java.sql.Connection oracleConnection)
                         throws java.sql.SQLException
Required method from the ORAData interface. Actually makes the appropriate JDBC calls to serialize this EdgeEvent into Oracle Streams
Specified by:
toDatum in interface oracle.sql.ORAData
Parameters:
oracleConnection - The Oracle JDBC Connection that will be used to serialize this object.
Throws:
java.sql.SQLException

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.