org.xquark.mapping
Class TriggerEvent

java.lang.Object
  extended by org.xquark.mapping.TriggerEvent

public class TriggerEvent
extends java.lang.Object


Field Summary
static java.lang.String[] actionStrings
           
static int DELETE
           
static int INSERT
           
static int UPDATE
           
 
Constructor Summary
TriggerEvent(StorageContext context, java.lang.String table, java.lang.String[] colnames, java.lang.Object[] colvalues, int action)
          Constructor for TriggerEvent
 
Method Summary
 int getAction()
          Returns the action linked to this event
 int getColumnCount()
          Returns the number of columns selected for the event
 java.lang.String getColumnName(int index)
          Returns the name of the column at the given index
 java.lang.String[] getColumnNames()
          Returns the array of column names
 java.lang.Object getColumnValue(int index)
          Returns the value of the column at the given index
 java.lang.Object getColumnValue(java.lang.String colname)
          Returns the value of the column for the given column name
 java.lang.Object[] getColumnValues()
          Returns the array of column values
 java.lang.String getMappingMode()
          Returns the current mappping mode.
 java.lang.String getMappingNamespace()
          Returns the target namespace of the active mapping.
 java.sql.Connection getStorageContext()
          Returns the JDBC connection
 java.lang.String getTableName()
          Returns the table name for the event
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSERT

public static final int INSERT
See Also:
Constant Field Values

UPDATE

public static final int UPDATE
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

actionStrings

public static final java.lang.String[] actionStrings
Constructor Detail

TriggerEvent

public TriggerEvent(StorageContext context,
                    java.lang.String table,
                    java.lang.String[] colnames,
                    java.lang.Object[] colvalues,
                    int action)
Constructor for TriggerEvent

Parameters:
context - the storage context that provides access to storage information such as the JDBC connection
table - the name of the table in which the tuple has been inserted
colnames - the names of the tuple columns that have been selected for the event
colvalues - the values of the tuple columns that have been selected for the event
Method Detail

getStorageContext

public java.sql.Connection getStorageContext()
Returns the JDBC connection

Returns:
the JDBC connection

getMappingNamespace

public java.lang.String getMappingNamespace()
Returns the target namespace of the active mapping.

Returns:
the target namespace as a String

getMappingMode

public java.lang.String getMappingMode()
Returns the current mappping mode.

Returns:
the mapping mode as a String

getTableName

public java.lang.String getTableName()
Returns the table name for the event

Returns:
the table name

getColumnCount

public int getColumnCount()
Returns the number of columns selected for the event

Returns:
the number of columns

getColumnNames

public java.lang.String[] getColumnNames()
Returns the array of column names

Returns:
the array of column names

getColumnValues

public java.lang.Object[] getColumnValues()
Returns the array of column values

Returns:
the array of column values

getColumnName

public java.lang.String getColumnName(int index)
Returns the name of the column at the given index

Parameters:
index - the index of the column, starting at 0
Returns:
the name of the column

getColumnValue

public java.lang.Object getColumnValue(int index)
Returns the value of the column at the given index

Parameters:
index - the index of the column, starting at 0
Returns:
the value of the column

getColumnValue

public java.lang.Object getColumnValue(java.lang.String colname)
Returns the value of the column for the given column name

Parameters:
colname - the name of the column
Returns:
the value of the column

getAction

public int getAction()
Returns the action linked to this event

Returns:
one of TriggerEvent.INSERT, TriggerEvent.DELETE, TriggerEvent.UPDATE

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 Université de Versailles Saint-Quentin, XQuark Group. All rights reserved.