AbstractColumnMapping

public abstract class AbstractColumnMapping<R> implements ColumnMapping<R>

The basic implementation of mapping rules for entity columns.

Since entity columns are proto-based and have a limited amount of possible types, this class allows descendants to override concrete type mapping rules in a convenient way.

Some of the types are expected to be mapped in a way so they support the ordering comparison operators ("greater than", "less than or equals", etc.). For details, see io.spine.client.Filters.

Inheritors

Constructors

Link copied to clipboard
public void AbstractColumnMapping()

Functions

Link copied to clipboard
public ColumnTypeMapping<T, ? extends R> of<T>(Class<T> type)
Obtains the mapping rules for the given type.
Link copied to clipboard
protected abstract ColumnTypeMapping<Boolean, ? extends R> ofBoolean()
Returns the mapping rules of Boolean columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<ByteString, ? extends R> ofByteString()
Returns the mapping rules of ByteString columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<Double, ? extends R> ofDouble()
Returns the mapping rules of Double columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<Enum<? extends Object>, ? extends R> ofEnum()
Returns the mapping rules of Enum columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<Float, ? extends R> ofFloat()
Returns the mapping rules of Float columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<Integer, ? extends R> ofInteger()
Returns the mapping rules of Integer columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<Long, ? extends R> ofLong()
Returns the mapping rules of Long columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<Message, ? extends R> ofMessage()
Returns the mapping rules of Message columns.
Link copied to clipboard
protected abstract ColumnTypeMapping<String, ? extends R> ofString()
Returns the mapping rules of String columns.
Link copied to clipboard
protected void setupCustomMapping(Builder<Class<?>, ColumnTypeMapping<?, ? extends R>> builder)
Allows to specify custom mapping rules.
Link copied to clipboard
protected IllegalArgumentException unsupportedType(Class<? extends Object> aClass)
Throws an exception about an unsupported column type.

Inherited functions

Link copied to clipboard
public abstract ColumnTypeMapping<? extends Object, ? extends R> ofNull()
Obtains the mapping rules of null.