Package org.openbravo.common.datasource
Class StockReservationPickAndEditDataSource
- java.lang.Object
-
- org.openbravo.service.datasource.BaseDataSourceService
-
- org.openbravo.service.datasource.DefaultDataSourceService
-
- org.openbravo.service.datasource.ReadOnlyDataSourceService
-
- org.openbravo.common.datasource.StockReservationPickAndEditDataSource
-
- All Implemented Interfaces:
DataSourceService
public class StockReservationPickAndEditDataSource extends ReadOnlyDataSourceService
-
-
Constructor Summary
Constructors Constructor Description StockReservationPickAndEditDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkFetchDatasourceAccess(Map<String,String> parameter)
This method allows to implement a security access to a DataSource when it is used fetch() method.String
fetch(Map<String,String> parameters)
Execute a query request and return the result as a json string.protected int
getCount(Map<String,String> parameters)
Returns the count of objects based on the passed parameters.protected List<Map<String,Object>>
getData(Map<String,String> parameters, int startRow, int endRow)
Read/create the set of data as a list of Maps with key-value pairs.Entity
getEntity()
-
Methods inherited from class org.openbravo.service.datasource.ReadOnlyDataSourceService
add, fetch, remove, sort, update
-
Methods inherited from class org.openbravo.service.datasource.DefaultDataSourceService
add, addFetchParameters, fetch, getDataSourceProperties, getInitialProperties, remove
-
Methods inherited from class org.openbravo.service.datasource.BaseDataSourceService
checkEditDatasourceAccess, getDataSource, getDataUrl, getName, getTemplate, getWhereAndFilterClause, getWhereClause, handleExceptionUnsecuredDSAccess, setDataSource, setDataUrl, setEntity, setName, setWhereClause
-
-
-
-
Method Detail
-
getEntity
public Entity getEntity()
- Specified by:
getEntity
in interfaceDataSourceService
- Overrides:
getEntity
in classBaseDataSourceService
-
fetch
public String fetch(Map<String,String> parameters)
Description copied from interface:DataSourceService
Execute a query request and return the result as a json string.- Specified by:
fetch
in interfaceDataSourceService
- Overrides:
fetch
in classReadOnlyDataSourceService
- Parameters:
parameters
- the parameters often coming from the HTTP request- Returns:
- the json result string
-
checkFetchDatasourceAccess
public void checkFetchDatasourceAccess(Map<String,String> parameter)
Description copied from interface:DataSourceService
This method allows to implement a security access to a DataSource when it is used fetch() method. It can be overridden in specific DataSources to apply a particular security mechanism.- Specified by:
checkFetchDatasourceAccess
in interfaceDataSourceService
- Overrides:
checkFetchDatasourceAccess
in classBaseDataSourceService
-
getData
protected List<Map<String,Object>> getData(Map<String,String> parameters, int startRow, int endRow)
Description copied from class:ReadOnlyDataSourceService
Read/create the set of data as a list of Maps with key-value pairs.- Specified by:
getData
in classReadOnlyDataSourceService
- Parameters:
parameters
- the parameters passed in from the requeststartRow
- the first row to read (maybe -1 to indicate no startrow)endRow
- the last row to read (maybe -1 to indicate no endrow- Returns:
- the number of objects read, note that this maybe more than endRow - startRow + 1. The startRow parameter should be strictly followed though.
-
getCount
protected int getCount(Map<String,String> parameters)
Description copied from class:ReadOnlyDataSourceService
Returns the count of objects based on the passed parameters.- Specified by:
getCount
in classReadOnlyDataSourceService
- Parameters:
parameters
- the parameters passed in from the request- Returns:
- the total number of objects
-
-