TriggerData
Date: 2010-07-30

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.postgresql.pljava
Interface TriggerData

All Known Implementing Classes:
  TriggerData

    public interface TriggerData

The SQL 2003 spec. does not stipulate a standard way of mapping triggers to functions. The PLJava mapping use this interface. All functions that are intended to be triggers must be public, static, return void, and take a `TriggerData` as their argument.

Method Summary
`java.lang.String[]` | `getArguments()` Returns the arguments for this trigger (as declared in the `CREATE TRIGGER` statement.
`java.lang.String` | `getName()` Returns the name of the trigger (as declared in the `CREATE TRIGGER` statement).
`java.sql.ResultSet` | `getNew()` Returns the ResultSet that represents the new row.
`java.sql.ResultSet` | `getOld()` Returns the ResultSet that represents the old row.
`java.lang.String` | `getSchemaName()` Returns the name of the schema of the table for which this trigger was created (as declared in the `CREATE TRIGGER`
`java.lang.String` | `getTableName()` Returns the name of the table for which this trigger was created (as declared in the `CREATE TRIGGER`
`boolean` | `isFiredAfter()` Returns `true` if the trigger was fired after the statement or row action that it is associated with.
`boolean` | `isFiredBefore()` Returns `true` if the trigger was fired before the statement or row action that it is associated with.
`boolean` | `isFiredByDelete()` Returns `true` if this trigger was fired by a `DELETE`.
`boolean` | `isFiredByInsert()` Returns `true` if this trigger was fired by an `INSERT`.
`boolean` | `isFiredByUpdate()` Returns `true` if this trigger was fired by an `UPDATE`.
`boolean` | `isFiredForEachRow()` Returns `true` if this trigger is fired once for each row (as opposed to once for the entire statement).
`boolean` | `isFiredForStatement()` Returns `true` if this trigger is fired once for the entire statement (as opposed to once for each row).

Method Detail

### getNew

    java.sql.ResultSet getNew()
                              throws java.sql.SQLException

  Returns the ResultSet that represents the new row. This ResultSet will be null for delete triggers and for triggers that was fired for statement.
  The returned set will be updateable and positioned on a valid row. When the trigger call returns, the trigger manager will see the changes that has been made to this row and construct a new tuple which will become the new or updated row.

  Returns:
    An updateable `ResultSet` containing one row or `null`.
  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### getOld

    java.sql.ResultSet getOld()
                              throws java.sql.SQLException

  Returns the ResultSet that represents the old row. This ResultSet will be null for insert triggers and for triggers that was fired for statement.
  The returned set will be read-only and positioned on a valid row.

  Returns:
    A read-only `ResultSet` containing one row or `null`.
  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### getArguments

    java.lang.String[] getArguments()
                                    throws java.sql.SQLException

  Returns the arguments for this trigger (as declared in the `CREATE TRIGGER` statement. If the trigger has no arguments, this method will return an array with size 0.

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### getName

    java.lang.String getName()
                             throws java.sql.SQLException

  Returns the name of the trigger (as declared in the `CREATE TRIGGER` statement).

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### getTableName

    java.lang.String getTableName()
                                  throws java.sql.SQLException

  Returns the name of the table for which this trigger was created (as declared in the `CREATE TRIGGER`
  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### getSchemaName

    java.lang.String getSchemaName()
                                   throws java.sql.SQLException

  Returns the name of the schema of the table for which this trigger was created (as declared in the `CREATE TRIGGER`
  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### isFiredAfter

    boolean isFiredAfter()
                         throws java.sql.SQLException

  Returns `true` if the trigger was fired after the statement or row action that it is associated with.

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### isFiredBefore

    boolean isFiredBefore()
                          throws java.sql.SQLException

  Returns `true` if the trigger was fired before the statement or row action that it is associated with.

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### isFiredForEachRow

    boolean isFiredForEachRow()
                              throws java.sql.SQLException

  Returns `true` if this trigger is fired once for each row (as opposed to once for the entire statement).

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### isFiredForStatement

    boolean isFiredForStatement()
                                throws java.sql.SQLException

  Returns `true` if this trigger is fired once for the entire statement (as opposed to once for each row).

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### isFiredByDelete

    boolean isFiredByDelete()
                            throws java.sql.SQLException

  Returns `true` if this trigger was fired by a `DELETE`.

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### isFiredByInsert

    boolean isFiredByInsert()
                            throws java.sql.SQLException

  Returns `true` if this trigger was fired by an `INSERT`.

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

### isFiredByUpdate

    boolean isFiredByUpdate()
                            throws java.sql.SQLException

  Returns `true` if this trigger was fired by an `UPDATE`.

  Throws:
    `java.sql.SQLException` - if the contained native buffer has gone stale.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \ Distributed under the terms shown in COPYRIGHT