Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.mom
Class LongRunningStatementHandle

java.lang.Object
  extended by oracle.jbo.mom.LongRunningStatementHandle

public class LongRunningStatementHandle
extends java.lang.Object

This class represents a handle to the cancellable SQL statements. Instances of this class are used to track long running statements and cancel them when they run too long or by user discretion.

Since:
JDeveloper 10.1.3

Field Summary
static int CANCELLED
           
static java.lang.Class CLASS_INSTANCE
           
static int COMPLETED
           
static int RUNNING
           
 
Constructor Summary
LongRunningStatementHandle(long expiresAt, Statement stmt)
          Creates a new LongRunningStatementHandle instance.
 
Method Summary
 boolean cancel()
          This method could be invoked by the LongRunningStatementMonitor when the statement expires or from another thread when the user wants to cancel the statement.
 long getExpiryTime()
          Returns the timestamp at which the statement expires
 int getState()
          Returns the current state of the statement
 void setState(int newState)
          Change the statement's state
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE

COMPLETED

public static final int COMPLETED
See Also:
Constant Field Values

RUNNING

public static final int RUNNING
See Also:
Constant Field Values

CANCELLED

public static final int CANCELLED
See Also:
Constant Field Values
Constructor Detail

LongRunningStatementHandle

public LongRunningStatementHandle(long expiresAt,
                                  Statement stmt)
Creates a new LongRunningStatementHandle instance.

Parameters:
expiresAt - the timestamp at which this statement expires
stmt - the JDBC Statement handle
Method Detail

setState

public void setState(int newState)
Change the statement's state

Parameters:
newState - valid values are COMPLETED, RUNNING or CANCELLED

getState

public int getState()
Returns the current state of the statement

Returns:
one of the possible states of COMPLETED, RUNNING or CANCELLED

getExpiryTime

public long getExpiryTime()
Returns the timestamp at which the statement expires

Returns:
a long timestamp value

cancel

public boolean cancel()
This method could be invoked by the LongRunningStatementMonitor when the statement expires or from another thread when the user wants to cancel the statement.

Returns:
true if cancel succeeds, false otherwise

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.