B C D E F G H I L N O P S T U V W

B

bind(PreparedStatement, int, Object) - Method in interface com.ninja_squad.dbsetup.bind.Binder
Binds the given value to the given parameter in the given prepared statement.
Binder - Interface in com.ninja_squad.dbsetup.bind
An object which binds a value to a prepared statement parameter.
BinderConfiguration - Interface in com.ninja_squad.dbsetup.bind
An object which returns the appropriate Binder based on the metadata of the prepared statement.
Binders - Class in com.ninja_squad.dbsetup.bind
Utility class allowing to get various kinds of binders.
build() - Method in class com.ninja_squad.dbsetup.operation.Insert.Builder
Builds the Insert operation.

C

checkArgument(boolean, String) - Static method in class com.ninja_squad.dbsetup.util.Preconditions
Throws an IllegalARgumentException with the given message if the given condition is false.
checkNotNull(Object, String) - Static method in class com.ninja_squad.dbsetup.util.Preconditions
Throws a NullPointerException with the given message if the given argument is null.
checkState(boolean, String) - Static method in class com.ninja_squad.dbsetup.util.Preconditions
Throws an IllegalStateException with the given message if the given condition is false.
columns(String...) - Method in class com.ninja_squad.dbsetup.operation.Insert.Builder
Specifies the list of columns into which values wil be inserted.
com.ninja_squad.dbsetup - package com.ninja_squad.dbsetup
 
com.ninja_squad.dbsetup.bind - package com.ninja_squad.dbsetup.bind
 
com.ninja_squad.dbsetup.destination - package com.ninja_squad.dbsetup.destination
 
com.ninja_squad.dbsetup.generator - package com.ninja_squad.dbsetup.generator
 
com.ninja_squad.dbsetup.operation - package com.ninja_squad.dbsetup.operation
 
com.ninja_squad.dbsetup.util - package com.ninja_squad.dbsetup.util
 
CompositeOperation - Class in com.ninja_squad.dbsetup.operation
A composite operation or, in other words, an operation which consists in executing a sequence of other operations.
constant(T) - Static method in class com.ninja_squad.dbsetup.generator.ValueGenerators
Returns a value generator which always returns the same, given value.

D

DataSourceDestination - Class in com.ninja_squad.dbsetup.destination
A destination which wraps a DataSource and gets its connection from the wrapped DataSource
DataSourceDestination(DataSource) - Constructor for class com.ninja_squad.dbsetup.destination.DataSourceDestination
Constructor
dateBinder() - Static method in class com.ninja_squad.dbsetup.bind.Binders
Returns a binder suitable for columns of type DATE.
dateSequence() - Static method in class com.ninja_squad.dbsetup.generator.ValueGenerators
Returns a value generator that returns a sequence of dates, starting at a given date and incremented by a given time, specified as an increment and a calendar field.
DateSequenceValueGenerator - Class in com.ninja_squad.dbsetup.generator
A ValueGenerator that returns a sequence of dates, starting at a given date and incremented by a given time, specified as an increment and a calendar field.
DateSequenceValueGenerator.CalendarField - Enum in com.ninja_squad.dbsetup.generator
The available units for the increment of this sequence
DbSetup - Class in com.ninja_squad.dbsetup
Allows executing a sequence of database operations.
DbSetup(Destination, Operation) - Constructor for class com.ninja_squad.dbsetup.DbSetup
Constructor which uses the default binder configuration.
DbSetup(Destination, Operation, BinderConfiguration) - Constructor for class com.ninja_squad.dbsetup.DbSetup
Constructor allowing to use a custom BinderConfiguration.
DbSetupRuntimeException - Exception in com.ninja_squad.dbsetup
A runtime exception indicating that a DbSetup failed.
DbSetupRuntimeException() - Constructor for exception com.ninja_squad.dbsetup.DbSetupRuntimeException
 
DbSetupRuntimeException(String, Throwable) - Constructor for exception com.ninja_squad.dbsetup.DbSetupRuntimeException
 
DbSetupRuntimeException(String) - Constructor for exception com.ninja_squad.dbsetup.DbSetupRuntimeException
 
DbSetupRuntimeException(Throwable) - Constructor for exception com.ninja_squad.dbsetup.DbSetupRuntimeException
 
DbSetupTracker - Class in com.ninja_squad.dbsetup
This class allows speeding up test execution, by avoiding re-executing the same sequence of database operations before each test method even if each of these test methods leaves the database as it is (and only performs read-only operations, which is the most frequent case).
DbSetupTracker() - Constructor for class com.ninja_squad.dbsetup.DbSetupTracker
 
