Class MediaTable

  • Direct Known Subclasses:
    IconTable

    public class MediaTable
    extends UserRelatedTable
    Media Requirements Class User-Defined Related Data Table
    Since:
    3.0.1
    Author:
    osbornb
    • Field Detail

      • RELATION_TYPE

        public static final RelationType RELATION_TYPE
        User-Defined Media Table relation name
    • Constructor Detail

      • MediaTable

        public MediaTable​(String tableName,
                          List<UserCustomColumn> columns)
        Constructor
        Parameters:
        tableName - table name
        columns - list of columns
      • MediaTable

        public MediaTable​(String tableName,
                          List<UserCustomColumn> columns,
                          String idColumnName)
        Constructor
        Parameters:
        tableName - table name
        columns - list of columns
        idColumnName - id column name
      • MediaTable

        public MediaTable​(UserCustomTable table)
        Constructor
        Parameters:
        table - user custom table
    • Method Detail

      • create

        public static MediaTable create​(MediaTableMetadata metadata)
        Create a media table with the metadata
        Parameters:
        metadata - media table metadata
        Returns:
        media table
        Since:
        4.0.0
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns()
        Create the required table columns
        Returns:
        user custom columns
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns​(boolean autoincrement)
        Create the required table columns
        Parameters:
        autoincrement - autoincrement id values
        Returns:
        user custom columns
        Since:
        4.0.0
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns​(String idColumnName)
        Create the required table columns with the id column name
        Parameters:
        idColumnName - id column name
        Returns:
        user custom columns
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns​(String idColumnName,
                                                                   boolean autoincrement)
        Create the required table columns with the id column name
        Parameters:
        idColumnName - id column name
        autoincrement - autoincrement id values
        Returns:
        user custom columns
        Since:
        4.0.0
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns​(int startingIndex)
        Create the required table columns, starting at the provided index
        Parameters:
        startingIndex - starting index
        Returns:
        user custom columns
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns​(int startingIndex,
                                                                   boolean autoincrement)
        Create the required table columns, starting at the provided index
        Parameters:
        startingIndex - starting index
        autoincrement - autoincrement id values
        Returns:
        user custom columns
        Since:
        4.0.0
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns​(int startingIndex,
                                                                   String idColumnName)
        Create the required table columns with id column name, starting at the provided index
        Parameters:
        startingIndex - starting index
        idColumnName - id column name
        Returns:
        user custom columns
      • createRequiredColumns

        public static List<UserCustomColumn> createRequiredColumns​(int startingIndex,
                                                                   String idColumnName,
                                                                   boolean autoincrement)
        Create the required table columns with id column name, starting at the provided index
        Parameters:
        startingIndex - starting index
        idColumnName - id column name
        autoincrement - autoincrement id values
        Returns:
        user custom columns
        Since:
        4.0.0
      • createIdColumn

        public static UserCustomColumn createIdColumn​(String idColumnName)
        Create the primary key id column
        Parameters:
        idColumnName - id column name
        Returns:
        id column
        Since:
        3.3.0
      • createIdColumn

        public static UserCustomColumn createIdColumn​(String idColumnName,
                                                      boolean autoincrement)
        Create the primary key id column
        Parameters:
        idColumnName - id column name
        autoincrement - autoincrement id values
        Returns:
        id column
        Since:
        4.0.0
      • createIdColumn

        public static UserCustomColumn createIdColumn​(int index,
                                                      String idColumnName)
        Create the primary key id column
        Parameters:
        index - column index
        idColumnName - id column name
        Returns:
        id column
      • createIdColumn

        public static UserCustomColumn createIdColumn​(int index,
                                                      String idColumnName,
                                                      boolean autoincrement)
        Create the primary key id column
        Parameters:
        index - column index
        idColumnName - id column name
        autoincrement - autoincrement id values
        Returns:
        id column
        Since:
        4.0.0
      • createDataColumn

        public static UserCustomColumn createDataColumn()
        Create a data column
        Returns:
        data column
        Since:
        3.3.0
      • createDataColumn

        public static UserCustomColumn createDataColumn​(int index)
        Create a data column
        Parameters:
        index - column index
        Returns:
        data column
      • createContentTypeColumn

        public static UserCustomColumn createContentTypeColumn()
        Create a content type column
        Returns:
        content type column
        Since:
        3.3.0
      • createContentTypeColumn

        public static UserCustomColumn createContentTypeColumn​(int index)
        Create a content type column
        Parameters:
        index - column index
        Returns:
        content type column
      • numRequiredColumns

        public static int numRequiredColumns()
        Get the number of required columns
        Returns:
        required columns count
      • requiredColumns

        public static List<String> requiredColumns()
        Get the required columns
        Returns:
        required columns
      • requiredColumns

        public static List<String> requiredColumns​(String idColumnName)
        Get the required columns
        Parameters:
        idColumnName - id column name
        Returns:
        required columns
      • getIdColumnIndex

        public int getIdColumnIndex()
        Get the id column index
        Returns:
        id column index
      • getIdColumn

        public UserCustomColumn getIdColumn()
        Get the id column
        Returns:
        id column
      • getDataColumnIndex

        public int getDataColumnIndex()
        Get the data column index
        Returns:
        data column index
      • getDataColumn

        public UserCustomColumn getDataColumn()
        Get the data column
        Returns:
        data column
      • getContentTypeColumnIndex

        public int getContentTypeColumnIndex()
        Get the content type column index
        Returns:
        content type column index
      • getContentTypeColumn

        public UserCustomColumn getContentTypeColumn()
        Get the content type column
        Returns:
        content type column