Hello:
I want to create a class that implements the "org.hibernate.dialect.function.SQLFunction" interface and that returns an array of "Longs" ("Long[]") when it's executed. The "SQLFunction" interface seems to be easy to understand. However, I'm having a hard time creating a custom type that represents that array.
I've read the documentation and some guides, and they recommend to use the "org.hibernate.usertype.UserType" interface instead of "org.hibernate.type.Type", because it's more simple, easier to understand and less subject to changes in the future. However the method "SQLFunction.getReturnType" only accepts "Type" as the return type, not "UserType".
So, Is there a way to create a "Type" from an "UserType"? Or will I need to implement my custom type from the "Type" interface?
Thank you.
|