org.orbroker

Transaction

class Transaction extends Session with UpdateSession

Preferred interface for code taking part in a transaction, without exposing commit or rollback functionality.

linear super types: UpdateSession, QuerySession, Queryable, Executable, Session, AnyRef, Any
known subclasses: Transactional
    see also:
  1. Transactional

Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Transaction
  2. UpdateSession
  3. QuerySession
  4. Queryable
  5. Executable
  6. Session
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All
Impl.
  1. Concrete
  2. Abstract

Value Members

  1. def != (arg0: AnyRef) : Boolean

    attributes: final
    definition classes: AnyRef
  2. def != (arg0: Any) : Boolean

    o != arg0 is the same as !(o == (arg0)).

    o != arg0 is the same as !(o == (arg0)).

    arg0

    the object to compare against this object for dis-equality.

    returns

    false if the receiver object is equivalent to the argument; true otherwise.

    attributes: final
    definition classes: Any
  3. def ## () : Int

    attributes: final
    definition classes: AnyRef → Any
  4. def $asInstanceOf [T0] () : T0

    attributes: final
    definition classes: AnyRef
  5. def $isInstanceOf [T0] () : Boolean

    attributes: final
    definition classes: AnyRef
  6. def == (arg0: AnyRef) : Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: AnyRef
  7. def == (arg0: Any) : Boolean

    o == arg0 is the same as o.equals(arg0).

    o == arg0 is the same as o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: Any
  8. def asInstanceOf [T0] : T0

    This method is used to cast the receiver object to be of type T0.

    This method is used to cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expressionList(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

    returns

    the receiver object.

    attributes: final
    definition classes: Any
  9. def callForKeys [K] (token: Token[K], parms: (String, Any)*)(keyHandler: (K) ⇒ Unit) : Int

    definition classes: UpdateSession
  10. def callForParms [T] (token: org.orbroker.Token[_], parms: (String, Any)*)(ph: (OutParms) ⇒ T) : T

    definition classes: QuerySession
  11. def callForUpdate (token: org.orbroker.Token[_], parms: (String, Any)*) : Int

    definition classes: UpdateSession
  12. implicit def callback : ExecutionCallback

    attributes: protected implicit
    definition classes: Session
  13. def clone () : AnyRef

    This method creates and returns a copy of the receiver object.

    This method creates and returns a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    attributes: protected
    definition classes: AnyRef
  14. def commit () : Unit

    attributes: protected
    definition classes: Session
  15. def connection : Connection

    attributes: protected[orbroker] final
    definition classes: Session
  16. def eq (arg0: AnyRef) : Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] on non-null instances of AnyRef: * It is reflexive: for any non-null instance x of type AnyRef, x.eq(x) returns true. * It is symmetric: for any non-null instances x and y of type AnyRef, x.eq(y) returns true if and only if y.eq(x) returns true. * It is transitive: for any non-null instances x, y, and z of type AnyRef if x.eq(y) returns true and y.eq(z) returns true, then x.eq(z) returns true.

    Additionally, the eq method has three other properties. * It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false. * For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false. * null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    arg0

    the object to compare against this object for reference equality.

    returns

    true if the argument is a reference to the receiver object; false otherwise.

    attributes: final
    definition classes: AnyRef
  17. def equals (arg0: Any) : Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation]: * It is reflexive: for any instance x of type Any, x.equals(x) should return true. * It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true. * It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same scala.Int (o1.hashCode.equals(o2.hashCode)).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    definition classes: AnyRef → Any
  18. def evaluate (id: Symbol, e: SQLException) : Exception

    attributes: protected final
    definition classes: Session
  19. def execute (token: org.orbroker.Token[_], parms: (String, Any)*) : Int

    Execute a modifying SQL statement, such as INSERT, UPDATE, or DELETE.

    Execute a modifying SQL statement, such as INSERT, UPDATE, or DELETE.

    parms

    The parameters

    returns

    The number of rows affected

    definition classes: Executable
  20. def executeBatch (token: org.orbroker.Token[_], batchCount: Int, parms: (String, Any)*) : Int

    Execute a modifying SQL statement, such as INSERT, a specific number of times, as indicated by batchCount.

    Execute a modifying SQL statement, such as INSERT, a specific number of times, as indicated by batchCount.

    parms

    Other, optional, parameters

    returns

    The number of rows affected

    definition classes: Executable
  21. def executeBatch (token: org.orbroker.Token[_], batchValues: (String, Traversable[_]), parms: (String, Any)*) : Int

    Execute a modifying SQL statement, such as INSERT, UPDATE, DELETE, with a batch of values.

    Execute a modifying SQL statement, such as INSERT, UPDATE, DELETE, with a batch of values.

    batchValues

    The batch values

    parms

    Other, optional, parameters

    returns

    The number of rows affected

    definition classes: Executable
  22. def executeBatchForKeys [G] (token: Token[G], batchCount: Int, parms: (String, Any)*)(keyHandler: (G) ⇒ Unit) : Int

    Execute a modifying SQL statement, such as INSERT, a specific number of times, as indicated by batchCount.

    Execute a modifying SQL statement, such as INSERT, a specific number of times, as indicated by batchCount. NOTICE: This may not be supported by some JDBC drivers.

    batchCount

    The batch count

    parms

    Other, optional, parameters

    keyHandler

    The generated key callback handler

    returns

    The number of rows affected

    definition classes: Executable
  23. def executeBatchForKeys [G] (token: Token[G], batchValues: (String, Traversable[_]), parms: (String, Any)*)(keyHandler: (G) ⇒ Unit) : Int

    Execute a modifying SQL statement, such as INSERT, UPDATE, DELETE, with a batch of values, that results in generated keys.

    Execute a modifying SQL statement, such as INSERT, UPDATE, DELETE, with a batch of values, that results in generated keys. NOTICE: This may not be supported by some JDBC drivers.

    batchValues

    The batch values

    parms

    Other, optional, parameters

    keyHandler

    The generated key callback handler

    returns

    The number of rows affected

    definition classes: Executable
  24. def executeForKey [G] (token: Token[G], parms: (String, Any)*) : Option[G]

    Execute a modifying SQL statement, such as INSERT, that results in a generated key row.

    Execute a modifying SQL statement, such as INSERT, that results in a generated key row.

    parms

    The parameters

    returns

    The number of rows affected

    definition classes: Executable
  25. def executeForKeys [G] (token: Token[G], parms: (String, Any)*)(keyHandler: (G) ⇒ Unit) : Int

    definition classes: Executable
  26. var fetchSize : Int

    Fetch size in rows.

    Fetch size in rows.

    definition classes: Session
      see also:
    1. java.sql.Statement.setFetchSize(int)

  27. def finalize () : Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    The details of when and if the finalize method are invoked, as well as the interaction between finalizeand non-local returns and exceptions, are all platform dependent.

    attributes: protected
    definition classes: AnyRef
  28. def getCallStatement (token: org.orbroker.Token[_]) : CallStatement

    attributes: protected
    definition classes: Session
  29. def getClass () : java.lang.Class[_]

    Returns a representation that corresponds to the dynamic class of the receiver object.

    Returns a representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    attributes: final
    definition classes: AnyRef
  30. def getModStatement (token: org.orbroker.Token[_]) : ModifyStatement

    attributes: protected
    definition classes: Session
  31. def getStatement (token: org.orbroker.Token[_]) : SQLStatement

    attributes: protected
    definition classes: Session
  32. def hasUncommittedChanges : Boolean

    attributes: protected
    definition classes: Executable → Session
  33. def hashCode () : Int

    Returns a hash code value for the object.

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    returns

    the hash code value for the object.

    definition classes: AnyRef → Any
  34. def isInstanceOf [T0] : Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

    This method is used to test whether the dynamic type of the receiver object is T0.

    Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    attributes: final
    definition classes: Any
  35. def makeSavepoint () : Savepoint

  36. def ne (arg0: AnyRef) : Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

    o.ne(arg0) is the same as !(o.eq(arg0)).

    arg0

    the object to compare against this object for reference dis-equality.

    returns

    false if the argument is not a reference to the receiver object; true otherwise.

    attributes: final
    definition classes: AnyRef
  37. def notify () : Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    attributes: final
    definition classes: AnyRef
  38. def notifyAll () : Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    attributes: final
    definition classes: AnyRef
  39. def queryFromCall [T] (token: Token[T], cs: CallStatement, parms: Seq[(String, Any)], receiver: (T) ⇒ Boolean) : Unit

    attributes: protected
    definition classes: QuerySession → Queryable
  40. def queryFromSelect [T] (token: Token[T], qs: QueryStatement, parms: Seq[(String, Any)], receiver: (T) ⇒ Boolean) : Unit

    attributes: protected
    definition classes: Queryable
  41. val readOnly : Boolean

    attributes: protected
    definition classes: Transaction → Session
  42. def releaseSavepoint (sp: Savepoint) : Unit

  43. def rollback () : Unit

    attributes: protected
    definition classes: Session
  44. def rollbackSavepoint (sp: Savepoint) : Unit

  45. def select [T] (token: Token[T], parms: (String, Any)*)(receiver: (T) ⇒ Boolean) : Unit

    Execute query and call receiver function per result object.

    Execute query and call receiver function per result object.

    token

    SQL statement token

    parms

    Parameters for statement, if any

    receiver

    The result object receiver function, which is expected to return true to receive next object, false to stop

    definition classes: Queryable
  46. def selectAll [T] (token: Token[T], parms: (String, Any)*) : IndexedSeq[T]

    Execute query and return sequence of all results.

    Execute query and return sequence of all results.

    token

    The token of the statement to execute

    parms

    Optional SQL parameters

    returns

    The sequence of results.

    definition classes: Queryable
  47. def selectInto (token: org.orbroker.Token[_], parms: (String, Any)*) : Unit

    Execute query without calling back.

    Execute query without calling back. It is expected that theQueryExtractor handles all objects extracted.

    token

    ID of SQL statement

    parms

    Parameters for statement, if any

    definition classes: Queryable
  48. def selectOne [T] (token: Token[T], parms: (String, Any)*) : Option[T]

    Execute query that will return 0-1 rows (by id, a JOIN of course can return more rows, but only one object).

    Execute query that will return 0-1 rows (by id, a JOIN of course can return more rows, but only one object).

    parms

    Optional SQL parameters

    returns

    The selected row, or None

    definition classes: Queryable
  49. def selectTop [T] (count: Int, token: Token[T], parms: (String, Any)*) : IndexedSeq[T]

    Execute query and return the top results as defined by the count parameter.

    Execute query and return the top results as defined by the count parameter.

    count

    The top number of results to return

    token

    The token of the statement to execute

    parms

    Optional SQL parameters

    returns

    The sequence of results.

    definition classes: Queryable
  50. def synchronized [T0] (arg0: T0) : T0

    attributes: final
    definition classes: AnyRef
  51. var timeout : Int

    Timeout in seconds.

    Timeout in seconds. Will cause a TimeoutExceptionif an execution takes longer than the given time. 0 means no limit.

    definition classes: Session
      see also:
    1. java.sql.Statement#setQueryTimeout(int)

  52. def toMap (args: Iterable[Tuple2[String, _]]) : Map[String, Any]

    attributes: protected final
    definition classes: Session
  53. def toString () : String

    Returns a string representation of the object.

    Returns a string representation of the object.

    The default representation is platform dependent.

    returns

    a string representation of the object.

    definition classes: AnyRef → Any
  54. var uncommittedChanges : Boolean

    attributes: protected
    definition classes: Executable
  55. def wait () : Unit

    attributes: final
    definition classes: AnyRef
  56. def wait (arg0: Long, arg1: Int) : Unit

    attributes: final
    definition classes: AnyRef
  57. def wait (arg0: Long) : Unit

    attributes: final
    definition classes: AnyRef

Inherited from UpdateSession

Inherited from QuerySession

Inherited from Queryable

Inherited from Executable

Inherited from Session

Inherited from AnyRef

Inherited from Any