Enum KastRowKind
- java.lang.Object
-
- java.lang.Enum<KastRowKind>
-
- io.github.kaststream.api.v2.facade.KastRowKind
-
- All Implemented Interfaces:
Serializable,Comparable<KastRowKind>
public enum KastRowKind extends Enum<KastRowKind>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DELETEDeletion operation.INSERTInsertion operation.UPDATE_AFTERUpdate operation with new content of the updated row.UPDATE_BEFOREUpdate operation with the previous content of the updated row.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KastRowKindfromByteValue(byte value)Creates aKastRowKindfrom the given byte value.StringshortString()Returns a short string representation of thisKastRowKind.bytetoByteValue()Returns the byte value representation of thisKastRowKind.static KastRowKindvalueOf(String name)Returns the enum constant of this type with the specified name.static KastRowKind[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSERT
public static final KastRowKind INSERT
Insertion operation.
-
UPDATE_BEFORE
public static final KastRowKind UPDATE_BEFORE
Update operation with the previous content of the updated row.This kind SHOULD occur together with
UPDATE_AFTERfor modelling an update that needs to retract the previous row first. It is useful in cases of a non-idempotent update, i.e., an update of a row that is not uniquely identifiable by a key.
-
UPDATE_AFTER
public static final KastRowKind UPDATE_AFTER
Update operation with new content of the updated row.This kind CAN occur together with
UPDATE_BEFOREfor modelling an update that needs to retract the previous row first. OR it describes an idempotent update, i.e., an update of a row that is uniquely identifiable by a key.
-
DELETE
public static final KastRowKind DELETE
Deletion operation.
-
-
Method Detail
-
values
public static KastRowKind[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KastRowKind c : KastRowKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KastRowKind valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
shortString
public String shortString()
Returns a short string representation of thisKastRowKind.- "+I" represents
INSERT. - "-U" represents
UPDATE_BEFORE. - "+U" represents
UPDATE_AFTER. - "-D" represents
DELETE.
- "+I" represents
-
toByteValue
public byte toByteValue()
Returns the byte value representation of thisKastRowKind. The byte value is used for serialization and deserialization.- "0" represents
INSERT. - "1" represents
UPDATE_BEFORE. - "2" represents
UPDATE_AFTER. - "3" represents
DELETE.
- "0" represents
-
fromByteValue
public static KastRowKind fromByteValue(byte value)
Creates aKastRowKindfrom the given byte value. EachKastRowKindhas a byte value representation.- See Also:
for mapping of byte value and .
-
-