Oracle User Defined Type use in hibernate

I want to use hibernate (spring jpa) to call stored procedure.In my stored procedures there are user defined types(udt) (in or out params) In hibernate example ,I see there is refcur parametermode but I cant find something about udt parameter types in oracle.How can call storedprocedure with user defined types.Can someone share any sample.
create or replace PROCEDURE SP_DEMO_SP
pmyudt OUT mytype

name VARCHAR2 (100),
food_group VARCHAR2 (100),

How can I model mytype in my java codes and use it to pass parameter for stored procedure

EntityManager em=(EntityManager)applicationContext.getBean(“myEntityManager”);
StoredProcedureQuery query=em.createStoredProcedureQuery(“SP_DEMO_SP”);
query.registerStoredProcedureParameter(“pID”, Double.class, ParameterMode.IN);

        query.registerStoredProcedureParameter("pmyudt", mytype .class, ParameterMode.OUT);
        query.setParameter("pID", 2d);
        mytype  sum = (mytype ) query.getOutputParameterValue("pmyudt");

You can register UDT mapping to Java classes (implementing SQLData) by callling connection.getTypeMap(), adding your mapping to the returned map and eventually connection.setTypeMap().

If I use jdbc call you are right it work with SQLDATA,I can do like this.
But when I try to do with hibernate I still get error

Don’t think it’s possible in Hibernate, if you look at source code of ProcedureParameterImpl
there is nothing to handle “special” things other than REF_CURSOR.

public void setHibernateType(Type expectedType) {
super .setHibernateType( expectedType );
if ( mode == ParameterMode. REF_CURSOR ) {
sqlTypes = new int [] { Types. REF_CURSOR };
else {
if ( expectedType == null ) {
throw new IllegalArgumentException( "Type cannot be null" );
else {
sqlTypes = expectedType.sqlTypes( procedureCall.getSession().getFactory() );