@@ -138,7 +138,7 @@ inline fun <reified T : Any> MongoOperations.findAndRemove(typedQuery: TypedQuer
138
138
*
139
139
* @author Tjeu Kayim
140
140
*/
141
- fun <T : Any > MongoOperations.count (typedQuery : TypedQuery <T > = TypedQuery () , entityClass : KClass <T >, collectionName : String? = null): Long =
141
+ fun <T : Any > MongoOperations.count (typedQuery : TypedQuery <T >, entityClass : KClass <T >, collectionName : String? = null): Long =
142
142
if (collectionName != null ) count(typedQuery, entityClass.java, collectionName)
143
143
else count(typedQuery, entityClass.java)
144
144
@@ -147,7 +147,8 @@ fun <T : Any> MongoOperations.count(typedQuery: TypedQuery<T> = TypedQuery(), en
147
147
*
148
148
* @author Tjeu Kayim
149
149
*/
150
- inline fun <reified T : Any > MongoOperations.count (typedQuery : TypedQuery <T > = TypedQuery (), collectionName : String? = null): Long =
150
+ @Suppress(" EXTENSION_SHADOWED_BY_MEMBER" )
151
+ inline fun <reified T : Any > MongoOperations.count (typedQuery : TypedQuery <T >, collectionName : String? = null): Long =
151
152
if (collectionName != null ) count(typedQuery, T ::class .java, collectionName) else count(typedQuery, T ::class .java)
152
153
153
154
/* *
@@ -164,6 +165,7 @@ fun <T : Any> MongoOperations.upsert(typedQuery: TypedQuery<T>, update: Update,
164
165
*
165
166
* @author Tjeu Kayim
166
167
*/
168
+ @Suppress(" EXTENSION_SHADOWED_BY_MEMBER" )
167
169
inline fun <reified T : Any > MongoOperations.upsert (typedQuery : TypedQuery <T >, update : Update , collectionName : String? = null): UpdateResult =
168
170
if (collectionName != null ) upsert(typedQuery, update, T ::class .java, collectionName)
169
171
else upsert(typedQuery, update, T ::class .java)
@@ -182,6 +184,7 @@ fun <T : Any> MongoOperations.updateFirst(typedQuery: TypedQuery<T>, update: Upd
182
184
*
183
185
* @author Tjeu Kayim
184
186
*/
187
+ @Suppress(" EXTENSION_SHADOWED_BY_MEMBER" )
185
188
inline fun <reified T : Any > MongoOperations.updateFirst (typedQuery : TypedQuery <T >, update : Update , collectionName : String? = null): UpdateResult =
186
189
if (collectionName != null ) updateFirst(typedQuery, update, T ::class .java, collectionName)
187
190
else updateFirst(typedQuery, update, T ::class .java)
@@ -200,6 +203,7 @@ fun <T : Any> MongoOperations.updateMulti(typedQuery: TypedQuery<T>, update: Upd
200
203
*
201
204
* @author Tjeu Kayim
202
205
*/
206
+ @Suppress(" EXTENSION_SHADOWED_BY_MEMBER" )
203
207
inline fun <reified T : Any > MongoOperations.updateMulti (typedQuery : TypedQuery <T >, update : Update , collectionName : String? = null): UpdateResult =
204
208
if (collectionName != null ) updateMulti(typedQuery, update, T ::class .java, collectionName)
205
209
else updateMulti(typedQuery, update, T ::class .java)
@@ -218,6 +222,7 @@ fun <T : Any> MongoOperations.remove(typedQuery: TypedQuery<T>, entityClass: KCl
218
222
*
219
223
* @author Tjeu Kayim
220
224
*/
225
+ @Suppress(" EXTENSION_SHADOWED_BY_MEMBER" )
221
226
inline fun <reified T : Any > MongoOperations.remove (typedQuery : TypedQuery <T >, collectionName : String? = null): DeleteResult =
222
227
if (collectionName != null ) remove(typedQuery, T ::class .java, collectionName)
223
228
else remove(typedQuery, T ::class .java)
0 commit comments