类 CodeMapUtils
java.lang.Object
cloud.opencode.base.util.CodeMapUtils
- 版本:
- v1.0.0
- 作者:
- Jon So, e-mail: ijonso123@gmail.com url: Jon's blog url: project github
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明conversionMap(T bean) object convert to mapprivate static voidConvert entity class to map (including parent class)private static voidConvert entity class to map (including parent class) Simple entitystatic BigDecimalgetBigDecimalValue(Map<String, Object> map, String key) get bigdecimal value from mapstatic BooleangetBoolValue(Map<String, Object> map, String key) get boolean value from mapstatic DoublegetDoubleValue(Map<String, Object> map, String key) get double value from mapstatic FloatgetFloatValue(Map<String, Object> map, String key) get float value from mapstatic IntegergetIntegerValue(Map<String, Object> map, String key) get integer value from mapget mapgetMapFromEntity(Object entity) Converting entity classes to mapgetMapFromEntitySimple(Object entity) Converting entity classes to map (single layer)static StringgetRequestParam2Json(jakarta.servlet.http.HttpServletRequest request) Get the requested Map from HttpServletRequest and convert it to JSONgetRequestParam2Map(jakarta.servlet.http.HttpServletRequest request) Get the requested Map from HttpServletRequeststatic StringgetStringValue(Map<String, Object> map, String key) get string from mapprivate static booleanConvert entity class to map (including parent class)
-
构造器详细资料
-
CodeMapUtils
private CodeMapUtils()
-
-
方法详细资料
-
getMapFromEntity
Converting entity classes to map- 参数:
entity- entity- 返回:
- map
- 抛出:
IllegalAccessException
-
getMapFromEntitySimple
public static Map<String,String> getMapFromEntitySimple(Object entity) throws IllegalAccessException Converting entity classes to map (single layer)- 参数:
entity- object- 返回:
- map
- 抛出:
IllegalAccessException
-
convertMap
private static void convertMap(Map<String, Object> map, Class clazz, Object target) throws IllegalAccessExceptionConvert entity class to map (including parent class)- 参数:
map- mapclazz- classtarget- object- 抛出:
Exception- IllegalAccessExceptionIllegalAccessException
-
convertMapSimple
private static void convertMapSimple(Map<String, String> map, Class clazz, Object target) throws IllegalAccessExceptionConvert entity class to map (including parent class) Simple entity- 参数:
map- mapclazz- classtarget- object- 抛出:
IllegalAccessException
-
isBasicType
Convert entity class to map (including parent class)- 参数:
o- Object- 返回:
- boolean
-
getRequestParam2Map
public static Map<String,String> getRequestParam2Map(jakarta.servlet.http.HttpServletRequest request) Get the requested Map from HttpServletRequest- 参数:
request- HttpServletRequest- 返回:
- map
-
getRequestParam2Json
Get the requested Map from HttpServletRequest and convert it to JSON- 参数:
request- HttpServletRequest- 返回:
- JSON
-
getMap
get map- 参数:
key- keyvalue- value- 返回:
- hashmap
-
getBoolValue
get boolean value from map- 参数:
map- mapkey- key- 返回:
- boolean
-
getStringValue
get string from map- 参数:
map- mapkey- key- 返回:
- string
-
getIntegerValue
get integer value from map- 参数:
map- mapkey- key- 返回:
- integer
-
getDoubleValue
get double value from map- 参数:
map- mapkey- key- 返回:
- double
-
getFloatValue
get float value from map- 参数:
map- mapkey- key- 返回:
- float
-
getBigDecimalValue
get bigdecimal value from map- 参数:
map- mapkey- key- 返回:
- BigDecimal
-
conversionMap
object convert to map- 类型参数:
T- the bean type- 参数:
bean- bean- 返回:
- map
-