primaryKey
boolean primaryKey()
- Returns:
- true if this key represents a primary key for an entity, note that this is true for empty keys representing entities without a defined primary key
<T> Column<T>column()Collection<Column<?>>columns()EntityDefinition.PrimaryKey.columns() via EntityDefinition.primaryKey().Entity.Key.Builder instance, initialized with the values in this key.<T> Tget()<T> TbooleanbooleanbooleanisNull()boolean<T> Optional<T>optional()Optional.<T> Optional<T>booleanEntityDefinition.PrimaryKey.columns() via EntityDefinition.primaryKey().column - the columncolumn - the columnT - the column typeIllegalStateException - in case this is a composite keyNoSuchElementException - in case this key contains no valuesT - the value typeIllegalStateException - in case this is a composite keyNoSuchElementException - in case this key contains no valuesOptional. Note that this method throws an exception if this key is a composite key.T - the value typeOptional, useful for single attribute keysIllegalStateException - in case this is a composite keyNoSuchElementException - in case this key contains no valuesT - the value typecolumn - the columnIllegalArgumentException - in case this column is not part of this keyT - the value typecolumn - the columnOptionalIllegalArgumentException - in case this column is not part of this keyEntity.Key.Builder instance, initialized with the values in this key.