net.sf.farrago.db
Class FarragoDbSessionInfo

java.lang.Object
  extended by net.sf.farrago.db.FarragoDbSessionInfo
All Implemented Interfaces:
FarragoSessionInfo

public class FarragoDbSessionInfo
extends Object
implements FarragoSessionInfo

Implements the FarragoSessionInfo interface in the context of a FarragoDbSession.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/db/FarragoDbSessionInfo.java#8 $
Author:
Jason Ouellette

Field Summary
private  FarragoDatabase database
           
private  long id
           
private  FarragoSession session
           
private  Map<Long,FarragoSessionExecutingStmtInfo> statements
           
 
Constructor Summary
FarragoDbSessionInfo(FarragoSession session, FarragoDatabase database)
           
 
Method Summary
 void addExecutingStmtInfo(FarragoSessionExecutingStmtInfo info)
          Adds a running statement.
(package private)  FarragoDatabase getDatabase()
           
 List<Long> getExecutingStmtIds()
          Returns a list of identifiers of currently running statements.
 FarragoSessionExecutingStmtInfo getExecutingStmtInfo(Long id)
          Given a statement identifier, return an object containing its details.
 long getId()
          Returns unique identifier for this session.
 FarragoSession getSession()
           
 void removeExecutingStmtInfo(long id)
          Removes a running statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private long id

session

private FarragoSession session

database

private FarragoDatabase database

statements

private Map<Long,FarragoSessionExecutingStmtInfo> statements
Constructor Detail

FarragoDbSessionInfo

FarragoDbSessionInfo(FarragoSession session,
                     FarragoDatabase database)
Method Detail

getSession

public FarragoSession getSession()
Specified by:
getSession in interface FarragoSessionInfo
Returns:
the session itself.

getDatabase

FarragoDatabase getDatabase()

getId

public long getId()
Description copied from interface: FarragoSessionInfo
Returns unique identifier for this session.

Specified by:
getId in interface FarragoSessionInfo
Returns:
unique session identifier

getExecutingStmtIds

public List<Long> getExecutingStmtIds()
Description copied from interface: FarragoSessionInfo
Returns a list of identifiers of currently running statements.

Specified by:
getExecutingStmtIds in interface FarragoSessionInfo
Returns:
List of unique statement identifiers

getExecutingStmtInfo

public FarragoSessionExecutingStmtInfo getExecutingStmtInfo(Long id)
Description copied from interface: FarragoSessionInfo
Given a statement identifier, return an object containing its details.

Specified by:
getExecutingStmtInfo in interface FarragoSessionInfo
Parameters:
id - Unique identifier of a statement
Returns:
FarragoSessionExecutingStmtInfo containing statement details

addExecutingStmtInfo

public void addExecutingStmtInfo(FarragoSessionExecutingStmtInfo info)
Adds a running statement.

Parameters:
info - Info object for the running statement

removeExecutingStmtInfo

public void removeExecutingStmtInfo(long id)
Removes a running statement.

Parameters:
id - Unique identifier of a running statement