/**
 * Represents join information.
 * @since 2.3
 */
public interface JoinMetadata extends Metadata {
    /**
     * Method to set the join column.
     * 
     * @param column Name of the join column
     */
    JoinMetadata setColumn(String column);

    /**
     * Accessor for the join column name
     * 
     * @return The column name
     */
    String getColumn();

    /**
     * Method to set the table name.
     * 
     * @param table Table name
     */
    JoinMetadata setTable(String table);

    /**
     * Accessor for the name of the table.
     * 
     * @return The name
     */
    String getTable();

    /**
     * Method to set whether to use an outer join
     * 
     * @param outer Outer join?
     */
    JoinMetadata setOuter(boolean outer);

    /**
     * Accessor for whether to use an outer join.
     * 
     * @return Outer join?
     */
    boolean getOuter();

    /**
     * Method to set the delete action of the FK
     * 
     * @param action Delete action of the FK
     */
    JoinMetadata setDeleteAction(ForeignKeyAction action);

    /**
     * Accessor for the delete action of the FK
     * 
     * @return The FK delete-action
     */
    ForeignKeyAction getDeleteAction();

    /**
     * Method to set whether indexed.
     * 
     * @param indexed Whether indexed (true | false | unique)
     */
    JoinMetadata setIndexed(Indexed indexed);

    /**
     * Accessor for whether indexed (true|false|unique)
     * 
     * @return Indexed?
     */
    Indexed getIndexed();

    /**
     * Method to set whether it is unique.
     * 
     * @param unique Unique?
     */
    JoinMetadata setUnique(boolean unique);

    /**
     * Accessor for whether unique.
     * 
     * @return Unique?
     */
    Boolean getUnique();

    /**
     * Method to set new index metadata for the join.
     * 
     * @return The IndexMetadata
     */
    IndexMetadata newIndexMetadata();

    /**
     * Accessor for any index metadata on this join
     * 
     * @return Index metadata
     */
    IndexMetadata getIndexMetadata();

    /**
     * Method to set new unique constraint metadata for the join
     * 
     * @return The UniqueMetadata
     */
    UniqueMetadata newUniqueMetadata();

    /**
     * Accessor for any unique constraint metadata on this join.
     * 
     * @return The UniqueMetadata
     */
    UniqueMetadata getUniqueMetadata();

    /**
     * Method to set new foreign key metadata for the join
     * 
     * @return The ForeignKeyMetadata
     */
    ForeignKeyMetadata newForeignKeyMetadata();

    /**
     * Accessor for any foreign key metadata on this join.
     * 
     * @return The ForeignKeyMetadata
     */
    ForeignKeyMetadata getForeignKeyMetadata();

    /**
     * Method to set new primary key metadata for the join
     * 
     * @return The PrimaryKeyMetadata
     */
    PrimaryKeyMetadata newPrimaryKeyMetadata();

    /**
     * Accessor for any primary key metadata on this join.
     * 
     * @return The PrimaryKeyMetadata
     */
    PrimaryKeyMetadata getPrimaryKeyMetadata();

    /**
     * Accessor for all column(s) defined on the join.
     * 
     * @return The column(s)
     */
    ColumnMetadata[] getColumns();

    /**
     * Add a new column for this join.
     * 
     * @return The ColumnMetadata
     */
    ColumnMetadata newColumnMetadata();

    /**
     * Accessor for the number of columns defined for this join.
     * 
     * @return The number of columns
     */
    int getNumberOfColumns();
}
