I have the following list
of Person Objects:
List<Person> persons;
The Person object is as follows:
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class Person
{
@XmlElement
private int id;
@XmlElement
private String name;
public Person(){
}
}
A Stored Procedure
I am invoking takes a list of Person Objects as an Oracle ARRAY
.
How can I convert my list of Java Objects into an Oracle ARRAY in order to pass it into the Stored Procedure?
I have seen the CallableStatement.setArray()
method, but I do not know how to convert my Java List into an Oracle ARRAY first.