All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.indexes.serialization.spi.Serializer Maven / Gradle / Ivy

There is a newer version: 5.11.12.Final
Show newest version
/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.indexes.serialization.spi;

import java.util.List;
import java.util.Map;

import org.apache.lucene.index.IndexableField;
import org.hibernate.search.backend.LuceneWork;
import org.hibernate.search.backend.spi.DeletionQuery;

/**
 * Contract between Hibernate Search and the Serialization mechanism.
 * Step in building the specific structures are represented by a method.
 *
 * LuceneWorkSerializer controls the LuceneWork traversal flow.
 *
 * @author Emmanuel Bernard
 */
public interface Serializer {

	void luceneWorks(List works);

	void addOptimizeAll();

	void addFlush();

	void addPurgeAll(String entityClassName);

	void addIdSerializedInJava(byte[] id);

	void addIdAsInteger(int id);

	void addIdAsLong(long id);

	void addIdAsFloat(float id);

	void addIdAsDouble(double id);

	void addIdAsString(String id);

	void addDelete(String entityClassName);

	void addDeleteByQuery(String entityClassName, DeletionQuery deletionQuery);

	void addAdd(String entityClassName, Map fieldToAnalyzerMap);

	void addUpdate(String entityClassName, Map fieldToAnalyzerMap);

	byte[] serialize();

	void fields(List fields);

	void addIntNumericField(int value, LuceneNumericFieldContext context);

	void addLongNumericField(long value, LuceneNumericFieldContext context);

	void addFloatNumericField(float value, LuceneNumericFieldContext context);

	void addDoubleNumericField(double value, LuceneNumericFieldContext context);

	void addFieldWithBinaryData(LuceneFieldContext luceneFieldContext);

	void addFieldWithStringData(LuceneFieldContext luceneFieldContext);

	void addFieldWithTokenStreamData(LuceneFieldContext luceneFieldContext);

	void addFieldWithSerializableReaderData(LuceneFieldContext luceneFieldContext);

	void addFieldWithSerializableFieldable(byte[] fieldable);

	void addDocValuesFieldWithBinaryValue(LuceneFieldContext luceneFieldContext);

	void addDocValuesFieldWithNumericValue(long value, LuceneFieldContext luceneFieldContext);

	void addDocument();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy