Class SimpleAttributesTable


  • public class SimpleAttributesTable
    extends UserRelatedTable
    Simple Attributes 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 Simple Attributes Table relation name
    • Constructor Detail

      • SimpleAttributesTable

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

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

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

      • create

        public static SimpleAttributesTable create​(SimpleAttributesTableMetadata metadata)
        Create a simple attributes table with the metadata
        Parameters:
        metadata - simple attributes table metadata
        Returns:
        simple attributes 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
      • 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
      • isSimple

        public static boolean isSimple​(UserColumn column)
        Determine if the column is a non nullable simple type: TEXT, INTEGER, or REAL
        Parameters:
        column - user column
        Returns:
        true if a simple column
      • isSimple

        public static boolean isSimple​(GeoPackageDataType dataType)
        Determine if the data type is a simple type: TEXT, INTEGER, or REAL storage classes
        Parameters:
        dataType - data type
        Returns:
        true if a simple column