org.infinispan.query.impl.externalizers.LuceneWildcardQueryExternalizer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-embedded-query
Show all versions of infinispan-embedded-query
Infinispan Embedded Query All-in-One module
The newest version!
package org.infinispan.query.impl.externalizers;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collections;
import java.util.Set;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.WildcardQuery;
import org.infinispan.commons.marshall.AdvancedExternalizer;
/**
* @since 9.1
*/
public class LuceneWildcardQueryExternalizer implements AdvancedExternalizer {
@Override
public Set> getTypeClasses() {
return Collections.singleton(WildcardQuery.class);
}
@Override
public Integer getId() {
return ExternalizerIds.LUCENE_QUERY_WILDCARD;
}
@Override
public void writeObject(ObjectOutput output, WildcardQuery wildcardQuery) throws IOException {
output.writeObject(wildcardQuery.getTerm());
}
@Override
public WildcardQuery readObject(ObjectInput input) throws IOException, ClassNotFoundException {
return new WildcardQuery((Term) input.readObject());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy