PersistentDataTypes

The PersistentDataTypes object provides pre-defined and utility methods for working with different kinds of PersistentDataType instances, enabling seamless conversion and mapping between primitive and complex data types. This can be used for data serialization, storage, and retrieval operations.

Native Types

Includes standard primitive types like STRING, LONG, INT, etc., directly mapped to their native PersistentDataType representation.

Custom Types

Declares a variety of complex data types such as UUID, DURATION, BIG_DECIMAL, and more, which extend the functionality of the native types for more specific use cases.

Utility Methods

Provides utility functions to create PersistentDataType combinations like LIST, SET, MAP, ENUM, NULLABLE, PAIR, and TRIPLE for advanced serialization use cases.

Example highlights of functionality:

  • Representing collections like lists, sets, and maps, with explicit support for type-safe conversions.

  • Supporting nullable values and enum types for advanced persistence.

Each utility method allows for a custom PersistentDataType to be specified for handling nested conversions.

Author

Fantamomo

Since

1.0-SNAPSHOT

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <E : Enum<E>> ENUM(clazz: KClass<E> = E::class): EnumPersistentDataType<E>
Link copied to clipboard
inline operator fun <P : Any, C : Any> invoke(action: PersistentDataTypes.() -> PersistentDataType<P, C>): PersistentDataType<P, C>
Link copied to clipboard
Link copied to clipboard
inline fun <KP : Any, KC : Any, VP : Any, VC : Any> MAP(keyType: PersistentDataType<KP, KC>, valueType: PersistentDataType<VP, VC>): MapPersistentDataType<KP, KC, VP, VC>
Link copied to clipboard
Link copied to clipboard
inline fun <FP : Any, FC : Any, SP : Any, SC : Any> PAIR(firstType: PersistentDataType<FP, FC>, secondType: PersistentDataType<SP, SC>): PairPersistentDataType<FP, FC, SP, SC>
Link copied to clipboard
Link copied to clipboard
inline fun <FP : Any, FC : Any, SP : Any, SC : Any, TP : Any, TC : Any> TRIPLE(firstType: PersistentDataType<FP, FC>, secondType: PersistentDataType<SP, SC>, thirdType: PersistentDataType<TP, TC>): TriplePersistentDataType<FP, FC, SP, SC, TP, TC>