Class SessionResult
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.session.SessionResult
-
- Direct Known Subclasses:
CartResult
,ClickHistory
@MappedSuperclass public abstract class SessionResult extends Object
Search result base class when used in a session context- Since:
- 12.5
-
-
Field Summary
Fields Modifier and Type Field Description private String
collection
private String
indexUrl
URI of the result in the indexstatic int
MAX_LEN_METADATA
Size of the column holding metadata fieldsstatic int
MAX_LEN_SUMMARY
Size of the column holding the summaryprivate @NonNull String
summary
Summary of the results biased towards the query that generated this resultprivate @NonNull String
title
Title of the resultprivate String
userId
ID of the user who clicked on the result
-
Constructor Summary
Constructors Constructor Description SessionResult()
SessionResult(String userId, String collection, String indexUrl, @NonNull String title, @NonNull String summary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCollection()
URI
getIndexUrl()
@NonNull String
getSummary()
Summary of the results biased towards the query that generated this result@NonNull String
getTitle()
Title of the resultString
getUserId()
ID of the user who clicked on the resultprotected void
prePersist()
Truncate summary to maximum size allowed in the database before saving to databasevoid
setCollection(String collection)
void
setIndexUrl(URI uri)
void
setSummary(@NonNull String summary)
Summary of the results biased towards the query that generated this resultvoid
setTitle(@NonNull String title)
Title of the resultvoid
setUserId(String userId)
ID of the user who clicked on the resultString
toString()
-
-
-
Field Detail
-
MAX_LEN_SUMMARY
public static final int MAX_LEN_SUMMARY
Size of the column holding the summary- See Also:
- Constant Field Values
-
MAX_LEN_METADATA
public static final int MAX_LEN_METADATA
Size of the column holding metadata fields- See Also:
- Constant Field Values
-
userId
private String userId
ID of the user who clicked on the result
-
collection
private String collection
-
indexUrl
private String indexUrl
URI of the result in the index
-
title
@NonNull private @NonNull String title
Title of the result
-
summary
@NonNull private @NonNull String summary
Summary of the results biased towards the query that generated this result
-
-
Method Detail
-
getIndexUrl
public URI getIndexUrl()
- Returns:
- URI of the result in the index
-
setIndexUrl
public void setIndexUrl(URI uri)
- Parameters:
uri
- Sets the URI of the result in the index
-
prePersist
protected void prePersist()
Truncate summary to maximum size allowed in the database before saving to database
-
getUserId
public String getUserId()
ID of the user who clicked on the result
-
setUserId
public void setUserId(String userId)
ID of the user who clicked on the result
-
getCollection
public String getCollection()
-
setCollection
public void setCollection(String collection)
-
getTitle
@NonNull public @NonNull String getTitle()
Title of the result
-
setTitle
public void setTitle(@NonNull @NonNull String title)
Title of the result
-
getSummary
@NonNull public @NonNull String getSummary()
Summary of the results biased towards the query that generated this result
-
setSummary
public void setSummary(@NonNull @NonNull String summary)
Summary of the results biased towards the query that generated this result
-
-