public class ModelDataSourceService extends BaseDataSourceService
Constructor and Description |
---|
ModelDataSourceService() |
Modifier and Type | Method and Description |
---|---|
String |
add(Map<String,String> parameters,
String content)
Execute an insert action.
|
String |
fetch(Map<String,String> parameters)
Execute a query request and return the result as a json string.
|
protected Entity |
getBaseEntity(Map<String,String> parameters)
Returns an entity based on the table record id.
|
protected List<Property> |
getEntityProperties(Entity entity)
Returns the list of properties sorted alphabetically and with a extra _identifier property
|
String |
remove(Map<String,String> parameters)
Execute a delete action.
|
String |
update(Map<String,String> parameters,
String content)
Execute an update action.
|
checkEditDatasourceAccess, checkFetchDatasourceAccess, getDataSource, getDataSourceProperties, getDataUrl, getEntity, getJavaScriptCreator, getName, getTemplate, getWhereAndFilterClause, getWhereClause, handleExceptionUnsecuredDSAccess, setDataSource, setDataUrl, setEntity, setName, setWhereClause
public String add(Map<String,String> parameters, String content)
DataSourceService
parameters
- the parameters often coming from the HTTP requestcontent
- , the request content, is assumed to be a json stringpublic String fetch(Map<String,String> parameters)
DataSourceService
parameters
- the parameters often coming from the HTTP requestpublic String remove(Map<String,String> parameters)
DataSourceService
parameters
- the parameters often coming from the HTTP requestpublic String update(Map<String,String> parameters, String content)
DataSourceService
parameters
- the parameters often coming from the HTTP requestcontent
- , the request content, is assumed to be a json stringprotected Entity getBaseEntity(Map<String,String> parameters)
parameters
- Map of the parameters from the requestprotected List<Property> getEntityProperties(Entity entity)
entity
- the parent Entity from which the Property will be extracted