Class PropertyAbstract<P>

java.lang.Object
de.fraunhofer.iosb.ilt.frostclient.model.property.PropertyAbstract<P>
All Implemented Interfaces:
Annotatable, Property<P>, Comparable<Property<?>>
Direct Known Subclasses:
EntityPropertyMain, NavigationPropertyAbstract

public abstract class PropertyAbstract<P> extends Object implements Property<P>
  • Field Details

    • readOnly

      protected boolean readOnly
      Flag indicating the property is system generated and can not be edited by the user.
    • keyPart

      protected boolean keyPart
    • nullable

      protected boolean nullable
    • annotations

      protected List<Annotation> annotations
  • Constructor Details

    • PropertyAbstract

      public PropertyAbstract(String name, PropertyType type, boolean readOnly)
    • PropertyAbstract

      public PropertyAbstract(String name, PropertyType type, boolean readOnly, boolean nullable)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Property
      The name of this property as used in URLs.
      Specified by:
      getName in interface Property<P>
      Returns:
      The name of this property as used in URLs.
    • setName

      protected void setName(String name)
    • getJsonName

      public String getJsonName()
      Description copied from interface: Property
      The name of this property as used in JSON.
      Specified by:
      getJsonName in interface Property<P>
      Returns:
      The name of this property as used in JSON.
    • getType

      public PropertyType getType()
      Description copied from interface: Property
      The class of the type of the value of this property.
      Specified by:
      getType in interface Property<P>
      Returns:
      The class of the type of the value of this property.
    • setType

      protected void setType(PropertyType type)
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: Property
      Flag indicating the property is system generated and can not be edited by the user.
      Specified by:
      isReadOnly in interface Property<P>
      Returns:
      the readOnly flag.
    • isKeyPart

      public boolean isKeyPart()
      Description copied from interface: Property
      Flag indicating if this Property is part of the primary key of the Entity.
      Specified by:
      isKeyPart in interface Property<P>
      Returns:
      true if this Property is part of the primary key of the Entity.
    • setKeyPart

      public void setKeyPart(boolean keyPart)
    • isNullable

      public boolean isNullable()
      Description copied from interface: Property
      Flag indicating the property can be left out, or explicitly be set to null.
      Specified by:
      isNullable in interface Property<P>
      Returns:
      The nullable flag.
    • setNullable

      public void setNullable(boolean nullable)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAnnotations

      public List<Annotation> getAnnotations()
      Specified by:
      getAnnotations in interface Annotatable
    • setAnnotations

      public PropertyAbstract<P> setAnnotations(List<Annotation> annotations)
    • addAnnotation

      public PropertyAbstract<P> addAnnotation(Annotation annotation)