public.javadoc.org.spincast.testing.core.postgres.SpincastTestingPostgres.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastTestingPostgres (org.spincast:spincast-framework 1.0.0 API)
org.spincast.testing.core.postgres
Class SpincastTestingPostgres
- java.lang.Object
-
- org.spincast.testing.core.postgres.SpincastTestingPostgres
-
- All Implemented Interfaces:
- javax.inject.Provider<SpincastDataSource>
public class SpincastTestingPostgres
extends Object
implements com.google.inject.Provider<SpincastDataSource>
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
SpincastTestingPostgres(SpincastTestingPostgresConfig spincastTestingPostgresConfig,
JdbcUtils jdbcUtils,
SpincastDataSourceFactory spincastDataSourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
void
clearDatabase()
Clears the whole database.
SpincastDataSource
get()
String
getDbConnectionString()
int
getDbMaxPoolSize()
String
getDbName()
String
getDbPassword()
int
getDbPort()
String
getDbUsername()
protected JdbcUtils
getJdbcUtils()
protected com.opentable.db.postgres.embedded.EmbeddedPostgres
getPg()
protected SpincastDataSourceFactory
getSpincastDataSourceFactory()
protected SpincastTestingPostgresConfig
getSpincastTestingPostgresConfig()
void
init()
void
stopPostgres()
Stops Postgres.
-
-
Constructor Detail
-
SpincastTestingPostgres
@Inject
public SpincastTestingPostgres(SpincastTestingPostgresConfig spincastTestingPostgresConfig,
JdbcUtils jdbcUtils,
SpincastDataSourceFactory spincastDataSourceFactory)
-
Method Detail
-
getPg
protected com.opentable.db.postgres.embedded.EmbeddedPostgres getPg()
-
getSpincastTestingPostgresConfig
protected SpincastTestingPostgresConfig getSpincastTestingPostgresConfig()
-
getJdbcUtils
protected JdbcUtils getJdbcUtils()
-
getSpincastDataSourceFactory
protected SpincastDataSourceFactory getSpincastDataSourceFactory()
-
init
@Inject
public void init()
-
get
public SpincastDataSource get()
- Specified by:
get
in interface javax.inject.Provider<SpincastDataSource>
-
getDbConnectionString
public String getDbConnectionString()
-
getDbPort
public int getDbPort()
-
getDbName
public String getDbName()
-
getDbUsername
public String getDbUsername()
-
getDbPassword
public String getDbPassword()
-
getDbMaxPoolSize
public int getDbMaxPoolSize()
-
stopPostgres
public void stopPostgres()
Stops Postgres.
-
clearDatabase
public void clearDatabase()
Clears the whole database.
Copyright © 2019. All rights reserved.