IndexedPublisher.java 770 Bytes
package org.legrog.entities;
/*
import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.solr.core.mapping.SolrDocument;
*/
import javax.persistence.Id;
import javax.persistence.Lob;

//@SolrDocument(solrCoreName = "publishers")
public class IndexedPublisher {
    @Id
//    @Field
    private int publisherId;
//    @Field
    private String publisherName;
    @Lob
//    @Field
    private String publisherHistory;

    public IndexedPublisher(Publisher publisher) {
        PublisherVersion publisherVersion = publisher.getValidatedVersion();
        this.publisherId = publisher.getPublisherId();
        this.publisherName = publisherVersion.getPublisherName();
        this.publisherHistory = publisherVersion.getPublisherHistory();
    }
}