1

I have a simple service method to get customer from db when the customer name is 'John'.But customer name is not primary key so i cannot use getbyid kind of stuff.

My dao class name is customerDao and i have such a method in my service class:

public boolean isCustomerIdBiggerThanFive(String customerName) {
    // i need something like customerDao.getByName... bla bla(customerName);
}

and my daoClass is extending EntityDaoImpl

like

@Repository
public class CustomerDaoImp extends EntityDaoImpl<Customer, Long> implements CustomerDao {

//some method i need here for getting data for spesific column name.
}

I want to use detached criteria but i have no idea how to achieve it. I don't want to achieve it by using custom sql query in dao class.

abidinberkay
  • 1,857
  • 4
  • 36
  • 68

0 Answers0