Agentflow
V3.1

pe.pase
Class SessionConnection

java.lang.Object
  extended by pe.pase.SessionConnection
All Implemented Interfaces:
java.io.Serializable

public class SessionConnection
extends java.lang.Object
implements java.io.Serializable

Session connection provides objects to access database.

Version:
1.1.5,
Author:
lchuang
See Also:
Serialized Form

Field Summary
protected  DBService dBService
           
protected  int m_sequence
           
protected  java.lang.String m_session
           
 
Constructor Summary
SessionConnection(DBService service, java.lang.String session, int sequence)
          Constructor.
 
Method Summary
 void close()
          Close the connection
 void commit()
          Make commit on the connection
 java.util.HashMap getConfig()
          Get the configuration of SessionConnection
 int getSequence()
           
 java.lang.String getSessionId()
           
 java.util.Vector loadValue(java.lang.String sqlcmd)
          Invoke the connection to load value
 void rollback()
          Make rollback on the connection
 void setDBService(DBService dBService)
           
 boolean updateValue(java.lang.String sqlcmd)
          Invoke the connection to update value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dBService

protected transient DBService dBService

m_sequence

protected int m_sequence

m_session

protected java.lang.String m_session
Constructor Detail

SessionConnection

public SessionConnection(DBService service,
                         java.lang.String session,
                         int sequence)
Constructor. Construct a instance of SessionConnection with the specified parameters.

Parameters:
service - the given remote DBService
session - the given session key
sequence - the given data source sequence
Since:
version 1.1.0
Method Detail

close

public void close()
           throws java.lang.Exception
Close the connection

Throws:
java.lang.Exception - exception occurs if server can not close session connection
Since:
version 1.1.0

commit

public void commit()
            throws java.lang.Exception
Make commit on the connection

Throws:
java.lang.Exception
Since:
version 1.1.0

getConfig

public java.util.HashMap getConfig()
                            throws java.lang.Exception
Get the configuration of SessionConnection

Throws:
java.lang.Exception - exception occurs if the server can not get the config of the session connection
Since:
version 1.1.5

getSequence

public int getSequence()
Returns:
the m_sequence

getSessionId

public java.lang.String getSessionId()
Returns:
the m_session.

loadValue

public java.util.Vector loadValue(java.lang.String sqlcmd)
                           throws java.lang.Exception
Invoke the connection to load value

Parameters:
sqlcmd - the given sql command
Returns:
the result (element in the Vector is instance of ResultTable)
Throws:
java.lang.Exception - exception occurs if the server can not load value with session connection
Since:
version 1.1.0
See Also:
ResultTable

rollback

public void rollback()
Make rollback on the connection

Since:
version 1.1.0

setDBService

public void setDBService(DBService dBService)

updateValue

public boolean updateValue(java.lang.String sqlcmd)
                    throws java.lang.Exception
Invoke the connection to update value

Parameters:
sqlcmd - the given sql command
Returns:
true if the update is success; false otherwise
Throws:
java.lang.Exception - exception occurs if the server can not update value with session connection
Since:
version 1.1.0

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.