Class 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 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
    • Constructor Detail

      • SessionResult

        public SessionResult()
      • SessionResult

        public SessionResult​(String userId,
                             String collection,
                             String indexUrl,
                             @NonNull
                             @NonNull String title,
                             @NonNull
                             @NonNull String summary)
    • 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