T
- the entity, for example a JpaEntityID
- the unique identifier of the entity, for the example the primary key of the JpaEntitypublic interface TableConfiguration<T,ID>
Modifier and Type | Method and Description |
---|---|
ApplicationSettings |
getAppSettings()
The ApplicationSettings used to provide date format among possible other things.
|
java.lang.String |
getCustomUrl()
Has to match the @RequestMapping on the controller extending AbstractDataTablesController.
|
DataTablesService<T,ID> |
getDataTablesService()
The DataTablesService that is used by the AbstractDataTablesController
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getDropDownFiller()
Returns a map of all values used to populate drop down menus on view.
|
java.util.Map<java.lang.String,java.lang.String> |
getDropDownValuesFor(java.lang.String key)
Methods for handling drop down values, will return one of the maps from the dropDownFiller based on the name.
|
T |
getEntity()
Gets an instance of T.
|
java.lang.String |
getEntityName()
The pretty entity name, that will be used on the view
|
org.apache.log4j.Logger |
getLog() |
boolean |
getRecordsCanBeAdded()
Can records be added.
|
boolean |
getRecordsCanBeDeleted()
Can records be deleted.
|
java.lang.String |
getTableName()
Returns the id used for the table on the html page
|
java.lang.String |
getViewName()
The view name, most likely a jsp page that will be used for this DataTable.
|
void |
setAppSettings(ApplicationSettings appSettings)
Sets the ApplicationSettings used to provide date format among possible other things.
|
void |
setCustomUrl(java.lang.String customUrl)
Has to match the @RequestMapping on the controller extending AbstractDataTablesController.
|
void |
setDataTablesService(DataTablesService<T,ID> dataTablesService)
Sets the DataTablesService used by the AbstractDataTablesController for this DataTable.
|
void |
setDropDownFiller(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dropDownFiller)
Sets the drop down values map
|
void |
setDropDownValuesFor(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Adds one record to the dropDownFiller map
|
void |
setEntity(T entity)
Set this entity to be used in the DataTables
|
void |
setEntityName(java.lang.String entityName)
Set the entity name to use on the add form on the view.
|
void |
setLog(org.apache.log4j.Logger log)
Sets the Logger for the implementation
|
void |
setRecordsCanBeAdded(boolean recordsCanBeAdded)
Set to true if add entity functionality is needed.
|
void |
setRecordsCanBeDeleted(boolean recordsCanBeDeleted)
Set to true if delete entity functionality is needed.
|
void |
setTableName(java.lang.String tableName)
Sets the id used for the table on the html page, defaults to DefaultValues.DEFAULTDATATABLESNAME.
|
void |
setViewName(java.lang.String viewName)
The view name, most likely a jsp page that will be used for this DataTable.
|
DataTablesService<T,ID> getDataTablesService()
void setDataTablesService(DataTablesService<T,ID> dataTablesService)
dataTablesService
- java.lang.String getTableName()
void setTableName(java.lang.String tableName)
org.apache.log4j.Logger getLog()
void setLog(org.apache.log4j.Logger log)
log
- T getEntity()
void setEntity(T entity)
entity
- java.lang.String getViewName()
void setViewName(java.lang.String viewName)
viewName
- the name of the view as a Stringjava.lang.String getCustomUrl()
void setCustomUrl(java.lang.String customUrl)
customUrl
- ApplicationSettings getAppSettings()
void setAppSettings(ApplicationSettings appSettings)
appSettings
- boolean getRecordsCanBeAdded()
void setRecordsCanBeAdded(boolean recordsCanBeAdded)
recordsCanBeAdded
- boolean getRecordsCanBeDeleted()
void setRecordsCanBeDeleted(boolean recordsCanBeDeleted)
recordsCanBeDeleted
- java.lang.String getEntityName()
void setEntityName(java.lang.String entityName)
entityName
- java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getDropDownFiller()
void setDropDownFiller(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dropDownFiller)
dropDownFiller
- java.util.Map<java.lang.String,java.lang.String> getDropDownValuesFor(java.lang.String key)
key
- the key used in the dropDownFiller mapvoid setDropDownValuesFor(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values)
key
- of the record to add to the dropDownFillervalues
- a map containing "id":"value" to display in a drop down menu on the jsp page