提交 e783211f 编写于 作者: K Keith Donald

polish

上级 ec463a32
...@@ -27,6 +27,7 @@ public interface EmbeddedDatabase extends DataSource { ...@@ -27,6 +27,7 @@ public interface EmbeddedDatabase extends DataSource {
/** /**
* Shutdown this embedded database. * Shutdown this embedded database.
* TODO - annotate with @PreDestroy for invocation by Spring container?
*/ */
void shutdown(); void shutdown();
} }
...@@ -25,7 +25,7 @@ import org.springframework.core.io.ResourceLoader; ...@@ -25,7 +25,7 @@ import org.springframework.core.io.ResourceLoader;
* Usage example: * Usage example:
* <pre> * <pre>
* EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder(); * EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
* EmbeddedDatabase db = builder.schema("schema.sql").testData("test-data.sql").build(); * EmbeddedDatabase db = builder.script("schema.sql").script("test-data.sql").build();
* db.shutdown(); * db.shutdown();
* </pre> * </pre>
* @author Keith Donald * @author Keith Donald
...@@ -48,7 +48,7 @@ public class EmbeddedDatabaseBuilder { ...@@ -48,7 +48,7 @@ public class EmbeddedDatabaseBuilder {
/** /**
* Sets the name of the embedded database * Sets the name of the embedded database
* Defaults to 'testdb' if not called. * Defaults to 'testdb' if not called.
* @param databaseType the embedded database type * @param databaseName the database name
* @return this, for fluent call chaining * @return this, for fluent call chaining
*/ */
public EmbeddedDatabaseBuilder name(String databaseName) { public EmbeddedDatabaseBuilder name(String databaseName) {
...@@ -59,7 +59,7 @@ public class EmbeddedDatabaseBuilder { ...@@ -59,7 +59,7 @@ public class EmbeddedDatabaseBuilder {
/** /**
* Sets the type of embedded database. * Sets the type of embedded database.
* Defaults to HSQL if not called. * Defaults to HSQL if not called.
* @param databaseType the embedded database type * @param databaseType the database type
* @return this, for fluent call chaining * @return this, for fluent call chaining
*/ */
public EmbeddedDatabaseBuilder type(EmbeddedDatabaseType databaseType) { public EmbeddedDatabaseBuilder type(EmbeddedDatabaseType databaseType) {
...@@ -86,7 +86,7 @@ public class EmbeddedDatabaseBuilder { ...@@ -86,7 +86,7 @@ public class EmbeddedDatabaseBuilder {
} }
/** /**
* Factory method that creates a embedded database builder that loads resources relative to the provided class. * Factory method that creates a EmbeddedDatabaseBuilder that loads SQL resources relative to the provided class.
* @param clazz the class to load relative to * @param clazz the class to load relative to
* @return the embedded database builder * @return the embedded database builder
*/ */
...@@ -105,7 +105,7 @@ public class EmbeddedDatabaseBuilder { ...@@ -105,7 +105,7 @@ public class EmbeddedDatabaseBuilder {
/** /**
* Factory method that builds a default EmbeddedDatabase instance. * Factory method that builds a default EmbeddedDatabase instance.
* The default is HSQL with a schema created from classpath:schema.sql and test-data loaded from classpath:test-data.sql. * The default instance is HSQL with a schema created from classpath:schema.sql and test-data loaded from classpath:test-data.sql.
* @return an embedded database * @return an embedded database
*/ */
public static EmbeddedDatabase buildDefault() { public static EmbeddedDatabase buildDefault() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册