Package de.calamanari.adl.sql.config
Enum Class TableNature
- All Implemented Interfaces:
Serializable,Comparable<TableNature>,Constable
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 ConstantsEnum ConstantDescriptionTable 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 TypeMethodDescriptionbooleanTells the system that every record is listed in this table.booleanTells the system that in this table there cannot exist multiple rows for the same record (ID)booleanTells 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.booleanisSparse()static TableNatureReturns the enum constant of this class with the specified name.static TableNature[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRIMARY
Table contains all IDs and is marked as primary table (to start selections)- See Also:
-
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
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
Table contains all IDs. -
ALL_IDS_SPARSE
Table contains all IDs, and it contains sparse data (treat columns independently). -
ALL_IDS_UNIQUE
Table contains all IDs, each ID appears once and once-only. -
ID_SUBSET
Table does usually not contain all IDs but only a subset (this is the default). -
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
Table does usually not contain all IDs but only a subset, each ID appears only once (if at all).
-
-
Method Details
-
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
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 nameNullPointerException- 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
-