Package com.ribs.datasource
Class RMSQLUtils
- java.lang.Object
-
- com.ribs.datasource.RMSQLUtils
-
public class RMSQLUtils extends java.lang.ObjectSQL Utility methods.
-
-
Constructor Summary
Constructors Constructor Description RMSQLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.MapgetMapWithoutResultSets(java.util.Map aMap, int aDepth)Returns map where any ResultSets have been converted to Lists.static java.util.ListgetResultSetAsListOfMaps(java.sql.ResultSet aResultSet, int aLimit, java.lang.String aClassName)Returns a list of maps for a given ResultSet (adds aName as "Class" of maps).
-
-
-
Method Detail
-
getResultSetAsListOfMaps
public static java.util.List getResultSetAsListOfMaps(java.sql.ResultSet aResultSet, int aLimit, java.lang.String aClassName)Returns a list of maps for a given ResultSet (adds aName as "Class" of maps).- Parameters:
aResultSet- the result set to be converted to a list of maps.aLimit- the fetch limit for the list of maps. Use -1, 0 or Integer.MAX_VALUE for unlimited.aClassName- an optional class name to be added to the record maps as Class=aClassName (null if not wanted).
-
getMapWithoutResultSets
public static java.util.Map getMapWithoutResultSets(java.util.Map aMap, int aDepth)Returns map where any ResultSets have been converted to Lists. Copies the original Map if ResultSets exist.- Parameters:
aMap- the map to be stripped of result sets.aDepth- the depth to traverse any nested maps or lists (suggested value: 2).
-
-