T - the type parameter@Beta public class DirectEntityDaoImpl<T extends AbstractEntity> extends AbstractEntityDaoImpl<T>
clazz, tenantKey| Modifier | Constructor and Description |
|---|---|
protected |
DirectEntityDaoImpl(AbstractEntityDaoImpl<T> entityDao,
Class<T> clazz,
String tenantKey,
boolean directQuery,
boolean directUpdate)
Instantiates a new Direct entity dao.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCollectionName()
Gets collection name.
|
protected String |
getCreatedByKey()
Get created by key string.
|
protected String |
getCreatedKey()
Get created key string.
|
org.springframework.data.mongodb.core.query.Criteria |
getCriteria()
Gets the
Criteria containing tenantId and deleted filter. |
protected String |
getDeletedKey()
Get deleted key string.
|
protected String |
getEntityId(T entity)
Gets entity id.
|
protected org.springframework.data.mongodb.core.MongoTemplate |
getMongoTemplate()
Gets mongo template.
|
protected Object |
getNow()
Get now object.
|
protected org.springframework.data.mongodb.core.query.Query |
getTenantQuery(org.springframework.data.mongodb.core.query.Query query)
Gets tenant query.
|
protected String |
getUpdatedByKey()
Get updated by key string.
|
protected String |
getUpdatedKey()
Get updated key string.
|
protected String |
getViewedByKey()
Get viewed by key string.
|
protected String |
getViewedKey()
Get viewed key string.
|
protected void |
onFetch(T entity)
Perform any operation after fetching the entity
|
T |
save(T entity)
Save t.
|
protected void |
setEntityId(T entity,
String id)
Sets entity id.
|
protected org.springframework.data.mongodb.core.query.Update |
setValues(org.springframework.data.mongodb.core.query.Update update)
Sets values.
|
aggregation, aggregation, bulkOperations, count, deleteById, distinct, ensureIndex, findAll, findAll, findAll, findAll, findAndModify, findAndRemove, findAndReplace, findById, findById, findOne, findOne, getIdQuery, getMatchOperation, getTenantId, insert, insert, modifyAndFind, onInsert, onUpdate, onUpdate, removeAll, removeAndInsert, save, setTenantId, setValuesOnInsert, setValuesOnUpdate, updateById, updateMulti, upsert, upsertReturnOld, withDirect, withDirectQuery, withDirectUpdateprotected DirectEntityDaoImpl(AbstractEntityDaoImpl<T> entityDao, Class<T> clazz, String tenantKey, boolean directQuery, boolean directUpdate)
entityDao - the entity daoclazz - the clazztenantKey - the tenant keydirectQuery - the querydirectUpdate - the updateprotected String getEntityId(T entity)
AbstractEntityDaoImplgetEntityId in class AbstractEntityDaoImpl<T extends AbstractEntity>entity - the entitypublic org.springframework.data.mongodb.core.query.Criteria getCriteria()
AbstractEntityDaoCriteria containing tenantId and deleted filter.getCriteria in interface AbstractEntityDao<T extends AbstractEntity>getCriteria in class AbstractEntityDaoImpl<T extends AbstractEntity>protected String getDeletedKey()
AbstractEntityDaoImplgetDeletedKey in class AbstractEntityDaoImpl<T extends AbstractEntity>protected org.springframework.data.mongodb.core.MongoTemplate getMongoTemplate()
AbstractEntityDaoImplgetMongoTemplate in class AbstractEntityDaoImpl<T extends AbstractEntity>protected org.springframework.data.mongodb.core.query.Query getTenantQuery(org.springframework.data.mongodb.core.query.Query query)
AbstractEntityDaoImplgetTenantQuery in class AbstractEntityDaoImpl<T extends AbstractEntity>query - the querypublic String getCollectionName()
AbstractEntityDaoImplgetCollectionName in interface AbstractEntityDao<T extends AbstractEntity>getCollectionName in class AbstractEntityDaoImpl<T extends AbstractEntity>protected org.springframework.data.mongodb.core.query.Update setValues(org.springframework.data.mongodb.core.query.Update update)
AbstractEntityDaoImplsetValues in class AbstractEntityDaoImpl<T extends AbstractEntity>update - the updateprotected String getCreatedKey()
AbstractEntityDaoImplgetCreatedKey in class AbstractEntityDaoImpl<T extends AbstractEntity>protected Object getNow()
AbstractEntityDaoImplgetNow in class AbstractEntityDaoImpl<T extends AbstractEntity>protected String getCreatedByKey()
AbstractEntityDaoImplgetCreatedByKey in class AbstractEntityDaoImpl<T extends AbstractEntity>protected String getUpdatedKey()
AbstractEntityDaoImplgetUpdatedKey in class AbstractEntityDaoImpl<T extends AbstractEntity>protected String getUpdatedByKey()
AbstractEntityDaoImplgetUpdatedByKey in class AbstractEntityDaoImpl<T extends AbstractEntity>protected String getViewedByKey()
AbstractEntityDaoImplgetViewedByKey in class AbstractEntityDaoImpl<T extends AbstractEntity>protected String getViewedKey()
AbstractEntityDaoImplgetViewedKey in class AbstractEntityDaoImpl<T extends AbstractEntity>protected void setEntityId(T entity, String id)
AbstractEntityDaoImplsetEntityId in class AbstractEntityDaoImpl<T extends AbstractEntity>entity - the entityid - the idpublic T save(T entity)
AbstractEntityDaosave in interface AbstractEntityDao<T extends AbstractEntity>save in class AbstractEntityDaoImpl<T extends AbstractEntity>entity - the entityprotected void onFetch(T entity)
AbstractEntityDaoImplonFetch in class AbstractEntityDaoImpl<T extends AbstractEntity>entity - the entityCopyright © 2022. All rights reserved.