Class CartResultDBModel
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.session.SessionResult
-
- com.funnelback.publicui.search.model.transaction.session.CartResultDBModel
-
@Entity(name="CartResult") public class CartResultDBModel extends SessionResult
A result in a results cart- Since:
- 12.5
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.DateaddedDateDate when the result was added to the cartprivate java.lang.StringcollectionIdForIndexUrlThe name of the collection the indexUrl came from.private java.util.Map<java.lang.String,java.lang.String>metaDataMetadata values for the resultstatic java.lang.StringTABLE_NAME-
Fields inherited from class com.funnelback.publicui.search.model.transaction.session.SessionResult
MAX_LEN_METADATA, MAX_LEN_SUMMARY
-
-
Constructor Summary
Constructors Constructor Description CartResultDBModel()CartResultDBModel(java.lang.String userId, java.lang.String collection, java.lang.String indexUrl, java.lang.String title, java.lang.String summary, java.util.Date addedDate, java.lang.String collectionIdForIndexUrl, java.util.Map<java.lang.String,java.lang.String> metadata)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CartResultDBModelfromResult(java.lang.String searchedCollection, CartResult cartResult)Builds aCartResultDBModelfrom aResultjava.util.DategetAddedDate()Date when the result was added to the cartjava.lang.StringgetCollectionIdForIndexUrl()The name of the collection the indexUrl came from.java.util.Map<java.lang.String,java.lang.String>getMetaData()Metadata values for the resultprotected voidprePersist()Truncate metadata to maximum size allowed in the database before saving to databasevoidsetAddedDate(java.util.Date addedDate)Date when the result was added to the cartvoidsetCollectionIdForIndexUrl(java.lang.String collectionIdForIndexUrl)The name of the collection the indexUrl came from.-
Methods inherited from class com.funnelback.publicui.search.model.transaction.session.SessionResult
getCollection, getIndexUrl, getSummary, getTitle, getUserId, setCollection, setIndexUrl, setSummary, setTitle, setUserId, toString
-
-
-
-
Field Detail
-
TABLE_NAME
public static final java.lang.String TABLE_NAME
- See Also:
- Constant Field Values
-
addedDate
private java.util.Date addedDate
Date when the result was added to the cart
-
collectionIdForIndexUrl
private java.lang.String collectionIdForIndexUrl
The name of the collection the indexUrl came from.
-
metaData
private final java.util.Map<java.lang.String,java.lang.String> metaData
Metadata values for the result
-
-
Constructor Detail
-
CartResultDBModel
public CartResultDBModel(java.lang.String userId, java.lang.String collection, java.lang.String indexUrl, java.lang.String title, java.lang.String summary, java.util.Date addedDate, java.lang.String collectionIdForIndexUrl, java.util.Map<java.lang.String,java.lang.String> metadata)
-
CartResultDBModel
public CartResultDBModel()
-
-
Method Detail
-
fromResult
public static CartResultDBModel fromResult(java.lang.String searchedCollection, CartResult cartResult)
Builds aCartResultDBModelfrom aResult- Parameters:
searchedCollection- the collection (possible meta collection) on which the search. May not match the collection within rr-Resultto build from- Returns:
- A
CartResultDBModel
-
prePersist
protected void prePersist()
Truncate metadata to maximum size allowed in the database before saving to database- Overrides:
prePersistin classSessionResult
-
getAddedDate
public java.util.Date getAddedDate()
Date when the result was added to the cart
-
setAddedDate
public void setAddedDate(java.util.Date addedDate)
Date when the result was added to the cart
-
getCollectionIdForIndexUrl
public java.lang.String getCollectionIdForIndexUrl()
The name of the collection the indexUrl came from.
-
setCollectionIdForIndexUrl
public void setCollectionIdForIndexUrl(java.lang.String collectionIdForIndexUrl)
The name of the collection the indexUrl came from.
-
getMetaData
public java.util.Map<java.lang.String,java.lang.String> getMetaData()
Metadata values for the result
-
-