2019-05-03
Lire plus
2019-03-10
2019-01-21
12345678910111213
public Map<Bank, List<Account>> findAllGroupByBank() { Map<Bank, List<Account>> result = new HashMap<>(); this.accountService .findAll() .stream() .forEach(a -> result.computeIfAbsent(a.getBank(), this::findAllByBank)); return result; } private List<Account> findAllByBank(Bank aBank) { return this.accountService.findAll().stream().filter(account -> aBank.equals(account.getBank())).collect(Collectors.toList()); }
2018-12-26
class Product {
2018-12-10sqldatabase
1
EXEC sp_help Table1;
2018-11-30
2018-11-22
2018-11-21
12345678910111213141516171819202122232425262728293031
package com.cyrgue.designpatterns.chain;public abstract class ConflictChecker { protected UserModel anonymousUser; protected UserModel registeredUser; protected ConflictChecker nextChecker; public ConflictChecker(UserModel anonymousUser, UserModel registeredUser) { this.anonymousUser = anonymousUser; this.registeredUser = registeredUser; } public void setNextChecker(ConflictChecker nextChecker) { this.nextChecker = nextChecker; } public void check() throws Exception { if (this.hasConflict()) { process(); } // Possible d'avoir un else ici - La chaine s'arrete if (nextChecker != null) { nextChecker.check(); } } abstract protected void process() throws Exception; abstract protected boolean hasConflict();}
2018-10-17
Equals et Hashode are used for data structure
2018-10-16
mongo --port 28015