Package org.openbravo.service.datasource
Class DataSourceUtils
- java.lang.Object
-
- org.openbravo.service.datasource.DataSourceUtils
-
public class DataSourceUtils extends Object
This class contains utility methods for dataSource related classes
-
-
Constructor Summary
Constructors Constructor Description DataSourceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getNumberOfSelectedRecords(Map<String,String> parameters)
Extracts the criteria from a request parameter map and returns the number of selected records according to that criteria.static String
getOrgs(String orgId)
Returns a comma separated list of organization ids to filter the HQL.static Set<String>
getSelectedRecordsFromCriteria(org.codehaus.jettison.json.JSONObject buildCriteria)
Returns a set of selected record IDs from a criteria included in the JSONObject received as parameter.
-
-
-
Method Detail
-
getOrgs
public static String getOrgs(String orgId)
Returns a comma separated list of organization ids to filter the HQL. If an organization id is provided its natural tree is returned. If no organization is provided or the given value is invalid the readable organizations are returned.
-
getNumberOfSelectedRecords
public static int getNumberOfSelectedRecords(Map<String,String> parameters)
Extracts the criteria from a request parameter map and returns the number of selected records according to that criteria.
-
-