java - Using methods with "@Named" annotation in its parameters -
I am working with JPA and I have a method
/ * * * This method becomes the unit with the primary key ID; it uses the HTTP GET method * * @The primary key of the Java Java Java * @ @Returning entity with the primary key ID * / @ApiMethod (name = "getNote") Public note getNote (@ id ("id") string id) {EntityManager mgr = getEntityManager (); Note note = null; Try {note = mf.find (note.class, id); } Finally {mgr.close (); } Return note; }
But I'm not sure how to use this method. I have read a lot of tutorials on this but are still confused. I tried to use it like this
note newResult = endpoint.getNote (noteID) .execute ();
But it gives the null
.
Comments
Post a Comment