Package io.inversion

Class Property

  • All Implemented Interfaces:
    java.io.Serializable

    public final class Property
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Detail

      • name

        protected java.lang.String name
      • columnName

        protected java.lang.String columnName
      • description

        protected java.lang.String description
      • type

        protected java.lang.String type
      • nullable

        protected boolean nullable
      • readOnly

        protected boolean readOnly
      • autoGenerated

        protected boolean autoGenerated
      • required

        protected boolean required
      • jsonType

        protected java.lang.String jsonType
      • regex

        protected java.lang.String regex
      • documented

        protected boolean documented
      • revisionColumn

        protected boolean revisionColumn
      • timestampColumn

        protected boolean timestampColumn
      • hint

        protected java.lang.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
    • Constructor Detail

      • Property

        public Property()
      • Property

        public Property​(java.lang.String name)
      • Property

        public Property​(java.lang.String name,
                        java.lang.String type)
      • Property

        public Property​(java.lang.String name,
                        java.lang.String type,
                        boolean nullable)
    • Method Detail

      • setCollection

        public void setCollection​(Collection collection)
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

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

        public Property withDescription​(java.lang.String description)
      • getDescription

        public java.lang.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 java.lang.String getColumnName()
        Returns:
        the name
      • withColumnName

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

        public java.lang.String getJsonName()
        Returns:
        the name
      • getName

        public java.lang.String getName()
      • withJsonName

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

        public Property withName​(java.lang.String name)
      • getType

        public java.lang.String getType()
        Returns:
        the type
      • withType

        public Property withType​(java.lang.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 java.lang.String getHint()
        Returns:
        the hint
      • withHint

        public Property withHint​(java.lang.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​(java.lang.String regex)
      • isDocumented

        public boolean isDocumented()
      • withDocumented

        public Property withDocumented​(boolean documented)
      • getRegex

        public java.lang.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​(java.lang.String jsonType)
      • getJsonType

        public java.lang.String getJsonType()