com.imageworks.migration

With

object With

Utility object that contains functions that ensure a resource is released once it has been used. Each function takes resource object that has a method to release the resource, such as close(), and a closure to that operates on the resource. After the closure has completed, either normally via a return or by throwing an exception, the resource is released.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. With
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def autoClosingConnection[C <: Connection, R](connection: C)(f: (C) ⇒ R): R

    Take a SQL connection, pass it to a closure and ensure that the connection is closed after the closure returns, either normally or by an exception.

    Take a SQL connection, pass it to a closure and ensure that the connection is closed after the closure returns, either normally or by an exception. If the closure returns normally, return its result.

    connection

    a SQL connection

    f

    a Function1[C <: Connection,R] that operates on the connection

    returns

    the result of f

  8. def autoClosingResultSet[RS <: ResultSet, R](resultSet: RS)(f: (RS) ⇒ R): R

    Take a SQL result set, pass it to a closure and ensure that the result set is closed after the closure returns, either normally or by an exception.

    Take a SQL result set, pass it to a closure and ensure that the result set is closed after the closure returns, either normally or by an exception. If the closure returns normally, return its result.

    resultSet

    a SQL result set

    f

    a Function1[RS <: ResultSet,R] that operates on the result set

    returns

    the result of f

  9. def autoClosingStatement[S <: Statement, R](statement: S)(f: (S) ⇒ R): R

    Take a SQL statement, pass it to a closure and ensure that the statement is closed after the closure returns, either normally or by an exception.

    Take a SQL statement, pass it to a closure and ensure that the statement is closed after the closure returns, either normally or by an exception. If the closure returns normally, return its result.

    statement

    a SQL statement

    f

    a Function1[S <: Statement,R] that operates on the statement

    returns

    the result of f

  10. def autoCommittingConnection[C <: Connection, R](connection: C, commitBehavior: CommitBehavior)(f: (C) ⇒ R): R

    Take a SQL connection, pass it to a closure and ensure that any work done on the connection after the closure returns is either left alone, committed or rolled back depending upon the given setting.

    Take a SQL connection, pass it to a closure and ensure that any work done on the connection after the closure returns is either left alone, committed or rolled back depending upon the given setting. If the closure returns normally, return its result. The connection's auto-commit mode will be set and restored.

    connection

    a SQL connection

    commitBehavior

    the operation to implement on the connection after f returns normally or via throwing an exception

    f

    a Function1[C <: Connection,R] that operates on the connection

    returns

    the result of f

  11. def autoRestoringConnection[C <: Connection, R](connection: C, mode: Boolean)(f: (C) ⇒ R): R

    Take a SQL connection, save its current auto-commit mode, put the connection into the requested auto-commit mode, pass the connection to a closure and ensure that the connection's auto-commit mode is restored after the closure returns, either normally or by an exception.

    Take a SQL connection, save its current auto-commit mode, put the connection into the requested auto-commit mode, pass the connection to a closure and ensure that the connection's auto-commit mode is restored after the closure returns, either normally or by an exception. If the closure returns normally, return its result.

    The connection's auto-commit mode is always set, even if it is the same as the requested mode. This is done to ensure any work the database would normally do when setting the auto-commit mode is always done.

    connection

    a SQL connection

    mode

    the auto-commit mode the connection's state should be put in

    f

    a Function1[C <: Connection,R] that operates on the connection

    returns

    the result of f

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def jarFile[J <: JarFile, R](jarFile: J)(f: (J) ⇒ R): R

    Take a jar file, pass it to a closure and ensure that the jar file is closed after the closure returns, either normally or by an exception.

    Take a jar file, pass it to a closure and ensure that the jar file is closed after the closure returns, either normally or by an exception. If the closure returns normally, return its result.

    jarFile

    a jar file

    f

    a Function1[J <: JarFile,R] that operates on the jar file

    returns

    the result of f

  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def resource[A, B](resource: A, closerDescription: String)(closer: (A) ⇒ Unit)(body: (A) ⇒ B): B

    Given a resource and two functions, the first, a closer function that closes or releases the resource, and the second, a body function that uses the resource, invoke the body function on the resource and then ensure that the closer function closes the resource, regardless if the body function returns normally or throws an exception.

    Given a resource and two functions, the first, a closer function that closes or releases the resource, and the second, a body function that uses the resource, invoke the body function on the resource and then ensure that the closer function closes the resource, regardless if the body function returns normally or throws an exception.

    resource

    a resource to use and then close

    closerDescription

    a textual description of what the closer does; used to log any exception thrown by closer when the body also throws an exception since in that case the closer's exception will be suppressed and not thrown to the caller

    closer

    the function that closes the resource

    body

    the function that uses the resource

    returns

    the result of invoking body on the resource

    Exceptions thrown
    any

    exception that invoking body on the resource throws

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any

Ungrouped