类 ImmutableObjects
java.lang.Object
org.babyfish.jimmer.ImmutableObjects
-
方法概要
修饰符和类型方法说明static <I> IfromString(Class<I> type, String json) Convert a JSON string to an object.static <I> IfromString(Class<I> type, String json, com.fasterxml.jackson.databind.ObjectMapper mapper) static ObjectGet the property value of immutable object, if the property is not loaded, exception will be thrown.static Objectget(Object immutable, ImmutableProp prop) Get the property value of immutable object, if the property is not loaded, exception will be thrown.static ObjectGet the property value of immutable object, if the property is not loaded, exception will be thrown.static <T,X> X Get the property value of immutable object, if the property is not loaded, exception will be thrown.static booleanstatic booleanJimmer object is dynamic, none properties are mandatory.static booleanisLoaded(Object immutable, ImmutableProp prop) Jimmer object is dynamic, none properties are mandatory.static booleanJimmer object is dynamic, none properties are mandatory.static booleanJimmer object is dynamic, none properties are mandatory.static booleanstatic <T> TmakeIdOnly(Class<T> type, Object id) static <T> TmakeIdOnly(ImmutableType type, Object id) static <T> Collection<T>static <T> List<T>static <T> Set<T>static <T> TtoIdOnly(T immutable) static <T> TtoLonely(T immutable) static StringConvert an object to a JSON string.
-
方法详细资料
-
isLoaded
Jimmer object is dynamic, none properties are mandatory. This method can ask whether a property of the object is specified.- 参数:
immutable- Object instanceprop- Property id- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- The first argument is immutable object created by jimmer
-
isLoaded
Jimmer object is dynamic, none properties are mandatory. This method can ask whether a property of the object is specified.- 参数:
immutable- Object instanceprop- Property name- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- The first argument is immutable object created by jimmer
-
isLoaded
Jimmer object is dynamic, none properties are mandatory. This method can ask whether a property of the object is specified.- 参数:
immutable- Object instanceprop- Property- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- The first argument is immutable object created by jimmer
-
isLoaded
Jimmer object is dynamic, none properties are mandatory. This method can ask whether a property of the object is specified.- 参数:
immutable- Object instanceprop- Property- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- The first argument is immutable object created by jimmer
-
get
Get the property value of immutable object, if the property is not loaded, exception will be thrown.- 参数:
immutable- Object instanceprop- Property id- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- There are two possibilities- The first argument is immutable object created by jimmer
- The second argument is not a valid property name of immutable object
UnloadedException- The property is not loaded
-
get
Get the property value of immutable object, if the property is not loaded, exception will be thrown.- 参数:
immutable- Object instanceprop- Property name- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- There are two possibilities- The first argument is immutable object created by jimmer
- The second argument is not a valid property name of immutable object
UnloadedException- The property is not loaded
-
get
Get the property value of immutable object, if the property is not loaded, exception will be thrown.- 参数:
immutable- Object instanceprop- Property- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- There are two possibilities- The first argument is immutable object created by jimmer
- The second argument is not a valid property name of immutable object
UnloadedException- The property is not loaded
-
get
Get the property value of immutable object, if the property is not loaded, exception will be thrown.- 类型参数:
T- The entity typeX- The property type- 参数:
immutable- Object instanceprop- Property- 返回:
- Whether the property of the object is specified.
- 抛出:
IllegalArgumentException- There are two possibilities- The first argument is immutable object created by jimmer
- The second argument is not a valid property name of immutable object
UnloadedException- The property is not loaded
-
isIdOnly
-
makeIdOnly
-
makeIdOnly
-
isLonely
-
toLonely
public static <T> T toLonely(T immutable) -
toIdOnly
-
toIdOnly
-
toIdOnly
-
toIdOnly
public static <T> T toIdOnly(T immutable) -
toString
Convert an object to a JSON string. If the object is jimmer immutable object, unspecified properties can be automatically ignored.- 参数:
immutable- Any object- 返回:
- JSON string
-
fromString
public static <I> I fromString(Class<I> type, String json) throws com.fasterxml.jackson.core.JsonProcessingException Convert a JSON string to an object.- 参数:
type- Object type, can be interface type.- 返回:
- Deserialized object
- 抛出:
com.fasterxml.jackson.core.JsonProcessingException
-
fromString
public static <I> I fromString(Class<I> type, String json, com.fasterxml.jackson.databind.ObjectMapper mapper) throws com.fasterxml.jackson.core.JsonProcessingException - 抛出:
com.fasterxml.jackson.core.JsonProcessingException
-