363364365366367368369370371372
public ZipDTO findStateForZip(int pZip) { Query query = manager.createQuery( "SELECT z from Ziptable z where z.zip = " + pZip); Ziptable aZipEntity = (Ziptable)query.getSingleResult(); ZipDTO zip = new ZipDTO(aZipEntity); return zip; }