Showing
1 changed file
with
46 additions
and
0 deletions
1 | +package org.legrog.entities; | ||
2 | + | ||
3 | +import org.apache.solr.client.solrj.beans.Field; | ||
4 | +import javax.persistence.Id; | ||
5 | +import javax.persistence.Lob; | ||
6 | + | ||
7 | +/** | ||
8 | + * Simplified class for searching indexed Accounts | ||
9 | + */ | ||
10 | +public class IndexedAccount { | ||
11 | + @Id | ||
12 | + @Field | ||
13 | + private Integer userId; | ||
14 | + @Lob | ||
15 | + @Field | ||
16 | + private String presentation; | ||
17 | + | ||
18 | + /** | ||
19 | + * | ||
20 | + * @param account Account to be simplified as IndexedAccount | ||
21 | + */ | ||
22 | + public IndexedAccount(Account account) { | ||
23 | + this.userId = account.getUserId(); | ||
24 | + this.presentation = account.getPresentation(); | ||
25 | + } | ||
26 | + | ||
27 | + public IndexedAccount() { | ||
28 | + | ||
29 | + } | ||
30 | + | ||
31 | + public Integer getUserId() { | ||
32 | + return userId; | ||
33 | + } | ||
34 | + | ||
35 | + public void setUserId(Integer userId) { | ||
36 | + this.userId = userId; | ||
37 | + } | ||
38 | + | ||
39 | + public String getPresentation() { | ||
40 | + return presentation; | ||
41 | + } | ||
42 | + | ||
43 | + public void setPresentation(String presentation) { | ||
44 | + this.presentation = presentation; | ||
45 | + } | ||
46 | +} |
-
Please register or login to post a comment