コード例 #1
0
  @Transactional(readOnly = true)
  @Override
  public List showClientsByPortion(int portionSize) {
    if (portionSize < 1) throw new IllegalArgumentException();

    int size = (int) clientDao.getListSize();
    List clients = new LinkedList<>();
    for (int i = 0; i < size; i += portionSize) {
      clients.addAll(clientDao.listChunkOfClients(i, portionSize));
      clients.add(null);
    }
    return clients;
  }
コード例 #2
0
  @Override
  public boolean createClientWithOperator(
      String operatorLogin, String name, String surname, String phone, String address)
      throws ClientException {

    Operator operator = operatorDao.read(operatorLogin);
    Client client = new Client(name, surname, phone, address, 0L, null, operator);
    clientDao.create(client);
    return false;
  }
コード例 #3
0
 @Transactional(readOnly = true)
 @Override
 public List showClientsLastMonth() {
   return clientDao.listClientsLastMonth();
 }
コード例 #4
0
 @Transactional(readOnly = true)
 @Override
 public List showClientsGtSum(int sum) {
   return clientDao.listClientsGtSum(sum);
 }
コード例 #5
0
 @Transactional(readOnly = true)
 @Override
 public List showAllClients() {
   return clientDao.listAll();
 }
コード例 #6
0
 @Transactional(readOnly = true)
 @Override
 public Client read(Long id) {
   return clientDao.read(id);
 }