Usage

MicroStream's wrapper code generator generates following wrapper type for PersistenceStoring:

public interface WrapperPersistenceStoring 
	extends Wrapper<PersistenceStoring>, PersistenceStoring
{
	@Override
	public default long store(final Object instance)
	{
		return this.wrapped().store(instance);
	}

	@Override
	public default long[] storeAll(final Object... instances)
	{
		return this.wrapped().storeAll(instances);
	}

	@Override
	public default void storeAll(final Iterable<?> instances)
	{
		this.wrapped().storeAll(instances);
	}

	@Override
	public default void storeSelfStoring(final SelfStoring storing)
	{
		this.wrapped().storeSelfStoring(storing);
	}
}

It is not an abstract class, but an interface, which extends the Wrapper interface of the base module, and the wrapped type itself. This offers you the most flexible way to use it in your application.

The Wrapper type is just a typed interface and an abstract implementation of itself.

You can either implement the Wrapper interface and provide the wrapped instance via the wrapped() method, or you can extend the abstract class and hand over the wrapped instance to the super constructor.

Version with the abstract type:

Or only the interface, then you have to provide the wrapped instance via wrapped():

Last updated