decimalBinder() - Static method in class com.ninja_squad.dbsetup.bind.Binders
Returns a binder suitable for numeric, decimal columns.
defaultBinder() - Static method in class com.ninja_squad.dbsetup.bind.Binders
Returns the default binder, which uses stmt.setObject() to bind the parameter.
DefaultBinderConfiguration - Class in com.ninja_squad.dbsetup.bind
Default implementation of BinderConfiguration, used by default by DbSetup.
DefaultBinderConfiguration() - Constructor for class com.ninja_squad.dbsetup.bind.DefaultBinderConfiguration
Constructor.
DeleteAll - Class in com.ninja_squad.dbsetup.operation
An operation which deletes everything from a given database table.
deleteAllFrom(String) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a delete from table operation.
deleteAllFrom(String...) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of delete from table operations.
deleteAllFrom(List<String>) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of delete from ...
Destination - Interface in com.ninja_squad.dbsetup.destination
The destination of a database setup.
DriverManagerDestination - Class in com.ninja_squad.dbsetup.destination
A destination which uses the DriverManager to get a connection
DriverManagerDestination(String, String, String) - Constructor for class com.ninja_squad.dbsetup.destination.DriverManagerDestination
Constructor

E

equals(Object) - Method in class com.ninja_squad.dbsetup.DbSetup
 
equals(Object) - Method in class com.ninja_squad.dbsetup.destination.DataSourceDestination
 
equals(Object) - Method in class com.ninja_squad.dbsetup.destination.DriverManagerDestination
 
equals(Object) - Method in class com.ninja_squad.dbsetup.operation.CompositeOperation
 
equals(Object) - Method in class com.ninja_squad.dbsetup.operation.DeleteAll
 
equals(Object) - Method in class com.ninja_squad.dbsetup.operation.Insert
 
equals(Object) - Method in class com.ninja_squad.dbsetup.operation.SqlOperation
 
equals(Object) - Method in class com.ninja_squad.dbsetup.operation.Truncate
 
execute(Connection, BinderConfiguration) - Method in class com.ninja_squad.dbsetup.operation.CompositeOperation
Executes the sequence of operations
execute(Connection, BinderConfiguration) - Method in class com.ninja_squad.dbsetup.operation.DeleteAll
 
execute(Connection, BinderConfiguration) - Method in class com.ninja_squad.dbsetup.operation.Insert
Inserts the values and generated values in the table.
execute(Connection, BinderConfiguration) - Method in interface com.ninja_squad.dbsetup.operation.Operation
Executes the operation
execute(Connection, BinderConfiguration) - Method in class com.ninja_squad.dbsetup.operation.SqlOperation
 
execute(Connection, BinderConfiguration) - Method in class com.ninja_squad.dbsetup.operation.Truncate
 

F

from(String) - Static method in class com.ninja_squad.dbsetup.operation.DeleteAll
Returns an operation which deletes all the rows from the given table.
from(String...) - Static method in class com.ninja_squad.dbsetup.operation.DeleteAll
Returns a composite operation which deletes all the rows from the given tables, in the same order as the tables.
from(List<String>) - Static method in class com.ninja_squad.dbsetup.operation.DeleteAll
Returns a composite operation which deletes all the rows from the given tables, in the same order as the tables.

G

getBinder(ParameterMetaData, int) - Method in interface com.ninja_squad.dbsetup.bind.BinderConfiguration
Returns the appropriate Binder for the given parameter, based on the given metadata.
getBinder(ParameterMetaData, int) - Method in class com.ninja_squad.dbsetup.bind.DefaultBinderConfiguration
Uses the parameter type of the given parameter and returns the following Binders depending on the type got from the metadata.
getConnection() - Method in class com.ninja_squad.dbsetup.destination.DataSourceDestination
 
getConnection() - Method in interface com.ninja_squad.dbsetup.destination.Destination
Returns a connection to the destination database
getConnection() - Method in class com.ninja_squad.dbsetup.destination.DriverManagerDestination
 

H

hashCode() - Method in class com.ninja_squad.dbsetup.DbSetup
 
hashCode() - Method in class com.ninja_squad.dbsetup.destination.DataSourceDestination
 
hashCode() - Method in class com.ninja_squad.dbsetup.destination.DriverManagerDestination
 
hashCode() - Method in class com.ninja_squad.dbsetup.operation.CompositeOperation
 
hashCode() - Method in class com.ninja_squad.dbsetup.operation.DeleteAll
 
hashCode() - Method in class com.ninja_squad.dbsetup.operation.Insert
 
hashCode() - Method in class com.ninja_squad.dbsetup.operation.SqlOperation
 
