Enum Class TableNature

java.lang.Object
java.lang.Enum<TableNature>
de.calamanari.adl.sql.config.TableNature
All Implemented Interfaces:
Serializable, Comparable<TableNature>, Constable

public enum TableNature extends Enum<TableNature> implements Serializable
The TableNature is a crucial information for the query building process. Based on this information the system will decide if and how joins must be created or if additional existence checks are required or not.
Author:
Karl Eilebrecht
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Table contains all IDs.
    Table contains all IDs, and it contains sparse data (treat columns independently).
    Table contains all IDs, each ID appears once and once-only.
    Table does usually not contain all IDs but only a subset (this is the default).
    Table does usually not contain all IDs but only a subset, and it contains sparse data (treat columns independently).
    Table does usually not contain all IDs but only a subset, each ID appears only once (if at all).
    Table contains all IDs and is marked as primary table (to start selections)
    Table contains all IDs, and it contains sparse data (treat columns independently), and it is marked as primary table (to start selections)
    Table contains all IDs, each ID appears once and once-only.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tells the system that every record is listed in this table.
    boolean
    Tells the system that in this table there cannot exist multiple rows for the same record (ID)
    boolean
    Tells that this table should be used as the primary table of a setup, means the table to start the base selection on before joining any other table.
    boolean
     
    Returns the enum constant of this class with the specified name.
    static TableNature[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PRIMARY

      public static final TableNature PRIMARY
      Table contains all IDs and is marked as primary table (to start selections)
      See Also:
    • PRIMARY_SPARSE

      public static final TableNature PRIMARY_SPARSE
      Table contains all IDs, and it contains sparse data (treat columns independently), and it is marked as primary table (to start selections)
      See Also:
    • PRIMARY_UNIQUE

      public static final TableNature PRIMARY_UNIQUE
      Table contains all IDs, each ID appears once and once-only. The table is marked as primary table (to start selections).
      See Also:
    • ALL_IDS

      public static final TableNature ALL_IDS
      Table contains all IDs.
    • ALL_IDS_SPARSE

      public static final TableNature ALL_IDS_SPARSE
      Table contains all IDs, and it contains sparse data (treat columns independently).
    • ALL_IDS_UNIQUE

      public static final TableNature ALL_IDS_UNIQUE
      Table contains all IDs, each ID appears once and once-only.
    • ID_SUBSET

      public static final TableNature ID_SUBSET
      Table does usually not contain all IDs but only a subset (this is the default).
    • ID_SUBSET_SPARSE

      public static final TableNature ID_SUBSET_SPARSE
      Table does usually not contain all IDs but only a subset, and it contains sparse data (treat columns independently).
    • ID_SUBSET_UNIQUE

      public static final TableNature ID_SUBSET_UNIQUE
      Table does usually not contain all IDs but only a subset, each ID appears only once (if at all).
  • Method Details

    • values

      public static TableNature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TableNature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • containsAllIds

      public boolean containsAllIds()
      Tells the system that every record is listed in this table. This allows the query builder to start a query on this table before joining any other tables. In other words: it cannot happen that any valid record has no entry in this table.
      Returns:
      true if this table has an entry for every record in the database, so it can be used to start a selection
    • isPrimaryTable

      public boolean isPrimaryTable()
      Tells that this table should be used as the primary table of a setup, means the table to start the base selection on before joining any other table. This only works if all possible records are present in this table.

      If this method returns true, then containsAllIds() also must return true.

      Returns:
      true if this table has been configured as the primary table, preferred to start the selection with
    • isSparse

      public boolean isSparse()
      Returns:
      true if the table contains sparse data
      See Also:
    • isIdUnique

      public boolean isIdUnique()
      Tells the system that in this table there cannot exist multiple rows for the same record (ID)
      Returns:
      true if the same record (ID) can only appear once in this table