类 ImmutableObjects
java.lang.Object
org.babyfish.jimmer.ImmutableObjects
-
方法概要
修饰符和类型方法说明static <I> IfromString(Class<I> type, String json)Convert a JSON string to an object.static ObjectGet 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 Objectget(Object immutable, ImmutableProp prop)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 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 booleanstatic 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
-
isIdOnly
-
isLonely
-
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.JsonProcessingExceptionConvert a JSON string to an object.- 参数:
type- Object type, can be interface type.- 返回:
- Deserialized object
- 抛出:
com.fasterxml.jackson.core.JsonProcessingException
-