-
- All Implemented Interfaces:
public final class MapperConfigMapperConfig is a wrapper for the table relationship info (hash map) to be pass into a DataMapper instance for mapping objects
-
-
Field Summary
Fields Modifier and Type Field Description private LinkedHashMap<String, TableInfo>tableInfoprivate StringlatestTableprivate StringdefaultPrimaryKeyprivate BooleanautoRemoveLinkKey
-
Constructor Summary
Constructors Constructor Description MapperConfig(String defaultPrimaryKey, Boolean autoRemoveLinkKey)
-
Method Summary
-
-
Method Detail
-
getTableInfo
final LinkedHashMap<String, TableInfo> getTableInfo()
-
setTableInfo
final Unit setTableInfo(LinkedHashMap<String, TableInfo> tableInfo)
-
getLatestTable
final String getLatestTable()
-
setLatestTable
final Unit setLatestTable(String latestTable)
-
getDefaultPrimaryKey
final String getDefaultPrimaryKey()
-
setDefaultPrimaryKey
final Unit setDefaultPrimaryKey(String defaultPrimaryKey)
-
getAutoRemoveLinkKey
final Boolean getAutoRemoveLinkKey()
-
setAutoRemoveLinkKey
final Unit setAutoRemoveLinkKey(Boolean autoRemoveLinkKey)
-
defaultPrimaryKeyTo
final MapperConfig defaultPrimaryKeyTo(String defaultPrimaryKey)
- Parameters:
defaultPrimaryKey- set default primary such as common id field
-
shouldRemoveLinkKey
final MapperConfig shouldRemoveLinkKey(Boolean autoRemoveLinkKey)
- Parameters:
autoRemoveLinkKey- set true to remove foreign key that is linking the two tables
-
table
final MapperConfig table(String tableName)
-
table
final MapperConfig table(String tableName, String defaultPrimaryKey)
-
currentTable
final TableInfo currentTable()
-
removeLinkKey
final MapperConfig removeLinkKey()
-
remove
final MapperConfig remove(Object fieldName)
-
primaryKey
final MapperConfig primaryKey(String fieldName)
-
rename
final MapperConfig rename(String tableName)
-
foreignKey
final MapperConfig foreignKey(String fieldName)
-
oneToOne
final MapperConfig oneToOne(Boolean bool)
-
manyToMany
final MapperConfig manyToMany(Boolean bool)
-
oneToMany
final MapperConfig oneToMany(Boolean bool)
-
manyToOne
final MapperConfig manyToOne(Boolean bool)
-
moveUnder
final MapperConfig moveUnder(String fieldName)
-
toArrayMap
final LinkedHashMap<String, TableInfo> toArrayMap()
-
toTableInfo
final LinkedHashMap<String, TableInfo> toTableInfo()
-
sortTableInfo
final LinkedHashMap<String, TableInfo> sortTableInfo(LinkedHashMap<String, TableInfo> tables)
-
-
-
-