|
19 | 19 |
|
20 | 20 | package org.jugs.webdav.addressbook; |
21 | 21 |
|
22 | | -import org.jugs.webdav.jaxrs.methods.*; |
23 | | -import org.jugs.webdav.jaxrs.xml.elements.*; |
24 | | -import org.jugs.webdav.jaxrs.xml.properties.*; |
25 | | - |
26 | | -import javax.persistence.*; |
27 | | -import jakarta.ws.rs.OPTIONS; |
28 | 22 | import jakarta.ws.rs.*; |
29 | 23 | import jakarta.ws.rs.core.Context; |
30 | 24 | import jakarta.ws.rs.core.HttpHeaders; |
31 | 25 | import jakarta.ws.rs.core.MediaType; |
32 | 26 | import jakarta.ws.rs.core.UriInfo; |
33 | 27 | import jakarta.ws.rs.ext.Providers; |
| 28 | +import org.jugs.webdav.jaxrs.methods.*; |
| 29 | +import org.jugs.webdav.jaxrs.xml.elements.*; |
| 30 | +import org.jugs.webdav.jaxrs.xml.properties.*; |
| 31 | + |
| 32 | +import javax.persistence.*; |
34 | 33 | import java.io.IOException; |
35 | 34 | import java.io.InputStream; |
36 | 35 | import java.lang.annotation.Annotation; |
@@ -70,7 +69,8 @@ public final MultiStatus propfind(@Context final UriInfo uriInfo, @DefaultValue( |
70 | 69 | return new MultiStatus(folder); |
71 | 70 |
|
72 | 71 | final Collection<Response> responses = new LinkedList<Response>(Collections.singletonList(folder)); |
73 | | - for (final Contact c : (List<Contact>) this.em().createNamedQuery("ListContacts").getResultList()) |
| 72 | + TypedQuery<Contact> listContacts = this.em().createNamedQuery("ListContacts", Contact.class); |
| 73 | + for (final Contact c : listContacts.getResultList()) |
74 | 74 | responses.add(new Response(new HRef(uriInfo.getAbsolutePathBuilder().path(String.format("%s.adr", c.getMatchCode())).build()), null, null, null, |
75 | 75 | new PropStat(new Prop(new MicrosoftRedirectorPatch2(), new DisplayName(String.format("%s %s", c.getLastName(), c.getFirstName())), |
76 | 76 | new CreationDate(c.getCreationDate()), new GetLastModified(c.getLastModified()), new GetContentLength(0), new GetContentType( |
|
0 commit comments