org.apithefire.sql.h2
Class H2MemoryDatabase

java.lang.Object
  extended by org.apithefire.sql.h2.H2MemoryDatabase
All Implemented Interfaces:
ConnectionProvider, Closeable

public class H2MemoryDatabase
extends java.lang.Object
implements ConnectionProvider

H2 memory database.

Author:
Chew Boon Aik
See Also:
Memory-Only Databases

Nested Class Summary
static class H2MemoryDatabase.H2MemoryDatabaseBuilder
          A H2MemoryDatabase builder.
 
Method Summary
 void close()
          Closes this database by executing a SHUTDOWN SQL statement.
 java.sql.Connection getConnection()
          Gets a new connection from this database.
static H2MemoryDatabase.H2MemoryDatabaseBuilder newBuilder()
          Returns a new H2MemoryDatabase.H2MemoryDatabaseBuilder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newBuilder

@BuilderFactory
public static H2MemoryDatabase.H2MemoryDatabaseBuilder newBuilder()
Returns a new H2MemoryDatabase.H2MemoryDatabaseBuilder.


getConnection

public java.sql.Connection getConnection()
Gets a new connection from this database.

Specified by:
getConnection in interface ConnectionProvider

close

public void close()
Closes this database by executing a SHUTDOWN SQL statement.

Specified by:
close in interface Closeable


Copyright © 2008. All Rights Reserved.