Hi,
I would like to map a custom data structure that wraps a normal Java
Collection in exactly the same way as one would normally map a normal Java
Collection. For example,
public interface Stack<E> {
public void push(E item);
public E pop();
}
public class ArrayStack<E> implements Stack<E> {
private List<E> underlyingImpl;
//...etc.
}
@Entity
public class MyClass {
@OneToMany
private Stack<E> stack;
}
Here, all the elements of the stack would be stored in the DB just as a List
would be. How could one do this?
Thanks,
Brennan