Class DbIndex.Builder
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.ddl.DbIndex.Builder
-
- All Implemented Interfaces:
Builder<DbIndex>,Serializable
- Enclosing class:
- DbIndex
public static class DbIndex.Builder extends Object implements Builder<DbIndex>, Serializable
Builder to create immutableDbIndexobjects.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DbIndexbuild()Builds the final immutable instance.DbIndex.Buildercolumns(String... columns)Add the columns that are part of the index.DbIndex.Buildercolumns(Collection<String> collection)Add the columns that are part of the index.DbIndex.Builderunique(boolean unique)Indicates if this index is unique or not.
-
-
-
Method Detail
-
columns
public DbIndex.Builder columns(String... columns)
Add the columns that are part of the index.- Parameters:
columns- The columns.- Returns:
- This builder.
-
columns
public DbIndex.Builder columns(Collection<String> collection)
Add the columns that are part of the index.- Parameters:
collection- The columns.- Returns:
- This builder.
-
unique
public DbIndex.Builder unique(boolean unique)
Indicates if this index is unique or not.- Parameters:
unique- True if it is unique, false otherwise.- Returns:
- This builder.
-
-