public class CustomSearchServiceHandler extends Object
| Constructor and Description |
|---|
CustomSearchServiceHandler() |
| Modifier and Type | Method and Description |
|---|---|
static Integer |
countAllPublished()
Count all published offers for all organisations
|
static Integer |
countAllPublished(long orgId)
Count all published offers for a given organisations
|
static int |
countByCategoriyId(Long[] catId)
Count all published offers that match a list of categories
|
static int |
countByItemId(String[] itemIds)
Count all published offers that match a list of item IDs (subcategories)
|
static Integer |
countByOfferTypes(E_OfferType[] types)
Count all published offers that match a list of E_OfferType
|
static Integer |
countByTypesAndItemsAndOrg(String types,
String items,
long orgId,
Float lat,
Float lon,
Integer dist)
Count all published offers that match a list of types, items and a specified organisation ID
|
static List<AHOffer> |
getLatestPublishedOffers(int size) |
static List<AHOffer> |
searchAllPublished(int from,
int to)
Search all published offers for the given indices
|
static List<AHOffer> |
searchAllPublished(int from,
int to,
long orgId)
Search all published offers for the given indices and organisation ID
|
static List<AHOffer> |
searchByCategoriyId(Long[] catId,
int from,
int to)
Search all published offers for the given indices and category IDs
|
static List<AHOffer> |
searchByItemId(String[] itemIds,
int from,
int to)
Search all published offers for the given indices and item IDs
|
static List<AHOffer> |
searchByOfferTypes(E_OfferType[] types,
int from,
int to)
Search all published offers for the given indices and offer types
|
static List<AHOffer> |
searchByTypesAndItemsAndOrg(String types,
String items,
long orgId,
int from,
int to,
Float lat,
Float lon,
Integer dist)
Search all published offers for the given indices, a list of types, a list of items and the given organisation ID
|
static Long[] |
strToLongArr(String str)
Converts a comma-separated string-representation of a list of numbers to an array
|
public static Integer countAllPublished()
public static Integer countAllPublished(long orgId)
orgId - the organisation IDpublic static int countByCategoriyId(Long[] catId)
catId - a list of categoriy IDspublic static int countByItemId(String[] itemIds)
itemIds - a list of item IDspublic static Integer countByOfferTypes(E_OfferType[] types)
types - a list of types (E_OfferType)public static Integer countByTypesAndItemsAndOrg(String types, String items, long orgId, Float lat, Float lon, Integer dist)
types - a list of E_OfferType as comma-separated string (or null)items - a list of items as comma-separated string (or null)orgId - an organisation ID (or -1)public static List<AHOffer> searchAllPublished(int from, int to)
from - start indexto - end indexpublic static List<AHOffer> searchAllPublished(int from, int to, long orgId)
from - start indexto - end indexorgId - the organisation IDpublic static List<AHOffer> searchByCategoriyId(Long[] catId, int from, int to)
catId - a list of category IDsfrom - start indexto - end indexpublic static List<AHOffer> searchByItemId(String[] itemIds, int from, int to)
itemIds - a list of item IDs as stringsfrom - start indexto - end indexpublic static List<AHOffer> searchByOfferTypes(E_OfferType[] types, int from, int to)
types - an array of types to search forfrom - start indexto - end indexpublic static List<AHOffer> searchByTypesAndItemsAndOrg(String types, String items, long orgId, int from, int to, Float lat, Float lon, Integer dist)
types - string representation of a list of E_OfferType separated by comma, or null if not requireditems - string representation of a list of item IDs separated by comma, or null if not requiredorgId - an organisation ID or -1, if not requiredfrom - start indexto - end indexCopyright © 2016 Fraunhofer FOKUS. All rights reserved.