Class JsonProperty

java.lang.Object
com.axelor.db.mapper.Property
com.axelor.db.mapper.JsonProperty

public class JsonProperty extends Property
  • Field Details

  • Method Details

    • of

      @Nullable public static JsonProperty of(Class<?> beanClass, String field)
    • of

      @Nullable public static JsonProperty of(String jsonModel, String field)
    • getType

      public PropertyType getType()
      Overrides:
      getType in class Property
    • isReference

      public boolean isReference()
      Overrides:
      isReference in class Property
    • isCollection

      public boolean isCollection()
      Overrides:
      isCollection in class Property
    • get

      public Object get(Object bean)
      Description copied from class: Property
      Get the value of this property from the given bean instance.
      Overrides:
      get in class Property
      Parameters:
      bean - the instance
      Returns:
      value of the current property
    • 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.

      Overrides:
      set in class Property
      Parameters:
      bean - the bean instance
      value - the value for the property
      Returns:
      old value of the property
    • 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.
      Overrides:
      add in class Property
      Parameters:
      bean - the bean instance
      item - collection item
      Returns:
      the same bean instance
    • 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.
      Overrides:
      addAll in class Property
      Parameters:
      bean - the bean instance
      items - the items to add
      Returns:
      the same bean instance
    • getName

      public String getName()
      Overrides:
      getName in class Property
    • getTitle

      public String getTitle()
      Overrides:
      getTitle in class Property
    • isPrimary

      public boolean isPrimary()
      Overrides:
      isPrimary in class Property
    • isVirtual

      public boolean isVirtual()
      Overrides:
      isVirtual in class Property