hashCode() - Method in class com.ninja_squad.dbsetup.operation.Truncate
 

I

incrementingBy(int, DateSequenceValueGenerator.CalendarField) - Method in class com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
Increments the date by the given increment of the given unit.
incrementingBy(int) - Method in class com.ninja_squad.dbsetup.generator.SequenceValueGenerator
Increments the value by the given increment.
incrementingBy(int) - Method in class com.ninja_squad.dbsetup.generator.StringSequenceValueGenerator
Increments the number by the given increment.
Insert - Class in com.ninja_squad.dbsetup.operation
Operation which inserts one or several rows into a table.
Insert.Builder - Class in com.ninja_squad.dbsetup.operation
A builder used to create an Insert operation.
insertInto(String) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a builder for a sequence of insert operations.
INSTANCE - Static variable in class com.ninja_squad.dbsetup.bind.DefaultBinderConfiguration
A shareable, reusable instance of this class.
integerBinder() - Static method in class com.ninja_squad.dbsetup.bind.Binders
Returns a binder suitable for numeric, integer columns.
into(String) - Static method in class com.ninja_squad.dbsetup.operation.Insert
Creates a new Builder instance, in order to build an Insert operation into the given table

L

launch() - Method in class com.ninja_squad.dbsetup.DbSetup
Executes the sequence of operations.
launchIfNecessary(DbSetup) - Method in class com.ninja_squad.dbsetup.DbSetupTracker
Executes the given DbSetup unless all the following conditions are true: DbSetupTracker.skipNextLaunch() has been called since the last call to this method; the given dbSetup is equal to the last DbSetup launched by this method This method resets the skipNextLaunch flag to false.

N

nextValue() - Method in class com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
 
nextValue() - Method in class com.ninja_squad.dbsetup.generator.SequenceValueGenerator
 
nextValue() - Method in class com.ninja_squad.dbsetup.generator.StringSequenceValueGenerator
 
nextValue() - Method in interface com.ninja_squad.dbsetup.generator.ValueGenerator
Called each time a new row is inserted, to get the value to insert in the column using this value generator.

O

of(String) - Static method in class com.ninja_squad.dbsetup.operation.SqlOperation
Creates a SqlOperation for the given SQL statement
of(String...) - Static method in class com.ninja_squad.dbsetup.operation.SqlOperation
Creates a sequence of SqlOperation for the given SQL statements.
of(List<String>) - Static method in class com.ninja_squad.dbsetup.operation.SqlOperation
Creates a sequence of SqlOperation for the given SQL statements.
Operation - Interface in com.ninja_squad.dbsetup.operation
An operation that the database setup executes.
Operations - Class in com.ninja_squad.dbsetup
A static factory class for operations.

P

Preconditions - Class in com.ninja_squad.dbsetup.util
Utility class to help verifying preconditions

S

sequence() - Static method in class com.ninja_squad.dbsetup.generator.ValueGenerators
Returns a value generator which generates a sequence of long values starting with 1, with an increment of 1.
sequenceOf(Operation...) - Static method in class com.ninja_squad.dbsetup.operation.CompositeOperation
Creates a new Operation containing all the given operations
sequenceOf(List<? extends Operation>) - Static method in class com.ninja_squad.dbsetup.operation.CompositeOperation
Creates a new Operation containing all the given operations
sequenceOf(Operation...) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of operations.
sequenceOf(List<? extends Operation>) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of operations.
SequenceValueGenerator - Class in com.ninja_squad.dbsetup.generator
A ValueGenerator which generates a sequence of long values.
skipNextLaunch() - Method in class com.ninja_squad.dbsetup.DbSetupTracker
Marks the current test method as read-only, and thus the need for the next test method to re-execute the same sequence of database setup operations.
sql(String) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a SQL operation.
sql(String...) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of SQL operations.
sql(List<String>) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of SQL operations.
SqlOperation - Class in com.ninja_squad.dbsetup.operation
An operation which simply executes a SQL statement (using Statement.executeUpdate(String)).
startingAt(Date, TimeZone) - Method in class com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
Restarts the sequence at the given date, in the given time zone
startingAt(Date) - Method in class com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
Restarts the sequence at the given date, in the default time zone
startingAt(Calendar) - Method in class com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
Restarts the sequence at the given date
startingAt(String) - Method in class com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
Restarts the sequence at the given date, in the default time zone
startingAt(long) - Method in class com.ninja_squad.dbsetup.generator.SequenceValueGenerator
Restarts the sequence at the given value
startingAt(long) - Method in class com.ninja_squad.dbsetup.generator.StringSequenceValueGenerator
Restarts the sequence at the given value
stringBinder() - Static method in class com.ninja_squad.dbsetup.bind.Binders
Returns a binder suitable for columns of type CHAR and VARCHAR.
stringSequence(String) - Static method in class com.ninja_squad.dbsetup.generator.ValueGenerators
Returns a value generator that returns a string prefix followed by a sequence number, optionally left-padded with 0 to ensure a correct ordering (for example: CODE_001, CODE_002, etc.).
StringSequenceValueGenerator - Class in com.ninja_squad.dbsetup.generator
A ValueGenerator that returns a string prefix followed by a sequence number, optionally left-padded with 0 to ensure a correct ordering (for example: CODE_001, CODE_002, etc.).

