I have done the changes for all other comments. In this method, it will return all the subtypes of a particular order type. What I have done here is keep two lists, fitstLevelList will hold the parents of secondLevelList. Simply what I have done here is get children of requested order type and assign them to first level list then children of those parents will put into the secondLevelList after firstLevelList finishes then secondLevelList becomes next firstLevelList and query next child order types which will continue untill sub order types fetched.

In DAO I have place a method to get immediate children of given order type which I have used here to implement the required functionality.

There will be no duplicates as all order types are unique.

Do I needs to change this?