Showing
1 changed file
with
0 additions
and
83 deletions
... | @@ -6,89 +6,6 @@ import java.util.*; | ... | @@ -6,89 +6,6 @@ import java.util.*; |
6 | //import org.roliste.data.DbMaskableEntity; | 6 | //import org.roliste.data.DbMaskableEntity; |
7 | //import org.roliste.data.DbValidationEntity; | 7 | //import org.roliste.data.DbValidationEntity; |
8 | 8 | ||
9 | -@NamedQueries({ | ||
10 | -@NamedQuery( | ||
11 | - name="findById", | ||
12 | - query="SELECT u FROM User u WHERE u.userId=:id" | ||
13 | -), | ||
14 | - @NamedQuery( | ||
15 | - name="listByPattern", | ||
16 | - query="SELECT u FROM User u WHERE lower(u.username) LIKE :pattern or lower(u.email) LIKE :pattern or lower(u.firstName) LIKE :pattern or lower(u.lastName) LIKE :pattern or lower(u.nickname) LIKE :pattern ORDER BY u.userId DESC" | ||
17 | -), | ||
18 | -@NamedQuery( | ||
19 | - name="listVisibleByPattern", | ||
20 | - query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true AND (lower(u.username) LIKE :pattern or lower(u.email) LIKE :pattern)" | ||
21 | -), | ||
22 | -@NamedQuery( | ||
23 | - name="findByUsername", | ||
24 | - query="SELECT u FROM User u WHERE u.username=:username" | ||
25 | -), | ||
26 | -@NamedQuery( | ||
27 | - name="findByEmail", | ||
28 | - query="SELECT u FROM User u WHERE u.email=:email" | ||
29 | -), | ||
30 | -/* TODO Régler le problème avec elements | ||
31 | -@NamedQuery( | ||
32 | - name="listByRolename", | ||
33 | - query="SELECT u FROM User u, UserRole r WHERE r in elements(u.roles) AND r.rolename=:rolename AND u.visible is true AND u.activated is true" | ||
34 | -), | ||
35 | -*/ | ||
36 | -@NamedQuery( | ||
37 | - name="listForEmailSend", | ||
38 | - query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true" | ||
39 | -), | ||
40 | -@NamedQuery( | ||
41 | - name="listWithExactUserName", | ||
42 | - query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true AND u.username in (:usernames)" | ||
43 | -), | ||
44 | -@NamedQuery( | ||
45 | - name="listVisibleCriticsProviders", | ||
46 | - query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true AND u.criticProvider = true" | ||
47 | -), | ||
48 | -/* TODO Régler le problème avec elements | ||
49 | -@NamedQuery( | ||
50 | - name="listPublisherDelegationsByUser", | ||
51 | - query="SELECT p FROM Publisher p, User u WHERE u=:user AND p.traceable IN ELEMENTS(u.delegations) ORDER BY p.pubName" | ||
52 | -), | ||
53 | -*/ | ||
54 | -/* TODO Régler le problème avec elements | ||
55 | -@NamedQuery( | ||
56 | - name="listAuthorDelegationsByUser", | ||
57 | - query="SELECT a FROM Author a, User u WHERE u=:user AND a.traceable IN ELEMENTS(u.delegations) ORDER BY a.lastName, a.firstName" | ||
58 | -), | ||
59 | -*/ | ||
60 | - /* TODO Régler le problème avec elements | ||
61 | -@NamedQuery( | ||
62 | - name="listPartnerDelegationsByUser", | ||
63 | - query="SELECT p FROM Partner p, User u WHERE u=:user AND p.traceable IN ELEMENTS(u.delegations) ORDER BY p.name" | ||
64 | -), | ||
65 | - */ | ||
66 | - /* TODO Régler le problème avec elements | ||
67 | - @NamedQuery( | ||
68 | - name="listIndieGameDelegationsByUser", | ||
69 | - query="SELECT i FROM IndieGame i, User u WHERE u=:user AND i.traceable IN ELEMENTS(u.delegations) ORDER BY i.title" | ||
70 | - ), | ||
71 | - */ | ||
72 | - @NamedQuery( | ||
73 | - name="listToCleanup", | ||
74 | - query="SELECT u FROM User u WHERE u.activated = false AND u.creationDate < :limitDate" | ||
75 | - ), | ||
76 | - @NamedQuery( | ||
77 | - name="listAll", | ||
78 | - query="SELECT u FROM User u ORDER BY u.userId" | ||
79 | - ) | ||
80 | - /* TODO Pas de traceable pour l'instant, remplacé ou réutilisé ? | ||
81 | - , | ||
82 | - @NamedQuery( | ||
83 | - name="userNotActivatedWithJournalisable", | ||
84 | - query="SELECT u FROM Traceable t, User u WHERE t.creator = u.pk and u.activated = false" | ||
85 | - ), | ||
86 | - @NamedQuery( | ||
87 | - name="findByUrl", | ||
88 | - query="SELECT u FROM User u WHERE u.traceable.urlRewrite=:url" | ||
89 | - ) | ||
90 | - */ | ||
91 | -}) | ||
92 | // TODO Vérifier les extends | 9 | // TODO Vérifier les extends |
93 | // TODO NameMask et DbMaskableEntity à traiter ensemble | 10 | // TODO NameMask et DbMaskableEntity à traiter ensemble |
94 | @Entity | 11 | @Entity | ... | ... |
-
Please register or login to post a comment