Package org.apache.derby.iapi.db

Examples of org.apache.derby.iapi.db.TriggerExecutionContext


   *
   * @exception SQLException thrown if no trigger active
   */
  public TriggerNewTransitionRows() throws SQLException
  {
    TriggerExecutionContext tec = Factory.getTriggerExecutionContext();
    if (tec == null)
    {
      throw new SQLException("There are no active triggers", "38000");
    }
    resultSet = tec.getNewRowSet();

    if (resultSet == null)
    {
      throw new SQLException("There is no new transition rows result set for this trigger", "38000");
    }
View Full Code Here


   *
   * @exception SQLException thrown if no trigger active
   */
  public TriggerOldTransitionRows() throws SQLException
  {
    TriggerExecutionContext tec = Factory.getTriggerExecutionContext();
    if (tec == null)
    {
      throw new SQLException("There are no active triggers", "38000");
    }
    resultSet = tec.getOldRowSet();

    if (resultSet == null)
    {
      throw new SQLException("There is no old transition rows result set for this trigger", "38000");
    }
View Full Code Here

   *
   * @exception SQLException thrown if no trigger active
   */
  public TriggerOldTransitionRows() throws SQLException
  {
    TriggerExecutionContext tec = Factory.getTriggerExecutionContext();
    if (tec == null)
    {
      throw new SQLException("There are no active triggers", "38000");
    }
    resultSet = tec.getOldRowSet();

    if (resultSet == null)
    {
      throw new SQLException("There is no old transition rows result set for this trigger", "38000");
    }
View Full Code Here

   *
   * @exception SQLException thrown if no trigger active
   */
  public TriggerNewTransitionRows() throws SQLException
  {
    TriggerExecutionContext tec = Factory.getTriggerExecutionContext();
    if (tec == null)
    {
      throw new SQLException("There are no active triggers", "38000");
    }
    resultSet = tec.getNewRowSet();

    if (resultSet == null)
    {
      throw new SQLException("There is no new transition rows result set for this trigger", "38000");
    }
View Full Code Here

  private ResultSet initializeResultSet() throws SQLException {
    if (resultSet != null)
      resultSet.close();
   
    TriggerExecutionContext tec = Factory.getTriggerExecutionContext();
    if (tec == null)
    {
      throw new SQLException("There are no active triggers", "38000");
    }
    resultSet = tec.getNewRowSet();

    if (resultSet == null)
    {
      throw new SQLException("There is no new transition rows result set for this trigger", "38000");
    }
View Full Code Here

        int size = triggerExecutionContexts.size();
        //      System.out.println(" searching for " + aiKey);
        for (int i = size - 1; i >= 0; i--)
        {
            // first loop through triggers.
            TriggerExecutionContext itec = triggerExecutionContexts.get(i);
            Long value = itec.getAutoincrementValue(aiKey);
            if (value == null)
                continue;

            return value;
        }
View Full Code Here

        return "";
    }

    public static String triggerFires(String string) throws Throwable
    {
        final TriggerExecutionContext tec =
                Factory.getTriggerExecutionContext();
        out.println(
            "TRIGGER: " + "<" + string + "> on statement " +
            tec.getEventStatementText());
        printTriggerChanges();
        return "";
    }
View Full Code Here

        return "";
    }

    private static void printTriggerChanges() throws Throwable
    {
        final TriggerExecutionContext tec =
                Factory.getTriggerExecutionContext();
        out.println("BEFORE RESULT SET");
        BaseJDBCTestCase.dumpRs(tec.getOldRowSet(), out);
        out.println("\nAFTER RESULT SET");
        BaseJDBCTestCase.dumpRs(tec.getNewRowSet(), out);
    }  
View Full Code Here

   *
   * @exception SQLException thrown if no trigger active
   */
  public TriggerOldTransitionRows() throws SQLException
  {
    TriggerExecutionContext tec = Factory.getTriggerExecutionContext();
    if (tec == null)
    {
      throw new SQLException("There are no active triggers", "38000");
    }
    resultSet = tec.getOldRowSet();

    if (resultSet == null)
    {
      throw new SQLException("There is no old transition rows result set for this trigger", "38000");
    }
View Full Code Here

   *
   * @exception SQLException thrown if no trigger active
   */
  public TriggerNewTransitionRows() throws SQLException
  {
    TriggerExecutionContext tec = Factory.getTriggerExecutionContext();
    if (tec == null)
    {
      throw new SQLException("There are no active triggers", "38000");
    }
    resultSet = tec.getNewRowSet();

    if (resultSet == null)
    {
      throw new SQLException("There is no new transition rows result set for this trigger", "38000");
    }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.db.TriggerExecutionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.