T

table(String) - Static method in class com.ninja_squad.dbsetup.operation.Truncate
Returns an operation which truncates the given table.
tables(String...) - Static method in class com.ninja_squad.dbsetup.operation.Truncate
Returns a composite operation which truncates the given tables, in the same order as the tables.
tables(List<String>) - Static method in class com.ninja_squad.dbsetup.operation.Truncate
Returns a composite operation which truncates the given tables, in the same order as the tables.
timeBinder() - Static method in class com.ninja_squad.dbsetup.bind.Binders
Returns a binder suitable for columns of type TIME.
timestampBinder() - Static method in class com.ninja_squad.dbsetup.bind.Binders
Returns a binder suitable for columns of type TIMESTAMP.
toString() - Method in class com.ninja_squad.dbsetup.bind.DefaultBinderConfiguration
 
toString() - Method in class com.ninja_squad.dbsetup.DbSetup
 
toString() - Method in class com.ninja_squad.dbsetup.DbSetupTracker
 
toString() - Method in class com.ninja_squad.dbsetup.destination.DataSourceDestination
 
toString() - Method in class com.ninja_squad.dbsetup.destination.DriverManagerDestination
 
toString() - Method in class com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
 
toString() - Method in class com.ninja_squad.dbsetup.generator.SequenceValueGenerator
 
toString() - Method in class com.ninja_squad.dbsetup.generator.StringSequenceValueGenerator
 
toString() - Method in class com.ninja_squad.dbsetup.operation.CompositeOperation
 
toString() - Method in class com.ninja_squad.dbsetup.operation.DeleteAll
 
toString() - Method in class com.ninja_squad.dbsetup.operation.Insert
 
toString() - Method in class com.ninja_squad.dbsetup.operation.SqlOperation
 
toString() - Method in class com.ninja_squad.dbsetup.operation.Truncate
 
Truncate - Class in com.ninja_squad.dbsetup.operation
An operation which deletes everything from a given database table using a TRUNCATE statement., which is sometimes faster that using a DELETE statement.
truncate(String) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a truncate table ...
truncate(String...) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of truncate table ...
truncate(List<String>) - Static method in class com.ninja_squad.dbsetup.Operations
Creates a sequence of truncate table ...

U

useMetadata(boolean) - Method in class com.ninja_squad.dbsetup.operation.Insert.Builder
Determines if the metadata must be used to get the appropriate binder for each inserted column (except the ones which have been associated explicitely with a Binder).

V

ValueGenerator<T> - Interface in com.ninja_squad.dbsetup.generator
A value generator allows generating values for a specific column in a sequence of inserts.
ValueGenerators - Class in com.ninja_squad.dbsetup.generator
Utility class containing factory methods for ValueGenerator
valueOf(String) - Static method in enum com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator.CalendarField
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator.CalendarField
Returns an array containing the constants of this enum type, in the order they are declared.
values(Object...) - Method in class com.ninja_squad.dbsetup.operation.Insert.Builder
Adds a row of values to insert.

W

withBinder(Binder, String...) - Method in class com.ninja_squad.dbsetup.operation.Insert.Builder
Associates a Binder to one or several columns.
withDefaultValue(String, Object) - Method in class com.ninja_squad.dbsetup.operation.Insert.Builder
Specifies a default value to be inserted in a column for all the rows inserted by the Insert operation.
withGeneratedValue(String, ValueGenerator<?>) - Method in class com.ninja_squad.dbsetup.operation.Insert.Builder
Allows the given column to be populated by a value generator, which will be called for every row of the Insert operation being built.
withLeftPadding(int) - Method in class com.ninja_squad.dbsetup.generator.StringSequenceValueGenerator
Tells the generator to left-pad the number it generates with 0 until the length of the number is the given length.
withoutLeftPadding() - Method in class com.ninja_squad.dbsetup.generator.StringSequenceValueGenerator
Tells the generator to avoid left-padding the number it generates with 0

B C D E F G H I L N O P S T U V W