Using the script below, Roo generates repository/DAO layer containing Book.java (javabean), BookRepository.java (interface), and some .aj files (Non-editable).
I package the DAO layer as .jar file and I use it as follow on another project (Without Spring Roo):
entity jpa --class ~.Book --activeRecord false
field date --fieldName rentalDate --type java.util.Date
field number --fieldName isbn --type java.lang.Integer
field string --fieldName title
repository jpa --interface ~.BookRepository
Now, I need to introduce custom methods to perform more complex data access but I want to keep access still coming from the same interface, eg.
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath*:META-INF/spring/applicationContext*.xml");
BookRepository bookRepo = (BookRepository)springContext.getBean("BookRepository");
However, I do not know where to put the implementation of the method since there is no Java class where I can put the implementation (I only have Book.java and BookRepository.java), furthermore BookRepository.java demands me to specify @Query.
If you have thought about this scenario when designing Spring Roo, please help.