Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.tools.development.testing
Class LocalRdbmsServiceTestConfig

    java.lang.Object
      com.google.appengine.tools.development.testing.LocalRdbmsServiceTestConfig

All Implemented Interfaces:
  LocalServiceTestConfig

    public class LocalRdbmsServiceTestConfig

extends java.lang.Object
implements LocalServiceTestConfig

Config for accessing the local RDBMS service in tests. Default behavior is to configure the local service to use an in-memory database. `tearDown()` does not wipe out data or tables.

Constructor Summary
`LocalRdbmsServiceTestConfig()`

Method Summary
`java.lang.String` | `getDriverClass()`
`java.lang.String` | `getJdbcConnectionStringFormat()`
`static LocalRdbmsService` | `getLocalRdbmsService()`
`LocalRdbmsServiceTestConfig` | `setDriverClass(java.lang.String driverClass)` Sets the class of the driver used by the `com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver` and attempts to load `driverClass` in the current `ClassLoader`.
`LocalRdbmsServiceTestConfig` | `setExtraDriverProperties(java.util.Map<java.lang.String,java.lang.String> props)` Sets Extra properties to be passed to the underlying `local` JDBC driver or the RPC class for the `remote` connection.
`LocalRdbmsServiceTestConfig` | `setJdbcConnectionStringFormat(java.lang.String jdbcConnectionStringFormat)` Sets the format of the connection string that the jdbc driver will use.
`LocalRdbmsServiceTestConfig` | `setRemoteClientFactory(java.lang.Class<? extends SqlClientFactory> remoteClientFactory)` Sets the remote client factory class.
`LocalRdbmsServiceTestConfig` | `setServerType(LocalRdbmsService.ServerType serverType)` Sets the server type to either `hosted` or `local`.
`void` | `setUp()` Set up the local service.
`void` | `tearDown()` Tear down the local service.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocalRdbmsServiceTestConfig

    public LocalRdbmsServiceTestConfig()

Method Detail

### setUp

    public void setUp()

  Description copied from interface: `LocalServiceTestConfig`
  Set up the local service.

  Specified by:
    `setUp` in interface `LocalServiceTestConfig`

### tearDown

    public void tearDown()

  Description copied from interface: `LocalServiceTestConfig`
  Tear down the local service.

  Specified by:
    `tearDown` in interface `LocalServiceTestConfig`

### getLocalRdbmsService

    public static LocalRdbmsService getLocalRdbmsService()

### getDriverClass

    public java.lang.String getDriverClass()

  Returns:
    The driver class.

### setDriverClass

    public LocalRdbmsServiceTestConfig setDriverClass(java.lang.String driverClass)

  Sets the class of the driver used by the `com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver` and attempts to load `driverClass` in the current `ClassLoader`.

  Parameters:
    `driverClass` - The driver class. Must be the fully-qualified name of a class that implements `java.sql.Driver`.
  Returns:
    `this` (for chaining)
  Throws:
    `java.lang.RuntimeException` - wrapping any exceptions loading driverClass.

### getJdbcConnectionStringFormat

    public java.lang.String getJdbcConnectionStringFormat()

  Returns:
    The JDBC connection string format

### setJdbcConnectionStringFormat

    public LocalRdbmsServiceTestConfig setJdbcConnectionStringFormat(java.lang.String jdbcConnectionStringFormat)

  Sets the format of the connection string that the jdbc driver will use.

  Parameters:
    `jdbcConnectionStringFormat` - the connection string format
  Returns:
    `this` (for chaining)

### setServerType

    public LocalRdbmsServiceTestConfig setServerType(LocalRdbmsService.ServerType serverType)

  Sets the server type to either `hosted` or `local`.

  - `local` connections proxy the SQL Service wire format to a local database using JDBC.
  - `remote` connections talk over a `SpeckleRpc` to a hosted development mode Speckle instance.

  Parameters:
    `serverType` - hosted or local
  Returns:
    `this` (for chaining)
  Throws:
    `java.lang.IllegalArgumentException` - if serverType is not "hosted" or "local"

### setExtraDriverProperties

    public LocalRdbmsServiceTestConfig setExtraDriverProperties(java.util.Map<java.lang.String,java.lang.String> props)

  Sets Extra properties to be passed to the underlying `local` JDBC driver or the RPC class for the `remote` connection.

  Parameters:
    `props` - the extra driver properties.
  Returns:
    `this` (for chaining)

### setRemoteClientFactory

    public LocalRdbmsServiceTestConfig setRemoteClientFactory(java.lang.Class<? extends SqlClientFactory> remoteClientFactory)

  Sets the remote client factory class.

  Parameters:
    `remoteClientFactory` - the SpeckleClientFactory implementation.
  Returns:
    `this` (for chaining)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD