OperationType


public enum OperationType extends Enum


Describes the type of database operation a DaoReturnTypeConverter function supports.

A converter function defines the operation type it supports to provide distinct logic between READ (Query) versus WRITE (Insert, Update, Delete, and Upsert) operations.

Note that INSERT, UPDATE, and DELETE statements executed within a Query annotation are also considered write operations.

If a converter function is used for a write operation, its return type's parameterized types are limited to those supported by Room's write operations.

Summary

Enum Values

READ
WRITE

Public methods

final @NonNull EnumEntries<@NonNull OperationType>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

final @NonNull OperationType

Returns the enum constant of this type with the specified name.

final @NonNull OperationType[]

Returns an array containing the constants of this enum type, in the order they're declared.

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull OperationTypegetEntries()

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.

valueOf

Added in 3.0.0-alpha01
public final @NonNull OperationType valueOf(@NonNull String value)

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.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 3.0.0-alpha01
public final @NonNull OperationType[] values()

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.