Skip to content

Commit

Permalink
perf
Browse files Browse the repository at this point in the history
  • Loading branch information
rmpestano committed Sep 4, 2016
1 parent 7039cfc commit 7af2d16
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
*
* Executor id for which the properties will be setup.
* @return executor id for which the properties will be setup.
*/
String executor() default DataSetExecutorImpl.DEFAULT_EXECUTOR_ID;

Expand All @@ -34,34 +34,35 @@


/**
* configures DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES. Defaults to false.
* @return value which configures DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES. Defaults to false.
*/
boolean qualifiedTableNames() default false;

/**
*
* DatabaseConfig.FEATURE_BATCHED_STATEMENTS
* @return value which configures DatabaseConfig.FEATURE_BATCHED_STATEMENTS
*/
boolean batchedStatements() default false;

/**
* configures DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS. Defaults to false.
* @return value which configures DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS. Defaults to false.
*
*/
boolean allowEmptyFields() default false;

/**
*
* DatabaseConfig.PROPERTY_FETCH_SIZE. Defaults to 100
* @return value which configures DatabaseConfig.PROPERTY_FETCH_SIZE. Defaults to 100
*/
int fetchSize() default 100;

/**
* DatabaseConfig.PROPERTY_BATCH_SIZE. Defaults to 100
* @return value which configures DatabaseConfig.PROPERTY_BATCH_SIZE. Defaults to 100
*/
int batchSize() default 100;

/**
* DatabaseConfig.PROPERTY_ESCAPE_PATTERN. Defaults to none
* @return value which configures DatabaseConfig.PROPERTY_ESCAPE_PATTERN. Defaults to none
*/
String escapePattern() default "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface DataSetExecutor{

/**
* creates a dataset into executor's database connection using given dataSetConfig
* @param dataSetConfig
* @param dataSetConfig dataset configuration
*/
void createDataSet(DataSetConfig dataSetConfig);

Expand All @@ -36,7 +36,7 @@ public interface DataSetExecutor{

/**
* compares dataset from executor's databse connection with a given dataset
* @param expected
* @param expected configuration
* @throws DatabaseUnitException if current dataset is not equal current dataset
*/
void compareCurrentDataSetWith(DataSetConfig expected, String[] ignoreCols) throws DatabaseUnitException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public class DataSetAssert extends DbUnitAssert {

/**
* Same as DBUnitAssert with support for regex in row values
* @param expectedTable
* @param actualTable
* @param comparisonCols
* @param failureHandler
* @param expectedTable expected table
* @param actualTable current table
* @param comparisonCols columnName
* @param failureHandler handler
* @throws DataSetException
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ public DataSetConfig executeScriptsAfter(String[] executeScriptsAfter) {
}

/**
* name of dataset executor for the given dataset. If not specified the default one will be used.
*
* @param executorId name of dataset executor for the given dataset. If not specified the default one will be used.
*
* Use this option to work with multple database conncetions. Remember that each executor has its own connection.
* @return DataSetConfig with executor name configured
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Created by pestano on 03/09/16.
* <p/>
*
* pojo which represents dbunit.yml, used for global which can be overrided via @DataSet annotation
* at class or method level and with @DBUnit at class or method level
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ public static synchronized EntityManagerProvider instance(String unitName) {


/**
*
* @param unitName unit name
* clear entities on underlying context
* @return
*/
public static synchronized EntityManagerProvider newInstance(String unitName) {
instance = new EntityManagerProvider();
Expand Down Expand Up @@ -97,7 +96,7 @@ private void init(String unitName) {

/**
*
* @param puName
* @param puName unit name
* @return jdbc connection of provider instance represented by given puName
*/
public Connection connection(String puName) {
Expand All @@ -115,7 +114,7 @@ public Connection connection() {

/**
*
* @param puName
* @param puName unit name
* @return entityManager represented by given puName
*/
public static EntityManager em(String puName) {
Expand All @@ -132,7 +131,7 @@ public static EntityManager em() {
}

/**
* @param puName
* @param puName unit name
* clears entityManager (represented by given puName) persistence context
* @return provider represented by puName
*/
Expand All @@ -151,7 +150,7 @@ public static EntityManagerProvider clear(){
}

/**
* @param puName
* @param puName unit name
* @return transaction of entityManager represented by given puName
*/
public static EntityTransaction tx(String puName) {
Expand Down

0 comments on commit 7af2d16

Please sign in to comment.