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 StringKEY_JSON_PREFIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectadd(Object bean, Object item)If this is a multi-valued field (one-to-many, many-to-many), add the specified item to the collection.ObjectaddAll(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.Objectget(Object bean)Get the value of this property from the given bean instance.StringgetName()StringgetTitle()PropertyTypegetType()booleanisCollection()booleanisPrimary()booleanisReference()booleanisVirtual()static JsonPropertyof(Class<?> beanClass, String field)static JsonPropertyof(String jsonModel, String field)Objectset(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, getTarget, getTargetName, getTargetSearch, isCopyable, isDefaultNow, isEncrypted, isEnum, isEqualsInclude, isHidden, isImage, isJson, isMassUpdate, isNameColumn, isNullable, isOrphan, isPassword, isReadonly, isRequired, isSequence, isTransient, isTranslatable, isUnique, isVersion, setAssociation, setTarget, 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:
isReferencein classProperty
-
isCollection
public boolean isCollection()
- Overrides:
isCollectionin classProperty
-
get
public Object get(Object bean)
Description copied from class:PropertyGet the value of this property from the given bean instance.
-
set
public Object set(Object bean, Object value)
Description copied from class:PropertySet 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:PropertyIf 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:PropertyIf this is a multi-valued field (one-to-many, many-to-many), add all the specified items to the collection.
-
-