I'm writing some DAO objects for my application, which communicate with oracle database (object relational database). Everything works fine, except for this part of the code:
List<Object>grades = new ArrayList<>();
Array gradesList = (Array)rs.getArray("GRADES");
grades = Arrays.asList(gradesList.getArray());
With this i get List<Object>. What i really need is List<Grade>. I searched the internet for answer but I could not find any. I tried to cast objects from grades list in for loop and add them to another List but that didn't work. Could it be done somehow?