46
46
* @author Jens Schauder
47
47
* @author Mark Paluch
48
48
* @author Thomas Lang
49
+ * @author Christoph Strobl
49
50
*/
50
51
public class JdbcAggregateTemplate implements JdbcAggregateOperations {
51
52
@@ -165,8 +166,8 @@ public long count(Class<?> domainType) {
165
166
@ Override
166
167
public <T > T findById (Object id , Class <T > domainType ) {
167
168
168
- Assert .notNull (id , "Id must not be null" );
169
- Assert .notNull (domainType , "Domain type must not be null" );
169
+ Assert .notNull (id , "Id must not be null! " );
170
+ Assert .notNull (domainType , "Domain type must not be null! " );
170
171
171
172
T entity = accessStrategy .findById (id , domainType );
172
173
if (entity != null ) {
@@ -182,8 +183,8 @@ public <T> T findById(Object id, Class<T> domainType) {
182
183
@ Override
183
184
public <T > boolean existsById (Object id , Class <T > domainType ) {
184
185
185
- Assert .notNull (id , "Id must not be null" );
186
- Assert .notNull (domainType , "Domain type must not be null" );
186
+ Assert .notNull (id , "Id must not be null! " );
187
+ Assert .notNull (domainType , "Domain type must not be null! " );
187
188
188
189
return accessStrategy .existsById (id , domainType );
189
190
}
@@ -195,7 +196,7 @@ public <T> boolean existsById(Object id, Class<T> domainType) {
195
196
@ Override
196
197
public <T > Iterable <T > findAll (Class <T > domainType ) {
197
198
198
- Assert .notNull (domainType , "Domain type must not be null" );
199
+ Assert .notNull (domainType , "Domain type must not be null! " );
199
200
200
201
Iterable <T > all = accessStrategy .findAll (domainType );
201
202
publishAfterLoad (all );
@@ -209,8 +210,8 @@ public <T> Iterable<T> findAll(Class<T> domainType) {
209
210
@ Override
210
211
public <T > Iterable <T > findAllById (Iterable <?> ids , Class <T > domainType ) {
211
212
212
- Assert .notNull (ids , "Ids must not be null" );
213
- Assert .notNull (domainType , "Domain type must not be null" );
213
+ Assert .notNull (ids , "Ids must not be null! " );
214
+ Assert .notNull (domainType , "Domain type must not be null! " );
214
215
215
216
Iterable <T > allById = accessStrategy .findAllById (ids , domainType );
216
217
publishAfterLoad (allById );
@@ -224,8 +225,8 @@ public <T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType) {
224
225
@ Override
225
226
public <S > void delete (S aggregateRoot , Class <S > domainType ) {
226
227
227
- Assert .notNull (aggregateRoot , "Aggregate root must not be null" );
228
- Assert .notNull (domainType , "Domain type must not be null" );
228
+ Assert .notNull (aggregateRoot , "Aggregate root must not be null! " );
229
+ Assert .notNull (domainType , "Domain type must not be null! " );
229
230
230
231
IdentifierAccessor identifierAccessor = context .getRequiredPersistentEntity (domainType )
231
232
.getIdentifierAccessor (aggregateRoot );
@@ -240,8 +241,8 @@ public <S> void delete(S aggregateRoot, Class<S> domainType) {
240
241
@ Override
241
242
public <S > void deleteById (Object id , Class <S > domainType ) {
242
243
243
- Assert .notNull (id , "Id must not be null" );
244
- Assert .notNull (domainType , "Domain type must not be null" );
244
+ Assert .notNull (id , "Id must not be null! " );
245
+ Assert .notNull (domainType , "Domain type must not be null! " );
245
246
246
247
deleteTree (id , null , domainType );
247
248
}
@@ -253,7 +254,7 @@ public <S> void deleteById(Object id, Class<S> domainType) {
253
254
@ Override
254
255
public void deleteAll (Class <?> domainType ) {
255
256
256
- Assert .notNull (domainType , "Domain type must not be null" );
257
+ Assert .notNull (domainType , "Domain type must not be null! " );
257
258
258
259
AggregateChange <?> change = createDeletingChange (domainType );
259
260
change .executeWith (interpreter , context , converter );
@@ -274,7 +275,7 @@ private <T> T store(T instance, IdentifierAccessor identifierAccessor, Aggregate
274
275
275
276
Object identifier = persistentEntity .getIdentifierAccessor (change .getEntity ()).getIdentifier ();
276
277
277
- Assert .notNull (identifier , "After saving the identifier must not be null" );
278
+ Assert .notNull (identifier , "After saving the identifier must not be null! " );
278
279
279
280
publisher .publishEvent (new AfterSaveEvent ( //
280
281
Identifier .of (identifier ), //
0 commit comments