Today, Leader is responsible for the project with me to put the SQL statement used in the query into the XML file, which can modify the query statement without changing the program. It is a good method, but it may be necessary to consider the details of the time when it is achieved, or the future may appear in a lack of flexible situation.
In this way, there is a benefit to change the SQL's XML file to HQL when using Hibernate. This seems to be more flexible.