public class ProductCategoryLookup<T extends Product> extends AbstractCategoryLookup<T> implements CacheLookups
Product
by using any unique field in it
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.EntityManager |
entityManager |
searchBy, throwExceptionOnNull, type
CONTENT_PUBLISH_CACHE_NAME, PRODUCT_LOOKUP_CACHE_NAME, PRODUCT_SEARCH_CACHE_NAME, TEMPLATEPAGE_MAPPING_CACHE_NAME
Constructor and Description |
---|
ProductCategoryLookup() |
ProductCategoryLookup(javax.persistence.EntityManager entityManager) |
ProductCategoryLookup(ProductService<T> service)
Deprecated.
- Service, Not really used anymore
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
javax.persistence.EntityManager |
getEntityManager() |
ProductService<T> |
getService()
Deprecated.
- Not really used anymore
|
protected T |
query(Object value)
Implementation, to define how to query using the query object
|
void |
setEntityManager(javax.persistence.EntityManager entityManager) |
void |
setService(ProductService<T> service)
Deprecated.
- Not really used anymore
|
Object |
transform(Object in)
For a Given String mnemonic code lookup the Hierarchy of the Category
|
getSearchBy, isThrowExceptionOnNull, setSearchBy, setThrowExceptionOnNull
public ProductCategoryLookup()
public ProductCategoryLookup(javax.persistence.EntityManager entityManager)
public ProductCategoryLookup(ProductService<T> service)
@Cacheable(value="productLookup") public Object transform(Object in)
transform
in interface org.apache.commons.collections.Transformer
transform
in class AbstractCategoryLookup<T extends Product>
in
- as value (some unique key), from which the parent object can be derivedprotected T query(Object value) throws Exception
AbstractCategoryLookup
query
in class AbstractCategoryLookup<T extends Product>
value
- input object (value to search for) on the AbstractCategoryLookup.searchBy
fieldException
Query
@CacheEvict(value="productLookup", allEntries=true) public void clear()
public ProductService<T> getService()
public void setService(ProductService<T> service)
public javax.persistence.EntityManager getEntityManager()
public void setEntityManager(javax.persistence.EntityManager entityManager)
Copyright © 2018. All rights reserved.