Package org.silverpeas.core.test
Class DataSetTest
- java.lang.Object
-
- org.silverpeas.core.test.DataSetTest
-
public abstract class DataSetTest extends Object
- Author:
- Yohann Chastagnier
-
-
Field Summary
Fields Modifier and Type Field Description protected static ObjectNO_INITIALIZATIONConstant the getDbSetupInitializations() should return if there is no database initialization.
-
Constructor Summary
Constructors Constructor Description DataSetTest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ConnectiongetConnection()protected abstract <T> TgetDbSetupInitializations()Gets the necessary to initialize the data into the database.
If null, then the database isn't set up with some data.DbSetupRulegetDbSetupRule()protected StringgetDbSetupTableCreationSqlScript()Gets the path of sql script that contains the creation of the tables.
-
-
-
Field Detail
-
NO_INITIALIZATION
protected static final Object NO_INITIALIZATION
Constant the getDbSetupInitializations() should return if there is no database initialization.
-
-
Method Detail
-
getDbSetupTableCreationSqlScript
protected String getDbSetupTableCreationSqlScript()
Gets the path of sql script that contains the creation of the tables.- Returns:
- a string that represents a path.
-
getDbSetupInitializations
protected abstract <T> T getDbSetupInitializations()
Gets the necessary to initialize the data into the database.
If null, then the database isn't set up with some data.- Type Parameters:
T-Operation, array ofOperation,Stringor array ofString.- Returns:
- Must return an
Operation, an array ofOperation, a dataset path or an array of dataset path (.sql or .xml), otherwise an exception is thrown during the database loading. Can be null to indicate no initialization.
-
getDbSetupRule
public DbSetupRule getDbSetupRule()
-
getConnection
protected Connection getConnection() throws SQLException
- Throws:
SQLException
-
-