public abstract class AbstractMongoDao extends Object
| Constructor and Description |
|---|
AbstractMongoDao() |
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
aggregate(List<org.springframework.data.mongodb.core.aggregation.AggregationOperation> operations,
String collectionName,
Class<T> clazz)
Aggregate list.
|
protected boolean |
appendCount(long pageNo)
Append count boolean.
|
protected Set<String> |
callerExclusions()
Caller exclusions set.
|
<T> PagedResponse<T> |
defaultAggregation(org.springframework.data.mongodb.core.aggregation.AggregationOperation[] operations,
String collectionName,
Class<T> clazz)
Default aggregation paged response.
|
<T> PagedResponse<T> |
defaultAggregation(List<org.springframework.data.mongodb.core.aggregation.AggregationOperation> operations,
String collectionName,
Class<T> clazz)
Default aggregation paged response.
|
protected org.springframework.data.mongodb.core.query.Criteria |
getCriteria()
Gets criteria.
|
protected String |
getDistinctField()
Gets distinct field.
|
protected int |
getMinPageSize()
Gets min page size.
|
protected abstract org.springframework.data.mongodb.core.MongoOperations |
getMongoOperations()
Gets mongo template.
|
protected long |
getPageLimit()
Gets page limit.
|
protected long |
getPageNo()
Gets page no.
|
protected String[] |
getSearchFields()
Gets search fields.
|
protected String |
getSearchText()
Gets search text.
|
protected org.springframework.data.domain.Sort |
getSort()
Gets sort.
|
protected <T> void |
logError(Class<T> clazz,
String caller,
String query,
long millis,
RuntimeException rte)
Log error.
|
protected void |
logSuccess(Class clazz,
String caller,
String script,
int count,
long millis)
Should log boolean.
|
protected abstract org.springframework.data.mongodb.core.MongoOperations getMongoOperations()
public <T> List<T> aggregate(List<org.springframework.data.mongodb.core.aggregation.AggregationOperation> operations, String collectionName, Class<T> clazz)
T - the type parameteroperations - the operationscollectionName - the collection nameclazz - the clazzprotected void logSuccess(Class clazz, String caller, String script, int count, long millis)
clazz - the clazzcaller - the callerscript - the messagecount - the countmillis - the millisprotected <T> void logError(Class<T> clazz, String caller, String query, long millis, RuntimeException rte)
T - the type parameterclazz - the clazzcaller - the callerquery - the querymillis - the millisrte - the rtepublic <T> PagedResponse<T> defaultAggregation(org.springframework.data.mongodb.core.aggregation.AggregationOperation[] operations, String collectionName, Class<T> clazz)
T - the type parameteroperations - the operationscollectionName - the collection nameclazz - the clazzpublic <T> PagedResponse<T> defaultAggregation(List<org.springframework.data.mongodb.core.aggregation.AggregationOperation> operations, String collectionName, Class<T> clazz)
T - the type parameteroperations - the operationscollectionName - the collection nameclazz - the clazzprotected org.springframework.data.domain.Sort getSort()
protected long getPageLimit()
protected long getPageNo()
protected String getDistinctField()
protected boolean appendCount(long pageNo)
pageNo - the page no. This is 1 based.protected int getMinPageSize()
protected org.springframework.data.mongodb.core.query.Criteria getCriteria()
protected String[] getSearchFields()
protected String getSearchText()
Copyright © 2022. All rights reserved.