/**
 * Represents an index.
 * @since 2.3
 */
public interface IndexMetadata extends Metadata {
    /**
     * Method to set the name of the index
     * 
     * @param name Name of the index
     */
    IndexMetadata setName(String name);

    /**
     * Accessor for the index name.
     * 
     * @return The index name
     */
    String getName();

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

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

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

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

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

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

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

    /**
     * Accessor for all member(s) defined on the index.
     * 
     * @return The fields/properties
     */
    MemberMetadata[] getMembers();

    /**
     * Accessor for the number of fields/properties defined for this index.
     * 
     * @return The number of members
     */
    int getNumberOfMembers();

    /**
     * Add a new field for this index.
     * 
     * @param name Name of the field
     * @return The FieldMetadata
     */
    FieldMetadata newFieldMetadata(String name);

    /**
     * Add a new property for this index.
     * 
     * @param name Name of the property
     * @return The PropertyMetadata
     */
    PropertyMetadata newPropertyMetadata(String name);
}
