public class DbEntity extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
DbEntity.Builder
Builder to create immutable
DbEntity objects. |
Modifier | Constructor and Description |
---|---|
protected |
DbEntity(String name,
List<DbColumn> columns,
List<DbFk> fks,
List<String> pkFields,
List<DbIndex> indexes)
Creates a new instance of
DbEntity . |
Modifier and Type | Method and Description |
---|---|
boolean |
containsColumn(String columnName)
Checks if the given column is present in the list of columns.
|
List<DbColumn> |
getColumns()
Gets the list of columns of the entity.
|
List<DbFk> |
getFks()
Gets the immutable list of foreign keys.
|
List<DbIndex> |
getIndexes()
Gets the immutable list of indexes.
|
String |
getName()
Gets the name of the entity.
|
List<String> |
getPkFields()
Gets the immutable list of fields that compose the primary key.
|
DbEntity.Builder |
newBuilder()
Returns a new builder out of the configuration.
|
protected DbEntity(String name, List<DbColumn> columns, List<DbFk> fks, List<String> pkFields, List<DbIndex> indexes)
DbEntity
.name
- The name of the entity.columns
- The column that compose the entity.fks
- The list of foreign keys.pkFields
- The list of fields that compose the primary key.indexes
- The list of indexes in the entity.public String getName()
public List<DbColumn> getColumns()
public List<DbFk> getFks()
public List<String> getPkFields()
public List<DbIndex> getIndexes()
public boolean containsColumn(String columnName)
columnName
- The column name to check.true
if the column is present in the list of columns, false
otherwise.public DbEntity.Builder newBuilder()
Copyright © 2014 Feedzai. All Rights Reserved.