Class BasicAttribute

    • Constructor Detail

      • BasicAttribute

        public BasicAttribute​(String name,
                              String type,
                              boolean insertable,
                              boolean key)
        Create a basic attribute
        Parameters:
        name - the attribute name
        type - the attribute type
        insertable - whether the attribute is insertable
        key - whether the attribute participates in a key
      • BasicAttribute

        public BasicAttribute​(String name,
                              String type,
                              boolean insertable,
                              boolean key,
                              String explicitType)
        Create a basic attribute
        Parameters:
        name - the attribute name
        type - the attribute type
        insertable - whether the attribute is insertable
        key - whether the attribute participates in a key
        explicitType - the explicit class type
      • BasicAttribute

        public BasicAttribute​(String name,
                              String type,
                              boolean insertable,
                              boolean updatable,
                              boolean key)
        Create a basic attribute
        Parameters:
        name - the attribute name
        type - the attribute type
        insertable - whether the attribute is insertable
        updatable - whether the attribute is updatable
        key - whether the attribute participates in a key
      • BasicAttribute

        public BasicAttribute​(String name,
                              String type,
                              boolean insertable,
                              boolean updatable,
                              boolean key,
                              String explicitType)
        Creates a basic attribute
        Parameters:
        name - the attribute name
        type - the attribute type
        insertable - whether the attribute is insertable
        updatable - whether the attribute is updatable
        key - whether the attribute participates in a key
        explicitType - the explicit class type
      • BasicAttribute

        public BasicAttribute​(BasicAttribute other)
        A copy constructor that performs a deep-copy.
        Parameters:
        other - the object to be copied
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Attribute
        Get the name of the attribute
        Specified by:
        getName in interface Attribute
        Returns:
        the attribute's name
      • setName

        public void setName​(String name)
        Description copied from interface: Attribute
        Set the name of the attribute
        Specified by:
        setName in interface Attribute
        Parameters:
        name - the attribute's name
      • setKey

        public void setKey​(boolean key)
        Description copied from interface: Keyable
        Set whether this attribute should or shouldn't participate as a key attribute.
        Specified by:
        setKey in interface Keyable
        Parameters:
        key - specifies if the attribute is part of the key
      • isKey

        public boolean isKey()
        Description copied from interface: Keyable
        Get whether the attribute is already participatig in a key.
        Specified by:
        isKey in interface Keyable
        Returns:
        true if the attribute is in the key; false otherwise
      • addColumn

        public void addColumn​(Column column)
        Description copied from interface: ColumnContainer
        Add a column to the container.
        Specified by:
        addColumn in interface ColumnContainer
        Parameters:
        column - the column, must not be null
      • setInsertable

        public void setInsertable​(boolean insertable)
      • deepCopy

        public BasicAttribute deepCopy()
        Description copied from interface: Cloneable
        Creates a new, deep-copied instance of this object
        Specified by:
        deepCopy in interface Cloneable<Attribute>
        Returns:
        a deep-copy clone of the referenced object
      • build

        public Serializable build()
        Description copied from interface: Bindable
        Builds the specified binded class type.
        Specified by:
        build in interface Bindable<Serializable>
        Returns:
        instance of the bindable class type, never null