StorageConverter

public abstract class StorageConverter<I, E extends Entity<I, S>, S extends EntityState> implements Serializable

An abstract base for converters of entities into EntityRecord.

Constructors

Link copied to clipboard
protected void StorageConverter(TypeUrl entityStateType, EntityFactory<E> factory, FieldMask fieldMask)

Functions

Link copied to clipboard
protected E doBackward(EntityRecord entityRecord)
Link copied to clipboard
protected EntityRecord doForward(E entity)
Link copied to clipboard
Obtains the entity factory used by the converter.
Link copied to clipboard
protected TypeUrl entityStateType()
Obtains the type URL of the state of entities which this converter builds.
Link copied to clipboard
public boolean equals(Object obj)
Link copied to clipboard
protected FieldMask fieldMask()
Obtains the field mask used by this converter to trim the state of entities before the state is injected into entities.
Link copied to clipboard
public int hashCode()
Link copied to clipboard
protected abstract void injectState(E entity, S state, EntityRecord entityRecord)
Derived classes must implement providing state injection into the passed entity.
Link copied to clipboard
protected void updateBuilder(Builder builder, E entity)
Derived classes may override to additionally tune the passed entity builder.
Link copied to clipboard
public abstract StorageConverter<I, E, S> withFieldMask(FieldMask fieldMask)
Creates a copy of this converter modified with the passed filed mask.