Package com.axelor.db.mapper
Class JsonProperty
- java.lang.Object
-
- com.axelor.db.mapper.Property
-
- com.axelor.db.mapper.JsonProperty
-
public class JsonProperty extends Property
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_JSON_PREFIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
add(Object bean, Object item)
If this is a multi-valued field (one-to-many, many-to-many), add the specified item to the collection.Object
addAll(Object bean, Collection<?> items)
If this is a multi-valued field (one-to-many, many-to-many), add all the specified items to the collection.Object
get(Object bean)
Get the value of this property from the given bean instance.String
getName()
Class<?>
getTarget()
PropertyType
getType()
boolean
isCollection()
boolean
isPrimary()
boolean
isReference()
boolean
isVirtual()
static JsonProperty
of(Class<?> beanClass, String field)
static JsonProperty
of(String jsonModel, String field)
Object
set(Object bean, Object value)
Set the value for this property to the given bean instance.-
Methods inherited from class com.axelor.db.mapper.Property
clear, getEntity, getEnumType, getGenericType, getHelp, getJavaType, getMappedBy, getMaxSize, getMinSize, getNameSearch, getPrecision, getScale, getSelection, getSequenceName, getTargetName, getTargetSearch, getTitle, isCopyable, isDefaultNow, isEncrypted, isEnum, isEqualsInclude, isHidden, isImage, isJson, isMassUpdate, isNameColumn, isNullable, isOrphan, isPassword, isReadonly, isRequired, isSequence, isTransient, isTranslatable, isUnique, isVersion, setAssociation, toMap, toString, valueChanged
-
-
-
-
Field Detail
-
KEY_JSON_PREFIX
public static final String KEY_JSON_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
of
@Nullable public static JsonProperty of(Class<?> beanClass, String field)
-
of
@Nullable public static JsonProperty of(String jsonModel, String field)
-
getType
public PropertyType getType()
-
isReference
public boolean isReference()
- Overrides:
isReference
in classProperty
-
isCollection
public boolean isCollection()
- Overrides:
isCollection
in classProperty
-
get
public Object get(Object bean)
Description copied from class:Property
Get the value of this property from the given bean instance.
-
set
public Object set(Object bean, Object value)
Description copied from class:Property
Set the value for this property to the given bean instance.If the property is a collection, ensure the proper parent-child relationship marked with mappedBy attribute.
-
add
public Object add(Object bean, Object item)
Description copied from class:Property
If this is a multi-valued field (one-to-many, many-to-many), add the specified item to the collection.
-
addAll
public Object addAll(Object bean, Collection<?> items)
Description copied from class:Property
If this is a multi-valued field (one-to-many, many-to-many), add all the specified items to the collection.
-
-