Interface ColumnProperty<T>

    • Method Detail

      • columnName

        String columnName()
        Returns:
        the column name
      • columnExpression

        String columnExpression()
        Returns:
        the column expression to use when selecting or the column name if no expression has been set
      • columnType

        int columnType()
        Returns:
        the sql data type of the underlying column (Types.
      • toColumnValue

        <C> C toColumnValue​(T value,
                            Statement statement)
                     throws SQLException
        Translates the given value into a sql value, usually this is not required but for certain types this may be necessary, such as boolean values represented by a non-boolean data type in the underlying database
        Type Parameters:
        C - the column value type
        Parameters:
        value - the value to translate
        statement - the statement using the column value
        Returns:
        the sql value used to represent the given value
        Throws:
        SQLException - in case of an exception
      • primaryKeyIndex

        int primaryKeyIndex()
        Returns:
        this propertys zero based index in the primary key, -1 if this property is not part of a primary key
      • isPrimaryKeyColumn

        boolean isPrimaryKeyColumn()
        Returns:
        true if this property is part of a primary key
      • isGroupingColumn

        boolean isGroupingColumn()
        Returns:
        true if this column is a group by column
      • isAggregateColumn

        boolean isAggregateColumn()
        Returns:
        true if this is an aggregate column
      • isSelectable

        boolean isSelectable()
        Returns:
        true if this property should be included in select queries
      • isInsertable

        boolean isInsertable()
        Specifies whether this property is insertable
        Returns:
        true if this property is insertable
      • isUpdatable

        boolean isUpdatable()
        Indicates whether this column is updatable
        Returns:
        true if this column is updatable
      • isReadOnly

        boolean isReadOnly()
        Returns:
        true if this property is neither insertable nor updatable.
      • isDenormalized

        boolean isDenormalized()
        Returns:
        true if this column is a denormalized column, one which should receives a value from a column in a table referenced via a foreign key
      • columnHasDefaultValue

        boolean columnHasDefaultValue()
        Returns:
        true if the underlying column has a default value
      • isSearchProperty

        boolean isSearchProperty()
        Returns:
        true if this property should be included when searching by string
      • fetchValue

        T fetchValue​(ResultSet resultSet,
                     int index)
              throws SQLException
        Fetches a value for this property from a ResultSet
        Parameters:
        resultSet - the ResultSet
        index - the index of the column to fetch
        Returns:
        a single value fetched from the given ResultSet
        Throws:
        SQLException - in case of an exception
      • resultPacker

        ResultPacker<T> resultPacker()
        Returns:
        a ResultPacker responsible for packing this property