Class SessionResult

  • Direct Known Subclasses:
    CartResult, CartResultDBModel, ClickHistory

    @MappedSuperclass
    public abstract class SessionResult
    extends java.lang.Object
    Search result base class when used in a session context
    Since:
    12.5
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String collection  
      private java.lang.String indexUrl
      URI of the result in the index
      static int MAX_LEN_METADATA
      Size of the column holding metadata fields
      static int MAX_LEN_SUMMARY
      Size of the column holding the summary
      private java.lang.String summary
      Summary of the results biased towards the query that generated this result
      private java.lang.String title
      Title of the result
      private java.lang.String userId
      ID of the user who clicked on the result
    • Constructor Summary

      Constructors 
      Constructor Description
      SessionResult()  
      SessionResult​(java.lang.String userId, java.lang.String collection, java.lang.String indexUrl, java.lang.String title, java.lang.String summary)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCollection()  
      java.net.URI getIndexUrl()  
      java.lang.String getSummary()
      Summary of the results biased towards the query that generated this result
      java.lang.String getTitle()
      Title of the result
      java.lang.String getUserId()
      ID of the user who clicked on the result
      protected void prePersist()
      Truncate summary to maximum size allowed in the database before saving to database
      void setCollection​(java.lang.String collection)  
      void setIndexUrl​(java.net.URI uri)  
      void setSummary​(java.lang.String summary)
      Summary of the results biased towards the query that generated this result
      void setTitle​(java.lang.String title)
      Title of the result
      void setUserId​(java.lang.String userId)
      ID of the user who clicked on the result
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 java.lang.String userId
        ID of the user who clicked on the result
      • collection

        private java.lang.String collection
      • indexUrl

        private java.lang.String indexUrl
        URI of the result in the index
      • title

        @NonNull
        private java.lang.String title
        Title of the result
      • summary

        @NonNull
        private java.lang.String summary
        Summary of the results biased towards the query that generated this result
    • Constructor Detail

      • SessionResult

        public SessionResult()
      • SessionResult

        public SessionResult​(java.lang.String userId,
                             java.lang.String collection,
                             java.lang.String indexUrl,
                             @NonNull
                             java.lang.String title,
                             @NonNull
                             java.lang.String summary)
    • Method Detail

      • getIndexUrl

        public java.net.URI getIndexUrl()
        Returns:
        URI of the result in the index
      • setIndexUrl

        public void setIndexUrl​(java.net.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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getUserId

        public java.lang.String getUserId()
        ID of the user who clicked on the result
      • setUserId

        public void setUserId​(java.lang.String userId)
        ID of the user who clicked on the result
      • getCollection

        public java.lang.String getCollection()
      • setCollection

        public void setCollection​(java.lang.String collection)
      • getTitle

        @NonNull
        public java.lang.String getTitle()
        Title of the result
      • setTitle

        public void setTitle​(@NonNull
                             java.lang.String title)
        Title of the result
      • getSummary

        @NonNull
        public java.lang.String getSummary()
        Summary of the results biased towards the query that generated this result
      • setSummary

        public void setSummary​(@NonNull
                               java.lang.String summary)
        Summary of the results biased towards the query that generated this result