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.Date
addedDate
Date when the result was added to the cartprivate java.lang.String
collectionIdForIndexUrl
The name of the collection the indexUrl came from.private java.util.Map<java.lang.String,java.lang.String>
metaData
Metadata values for the resultstatic java.lang.String
TABLE_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 CartResultDBModel
fromResult(java.lang.String searchedCollection, CartResult cartResult)
Builds aCartResultDBModel
from aResult
java.util.Date
getAddedDate()
Date when the result was added to the cartjava.lang.String
getCollectionIdForIndexUrl()
The name of the collection the indexUrl came from.java.util.Map<java.lang.String,java.lang.String>
getMetaData()
Metadata values for the resultprotected void
prePersist()
Truncate metadata to maximum size allowed in the database before saving to databasevoid
setAddedDate(java.util.Date addedDate)
Date when the result was added to the cartvoid
setCollectionIdForIndexUrl(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 aCartResultDBModel
from aResult
- Parameters:
searchedCollection
- the collection (possible meta collection) on which the search. May not match the collection within rr
-Result
to build from- Returns:
- A
CartResultDBModel
-
prePersist
protected void prePersist()
Truncate metadata to maximum size allowed in the database before saving to database- Overrides:
prePersist
in 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
-
-