IndexedPublisher.java
991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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();
}
public int getPublisherId() {
return publisherId;
}
public String getPublisherName() {
return publisherName;
}
public String getPublisherHistory() {
return publisherHistory;
}
}