IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JPA Java Discussion :

Jpa recherche avec argument variable


Sujet :

JPA Java

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut Jpa recherche avec argument variable
    bonjour,
    j'aurais voulu savoir si il était possible avec jpa de faire des recherche avec les paramétre variable .
    exemple trouver quelqu'un ou on a son nom . Trouver quelqu'un qu'on a juste son prénom . trouver quelqu'un qu'on a son nom et son prénom . etc .
    existe quelque chose qui permet de faire cela sans devoir crée toute les code sql pour chaque possibilité ?

    Merci D'avance

  2. #2
    Modérateur
    Avatar de OButterlin
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    7 310
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 7 310
    Points : 9 522
    Points
    9 522
    Billets dans le blog
    1
    Par défaut
    Tu as Criteria qui te permet de gérer des requêtes avec critères variables... tu peux regarder ici.
    N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut
    merci de l'info pour le code suivant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    CriteriaBuilder criteriaBuilder = getEntityManager().getCriteriaBuilder();
            CriteriaQuery criteriaQuery  = criteriaBuilder.createQuery();
            Root personneRoot = criteriaQuery.from(Personne.class);
            criteriaQuery.where(criteriaBuilder.equal(personneRoot.get("keyClient"),personne.getKeyClient()));
            Query query = getEntityManager().createQuery(criteriaQuery);
            return query.getResultList();
    comment faire ma jointure :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    JOIN p.sessionCollection sc WHERE sc.keySession = :keySession

  4. #4
    Modérateur
    Avatar de OButterlin
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    7 310
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 7 310
    Points : 9 522
    Points
    9 522
    Billets dans le blog
    1
    Par défaut
    Quelle est la requête que tu veux faire et quelle est la définition de ton entity Personne
    N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  5. #5
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut
    voici mon entity :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
     
    /*
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
    package fr.ietevents.client.Entity;
     
    import java.io.Serializable;
    import java.util.Date;
    import java.util.List;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToMany;
    import javax.persistence.ManyToOne;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    import javax.persistence.Temporal;
    import javax.persistence.TemporalType;
    import javax.validation.constraints.NotNull;
    import javax.validation.constraints.Size;
    import javax.xml.bind.annotation.XmlRootElement;
    import javax.xml.bind.annotation.XmlTransient;
     
    /**
     *
     * @author IETEVENTS
     */
    @Entity
    @Table(name = "Personne")
    @XmlRootElement
    @NamedQueries({
        @NamedQuery(name = "Personne.findAll", query = "SELECT p FROM Personne p"),
        @NamedQuery(name = "Personne.findByKeyClient", query = "SELECT p FROM Personne p WHERE p.keyClient = :keyClient"),
        @NamedQuery(name = "Personne.CountPersonneParPay", query = "SELECT COUNT(p) FROM Personne p JOIN p.sessionCollection sc WHERE sc.keySession = :keySession and p.entreprise.adresse.localite.pays.keyPays = :keyPays and P.dateCreation BETWEEN :StatDate and :endate and p.typeInscription = :typeInscription"),
        @NamedQuery(name = "Personne.CountPersonneLocalite", query = "SELECT COUNT(p) FROM Personne p JOIN p.sessionCollection sc WHERE sc.keySession = :keySession and p.entreprise.adresse.localite.ville = :keyVille and P.dateCreation BETWEEN :StatDate and :endate and p.typeInscription = :typeInscription"),
        @NamedQuery(name = "Personne.CountPersonneTotal",  query = "SELECT COUNT(p) FROM Personne p JOIN p.sessionCollection sc WHERE sc.keySession = :keySession and P.dateCreation BETWEEN :StatDate and :endate and p.typeInscription = :typeInscription"),
        @NamedQuery(name = "Personne.findByNom", query = "SELECT p FROM Personne p WHERE p.nom = :nom"),
        @NamedQuery(name = "Personne.findByPrenom", query = "SELECT p FROM Personne p WHERE p.prenom = :prenom"),
        @NamedQuery(name = "Personne.findByEmail", query = "SELECT p FROM Personne p WHERE p.email = :email"),
        @NamedQuery(name = "Personne.findByTelephone", query = "SELECT p FROM Personne p WHERE p.telephone = :telephone"),
        @NamedQuery(name = "Personne.findByPortable", query = "SELECT p FROM Personne p WHERE p.portable = :portable"),
        @NamedQuery(name = "Personne.findByFax", query = "SELECT p FROM Personne p WHERE p.fax = :fax"),
        @NamedQuery(name = "Personne.findByDateModification", query = "SELECT p FROM Personne p WHERE p.dateModification = :dateModification"),
        @NamedQuery(name = "Personne.findByDateCreation", query = "SELECT p FROM Personne p WHERE p.dateCreation = :dateCreation"),
        @NamedQuery(name = "Personne.findByActif", query = "SELECT p FROM Personne p WHERE p.actif = :actif")})
    public class Personne implements Serializable {
     
        private static final long serialVersionUID = 1L;
        @Id
        @Basic(optional = false)
        @NotNull
        @Column(name = "KeyClient")
        private String keyClient;
        @Size(max = 255)
        @Column(name = "Nom")
        private String nom;
        @Size(max = 255)
        @Column(name = "Prenom")
        private String prenom;
        // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
        @Size(max = 255)
        @Column(name = "Email")
        private String email;
        @Size(max = 255)
        @Column(name = "Telephone")
        private String telephone;
        @Size(max = 255)
        @Column(name = "Portable")
        private String portable;
        @Size(max = 255)
        @Column(name = "TypeInscription")
        private String typeInscription;
        // @Pattern(regexp="^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$", message="Invalid phone/fax format, should be as xxx-xxx-xxxx")//if the field contains phone or fax number consider using this annotation to enforce field validation
        @Size(max = 255)
        @Column(name = "Fax")
        private String fax;
        @Column(name = "DateModification")
        @Temporal(TemporalType.DATE)
        private Date dateModification;
        @Column(name = "DateCreation")
        @Temporal(TemporalType.DATE)
        private Date dateCreation;
        @ManyToOne(cascade = CascadeType.ALL)
        @JoinColumn(name = "KeyTypeUser")
        private TypeUser typeUser;
        @Size(max = 1)
        @Column(name = "actif")
        private String actif;
        @ManyToOne(cascade = CascadeType.ALL)
        @JoinColumn(name = "KeyEntreprise")
        private Entreprise entreprise;
        @ManyToOne(cascade = CascadeType.ALL)
        @JoinColumn(name = "KeyCivilite")
        private Civilite civilite;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Login> loginCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<SourceInscription> sourceInscriptionCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<CorrespondanceImportation> CorrespondanceImportationCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Hotesse> hotesseCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Passage> passageCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Produit> produitCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Droit> droitCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<ReponseClient> reponseClientCollection;
        @OneToMany(mappedBy = "utilisateurSource",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<SourceInscription> PersonneUtilisateurSourceCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<AutreInformation> autreInformationCollection;
        @OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<CrmLien> CrmLienCollection;
        @ManyToMany(cascade = CascadeType.ALL)
        private List<Session> sessionCollection;
     
        public Personne() {
        }
     
        public Personne(String keyClient) {
            this.keyClient = keyClient;
        }
     
        public String getKeyClient() {
            return keyClient;
        }
     
        public void setKeyClient(String keyClient) {
            this.keyClient = keyClient;
        }
     
        public String getNom() {
            return nom;
        }
     
        public void setNom(String nom) {
            this.nom = nom;
        }
     
        public String getPrenom() {
            return prenom;
        }
     
        public void setPrenom(String prenom) {
            this.prenom = prenom;
        }
     
        public String getTypeInscription() {
            return typeInscription;
        }
     
        public void setTypeInscription(String typeInscription) {
            this.typeInscription = typeInscription;
        }
     
        public String getEmail() {
            return email;
        }
     
        public void setEmail(String email) {
            this.email = email;
        }
     
        public String getTelephone() {
            return telephone;
        }
     
        public void setTelephone(String telephone) {
            this.telephone = telephone;
        }
     
        public String getPortable() {
            return portable;
        }
     
        public void setPortable(String portable) {
            this.portable = portable;
        }
     
        public String getFax() {
            return fax;
        }
     
        public void setFax(String fax) {
            this.fax = fax;
        }
     
        public Date getDateModification() {
            return dateModification;
        }
     
        public void setDateModification(Date dateModification) {
            this.dateModification = dateModification;
        }
     
        public Date getDateCreation() {
            return dateCreation;
        }
     
        public void setDateCreation(Date dateCreation) {
            this.dateCreation = dateCreation;
        }
     
        public String getActif() {
            return actif;
        }
     
        public void setActif(String actif) {
            this.actif = actif;
        }
     
        public TypeUser getTypeUser() {
            return typeUser;
        }
     
        public void setTypeUser(TypeUser typeUser) {
            this.typeUser = typeUser;
        }
        @XmlTransient
        public List<Login> getLoginCollection() {
            return loginCollection;
        }
     
        public void setLoginCollection(List<Login> loginCollection) {
            this.loginCollection = loginCollection;
        }
        @XmlTransient
        public List<CrmLien> getCrmLienCollection() {
            return CrmLienCollection;
        }
     
        public void setCrmLienCollection(List<CrmLien> CrmLienCollection) {
            this.CrmLienCollection = CrmLienCollection;
        }
     
        @XmlTransient
        public List<SourceInscription> getSourceInscriptionCollection() {
            return sourceInscriptionCollection;
        }
     
        public void setSourceInscriptionCollection(List<SourceInscription> sourceInscriptionCollection) {
            this.sourceInscriptionCollection = sourceInscriptionCollection;
        }
     
        public Entreprise getEntreprise() {
            return entreprise;
        }
     
        public void setEntreprise(Entreprise entreprise) {
            this.entreprise = entreprise;
        }
        @XmlTransient
        public List<CorrespondanceImportation> getCorrespondanceImportationCollection() {
            return CorrespondanceImportationCollection;
        }
     
        public void setCorrespondanceImportationCollection(List<CorrespondanceImportation> CorrespondanceImportationCollection) {
            this.CorrespondanceImportationCollection = CorrespondanceImportationCollection;
        }
     
        public Civilite getCivilite() {
            return civilite;
        }
     
        public void setCivilite(Civilite civilite) {
            this.civilite = civilite;
        }
        @XmlTransient
        public List<Hotesse> getHotesseCollection() {
            return hotesseCollection;
        }
     
        public void setHotesseCollection(List<Hotesse> hotesseCollection) {
            this.hotesseCollection = hotesseCollection;
        }
        @XmlTransient
        public List<Passage> getPassageCollection() {
            return passageCollection;
        }
     
        public void setPassageCollection(List<Passage> passageCollection) {
            this.passageCollection = passageCollection;
        }
        @XmlTransient
        public List<SourceInscription> getPersonneUtilisateurSourceCollection() {
            return PersonneUtilisateurSourceCollection;
        }
     
        public void setPersonneUtilisateurSourceCollection(List<SourceInscription> PersonneUtilisateurSourceCollection) {
            this.PersonneUtilisateurSourceCollection = PersonneUtilisateurSourceCollection;
        }
     
        @XmlTransient
        public List<Produit> getProduitCollection() {
            return produitCollection;
        }
     
        public void setProduitCollection(List<Produit> produitCollection) {
            this.produitCollection = produitCollection;
        }
        @XmlTransient
        public List<Droit> getDroitCollection() {
            return droitCollection;
        }
     
        public void setDroitCollection(List<Droit> droitCollection) {
            this.droitCollection = droitCollection;
        }
        @XmlTransient
        public List<ReponseClient> getReponseClientCollection() {
            return reponseClientCollection;
        }
     
        public void setReponseClientCollection(List<ReponseClient> reponseClientCollection) {
            this.reponseClientCollection = reponseClientCollection;
        }
        @XmlTransient
        public List<AutreInformation> getAutreInformationCollection() {
            return autreInformationCollection;
        }
     
        public void setAutreInformationCollection(List<AutreInformation> autreInformationCollection) {
            this.autreInformationCollection = autreInformationCollection;
        }
        @XmlTransient
         public List<Session> getSessionCollection() {
            return sessionCollection;
        }
     
        public void setSessionCollection(List<Session> sessionCollection) {
            this.sessionCollection = sessionCollection;
        }
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (keyClient != null ? keyClient.hashCode() : 0);
            return hash;
        }
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Personne)) {
                return false;
            }
            Personne other = (Personne) object;
            if ((this.keyClient == null && other.keyClient != null) || (this.keyClient != null && !this.keyClient.equals(other.keyClient))) {
                return false;
            }
            return true;
        }
     
        @Override
        public String toString() {
            return "fr.ietevents.client.Entity.Personne[ keyClient=" + keyClient + " ]";
        }
     
    }
    j'aimerais pouvoir faire des des recherche sur certain champs de collection exemple

    @ManyToMany(cascade = CascadeType.ALL)
    private List<Session> sessionCollection;

    son entity :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    /*
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
    package fr.ietevents.client.Entity;
     
    import java.io.Serializable;
    import java.util.List;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToMany;
    import javax.persistence.ManyToOne;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    import javax.validation.constraints.NotNull;
    import javax.validation.constraints.Size;
    import javax.xml.bind.annotation.XmlRootElement;
    import javax.xml.bind.annotation.XmlTransient;
     
    /**
     *
     * @author IETEVENTS
     */
    @Entity
    @Table(name = "Session")
    @XmlRootElement
    @NamedQueries({
        @NamedQuery(name = "Session.findAll", query = "SELECT s FROM Session s"),
        @NamedQuery(name = "Session.findByKeyEdition", query = "SELECT s FROM Session s WHERE s.keySession = :keySession"),
        @NamedQuery(name = "Session.findByNom", query = "SELECT s FROM Session s WHERE s.nom = :nom")})
    public class Session implements Serializable {
     
        private static final long serialVersionUID = 1L;
        @Id
        @Basic(optional = false)
        @NotNull
        @Column(name = "KeySession")
        private String keySession;
        @Size(max = 90)
        @Column(name = "Nom")
        private String nom;
        @ManyToOne(cascade = CascadeType.ALL)
        @JoinColumn(name = "KeyAdresse")
        private Adresse adresse ;
        @OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Passage> passageCollection;
        @OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Droit> droitCollection;
        @OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Question> questionCollection;
        @OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Css> cssCollection;
        @OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<Site> siteCollection;
         @OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
        private List<CrmLien> crmLienCollection;
        @ManyToMany(mappedBy="sessionCollection",cascade = CascadeType.ALL)
        private List<Personne> personneCollection;
     
        public Session() {
        }
        public Session(String keySession) {
            this.keySession = keySession;
        }
     
        public String getKeySession() {
            return keySession;
        }
     
        public void setKeySession(String keyEdition) {
            this.keySession = keyEdition;
        }
     
        public String getNom() {
            return nom;
        }
     
        public void setNom(String nom) {
            this.nom = nom;
        }
     
        public Adresse getAdresse() {
            return adresse;
        }
     
        public void setAdresse(Adresse adresse) {
            this.adresse = adresse;
        }
        @XmlTransient
        public List<CrmLien> getCrmLienCollection() {
            return crmLienCollection;
        }
     
        public void setCrmLienCollection(List<CrmLien> crmLienCollection) {
            this.crmLienCollection = crmLienCollection;
        }
     
        @XmlTransient
        public List<Passage> getPassageCollection() {
            return passageCollection;
        }
     
        public void setPassageCollection(List<Passage> passageCollection) {
            this.passageCollection = passageCollection;
        }
        @XmlTransient
        public List<Droit> getDroitCollection() {
            return droitCollection;
        }
     
        public void setDroitCollection(List<Droit> droitCollection) {
            this.droitCollection = droitCollection;
        }
        @XmlTransient
        public List<Question> getQuestionCollection() {
            return questionCollection;
        }
     
        public void setQuestionCollection(List<Question> questionCollection) {
            this.questionCollection = questionCollection;
        }
        @XmlTransient
        public List<Css> getCssCollection() {
            return cssCollection;
        }
     
        public void setCssCollection(List<Css> CssCollection) {
            this.cssCollection = CssCollection;
        }
        @XmlTransient
        public List<Site> getSiteCollection() {
            return siteCollection;
        }
     
        public void setSiteCollection(List<Site> siteCollection) {
            this.siteCollection = siteCollection;
        }
        @XmlTransient
        public List<Personne> getPersonneCollection() {
            return personneCollection;
        }
     
        public void setPersonneCollection(List<Personne> personneCollection) {
            this.personneCollection = personneCollection;
        }
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (keySession != null ? keySession.hashCode() : 0);
            return hash;
        }
     
     
     
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Session)) {
                return false;
            }
            Session other = (Session) object;
            if ((this.keySession == null && other.keySession != null) || (this.keySession != null && !this.keySession.equals(other.keySession))) {
                return false;
            }
            return true;
        }
     
        @Override
        public String toString() {
            return "fr.ietevents.client.Entity.Session[ keyEdition=" + keySession + " ]";
        }
     
    }
    exemple retourner les personne ou le nom de la session commence par session

Discussions similaires

  1. [XL-2010] Recherche VLOOKUP avec argument variable
    Par mike2222 dans le forum Macros et VBA Excel
    Réponses: 4
    Dernier message: 15/05/2014, 08h37
  2. [XL-2003] Macro Recherche avec 2 variables
    Par LeSmoox dans le forum Macros et VBA Excel
    Réponses: 5
    Dernier message: 14/03/2012, 18h47
  3. Réponses: 10
    Dernier message: 25/06/2010, 09h02
  4. BASH: date avec argument variable
    Par Estats dans le forum Shell et commandes GNU
    Réponses: 3
    Dernier message: 27/10/2008, 14h12
  5. méthodes avec nombres d'arguments variable
    Par spynux dans le forum Langage
    Réponses: 2
    Dernier message: 26/05/2006, 13h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo