se.l4.silo.structured.StructuredEntity Maven / Gradle / Ivy
The newest version!
package se.l4.silo.structured;
import java.util.function.Function;
import se.l4.commons.serialization.Serializer;
import se.l4.commons.serialization.SerializerCollection;
import se.l4.commons.serialization.format.StreamingInput;
import se.l4.silo.DeleteResult;
import se.l4.silo.Entity;
import se.l4.silo.FetchResult;
import se.l4.silo.StoreResult;
import se.l4.silo.query.Query;
import se.l4.silo.query.QueryType;
/**
* Entity for storing structured data. Anything that can be represented as
* a {@link StreamingInput} is considered structured data.
*
* @author Andreas Holstenson
*
*/
public interface StructuredEntity
extends Entity
{
/**
* Get data stored for the given identifier.
*
* @param id
* @return
*/
FetchResult get(Object id);
/**
* Store new data and associate it with the given identifier.
*
* @param id
* @param out
* @return
*/
StoreResult store(Object id, StreamingInput out);
/**
* Delete data associated with the given identifier.
*
* @param id
* @return
*/
DeleteResult delete(Object id);
/**
* Query the the query engine.
*
* @param index
* @return
*/
© 2015 - 2025 Weber Informatics LLC | Privacy Policy