Package io.inversion

Class Property

java.lang.Object
io.inversion.Property
All Implemented Interfaces:
Serializable

public final class Property extends Object implements Serializable
See Also:
  • Field Details

    • name

      protected String name
    • columnName

      protected String columnName
    • description

      protected String description
    • type

      protected String type
    • nullable

      protected boolean nullable
    • readOnly

      protected boolean readOnly
    • autoGenerated

      protected boolean autoGenerated
    • required

      protected boolean required
    • jsonType

      protected String jsonType
    • regex

      protected String regex
    • documented

      protected boolean documented
    • revisionColumn

      protected boolean revisionColumn
    • timestampColumn

      protected boolean timestampColumn
    • hint

      protected String hint
    • exclude

      protected boolean exclude
    • pk

      protected Property pk
      If this Property is a foreign key, this will be populated with the referenced primary key from the referred Collection
    • collection

      protected Collection collection
  • Constructor Details

    • Property

      public Property()
    • Property

      public Property(String name)
    • Property

      public Property(String name, String type)
    • Property

      public Property(String name, String type, boolean nullable)
  • Method Details

    • setCollection

      public void setCollection(Collection collection)
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

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

      public Property withDescription(String description)
    • getDescription

      public String getDescription()
    • getPk

      public Property getPk()
      Returns:
      the primaryKey
    • withPk

      public Property withPk(Property primaryKey)
      Parameters:
      primaryKey - the primaryKey to set
      Returns:
      this
    • isFk

      public boolean isFk()
    • getColumnName

      public String getColumnName()
      Returns:
      the name
    • withColumnName

      public Property withColumnName(String name)
      Parameters:
      name - the name to set
      Returns:
      this
    • getJsonName

      public String getJsonName()
      Returns:
      the name
    • getName

      public String getName()
    • withJsonName

      public Property withJsonName(String name)
      Parameters:
      name - the name to set
      Returns:
      this
    • withName

      public Property withName(String name)
    • getType

      public String getType()
      Returns:
      the type
    • withType

      public Property withType(String type)
      Parameters:
      type - the type to set
      Returns:
      this
    • getCollection

      public Collection getCollection()
      Returns:
      the collection that owns this property
    • withCollection

      public Property withCollection(Collection collection)
      Parameters:
      collection - the Collection the Property belongs to
      Returns:
      this
    • getHint

      public String getHint()
      Returns:
      the hint
    • withHint

      public Property withHint(String hint)
      Parameters:
      hint - the hint to set
      Returns:
      this
    • isNullable

      public boolean isNullable()
    • withNullable

      public Property withNullable(boolean nullable)
    • isExclude

      public boolean isExclude()
    • withExclude

      public Property withExclude(boolean exclude)
    • isReadOnly

      public boolean isReadOnly()
    • withReadOnly

      public Property withReadOnly(boolean readOnly)
    • isAutoGenerated

      public boolean isAutoGenerated()
    • withAutoGenerated

      public Property withAutoGenerated(boolean autoGenerated)
    • isRequired

      public boolean isRequired()
    • withRequired

      public Property withRequired(boolean required)
    • withRegex

      public Property withRegex(String regex)
    • isDocumented

      public boolean isDocumented()
    • withDocumented

      public Property withDocumented(boolean documented)
    • getRegex

      public String getRegex()
    • isRevisionColumn

      public boolean isRevisionColumn()
    • withRevisionColumn

      public Property withRevisionColumn(boolean revisionColumn)
    • isTimestampColumn

      public boolean isTimestampColumn()
    • withTimestampColumn

      public Property withTimestampColumn(boolean timestampColumn)
    • withJsonType

      public Property withJsonType(String jsonType)
    • getJsonType

      public String getJsonType()