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

Persistance des données Java Discussion :

Jaxb JPA géneration de classe


Sujet :

Persistance des données Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Inscrit en
    Mars 2007
    Messages
    100
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Mars 2007
    Messages : 100
    Par défaut Jaxb JPA géneration de classe
    Bonjour à tous je souhaite générer mes classes de persistance via des xsd.
    j'ai crée un fichier ant qui fait cela, mais mon problème que ça génère pas les annotations nécessaire.
    voici mon fichier ant
    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
     
    <?xml version="1.0" encoding="iso-8859-1"?>
    <project name="xml2java_JAXB2" basedir="." default="build"  >
    <!-- Création tache -->
     <taskdef name="maTacheXJC" classname="com.sun.tools.xjc.XJCTask">
      <classpath>
       <fileset dir="./LIB" includes="*.jar"/>
      </classpath>
     </taskdef>
    <!-- Génération des classes java a partir des XSD -->
     <target name="build" >
     <maTacheXJC schema="nomenclature.xsd"  destdir="src"   package="gen">
     
       	<arg line="-Xcollection-setter-injector"/>
      </maTacheXJC>
     </target>
     
    </project>
    le fichier xsd est le suivant

    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
     
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema targetNamespace="http://www.eclipse.org/emft/teneo"
    	elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    	xmlns="http://www.eclipse.org/emft/teneo" 
    	>
     
    	<xsd:complexType name="nomenclatureCMO">
    	<xsd:annotation>
    		<xsd:appinfo source="teneo.jpa">@Table(name="REF_NOMENCLATURE")</xsd:appinfo>
    	</xsd:annotation>
     
    			<xsd:sequence>
    						<xsd:element name="id" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="ID")</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:long">
    									<xsd:totalDigits value="10"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="libelle" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="LIBELLE") 	</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:string">
    									<xsd:maxLength value="50"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="profondeur" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="PROFONDEUR") 	</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:int">
    									<xsd:totalDigits value="10"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="niveauGestion" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="NIVEAUGESTION") 	</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:int">
    									<xsd:totalDigits value="10"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="nbGammes" nillable="true">
     
    							<xsd:simpleType>
    							<xsd:annotation>
    								<xsd:appinfo source="teneo.jpa">@Column(name="NBGAMMES") 	</xsd:appinfo>
    							</xsd:annotation>
    								<xsd:restriction base="xsd:int">
    									<xsd:totalDigits value="10"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="estPrincipale" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="ESTPRINCIPALE") 	</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:int">
    									<xsd:totalDigits value="1"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="estActive" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="ESTACTIVE") 	</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:int">
    									<xsd:totalDigits value="1"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="codeRacine" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="CODERACINE") 	</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:string">
    									<xsd:maxLength value="50"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="libelleRacine" nillable="true">
    						<xsd:annotation>
    							<xsd:appinfo source="teneo.jpa">@Column(name="LIBELLERACINE") 	</xsd:appinfo>
    						</xsd:annotation>
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:string">
    									<xsd:maxLength value="50"/>
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="structureNomenclature" type="structureNomenclatureCMO" maxOccurs="unbounded" minOccurs="1"></xsd:element>
    			</xsd:sequence>
    	</xsd:complexType>
     
     
    		<xsd:complexType name="structureNomenclatureCMO">
    			<xsd:sequence>
    					<xsd:element name="id" nillable="true">
    						<xsd:simpleType>
    							<xsd:restriction base="xsd:long">
    								<xsd:totalDigits value="10"/>
    							</xsd:restriction>
    						</xsd:simpleType>
    					</xsd:element>
     
    					<xsd:element name="libelle" nillable="true">
    						<xsd:simpleType>
    							<xsd:restriction base="xsd:string">
    								<xsd:maxLength value="50"/>
    							</xsd:restriction>
    						</xsd:simpleType>
    					</xsd:element>
     
    					<xsd:element name="niveau" nillable="true">
    						<xsd:simpleType>
    							<xsd:restriction base="xsd:int">
    								<xsd:totalDigits value="10"/>
    							</xsd:restriction>
    						</xsd:simpleType>
    					</xsd:element>
     
    					<xsd:element name="estNiveauGestion" nillable="true">
    						<xsd:simpleType>
    							<xsd:restriction base="xsd:boolean">
    							</xsd:restriction>
    						</xsd:simpleType>
    					</xsd:element>
    					<xsd:element name="nomenclature" type="nomenclatureCMO"></xsd:element>
    		  </xsd:sequence>
    	</xsd:complexType>
     
     
    </xsd:schema>
    Lorsque je lance le script ant ça génère tout sauf les annotation, il manque par exemle @Table(name="REF_NOMENCLATURE")
    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
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
     
    //
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-520 
    // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
    // Any modifications to this file will be lost upon recompilation of the source schema. 
    // Generated on: 2009.08.21 at 11:09:04 AM GMT+01:00 
    //
     
     
    package gen;
     
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
     
     
    /**
     * <p>Java class for nomenclatureCMO complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType name="nomenclatureCMO">
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="id">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}long">
     *               &lt;totalDigits value="10"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="libelle">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               &lt;maxLength value="50"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="profondeur">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}int">
     *               &lt;totalDigits value="10"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="niveauGestion">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}int">
     *               &lt;totalDigits value="10"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="nbGammes">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}int">
     *               &lt;totalDigits value="10"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="estPrincipale">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}int">
     *               &lt;totalDigits value="1"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="estActive">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}int">
     *               &lt;totalDigits value="1"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="codeRacine">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               &lt;maxLength value="50"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="libelleRacine">
     *           &lt;simpleType>
     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               &lt;maxLength value="50"/>
     *             &lt;/restriction>
     *           &lt;/simpleType>
     *         &lt;/element>
     *         &lt;element name="structureNomenclature" type="{http://www.eclipse.org/emft/teneo}structureNomenclatureCMO" maxOccurs="unbounded"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "nomenclatureCMO", propOrder = {
        "id",
        "libelle",
        "profondeur",
        "niveauGestion",
        "nbGammes",
        "estPrincipale",
        "estActive",
        "codeRacine",
        "libelleRacine",
        "structureNomenclature"
    })
    public class NomenclatureCMO {
     
        @XmlElement(required = true, type = Long.class, nillable = true)
        protected Long id;
        @XmlElement(required = true, nillable = true)
        protected String libelle;
        @XmlElement(required = true, type = Integer.class, nillable = true)
        protected Integer profondeur;
        @XmlElement(required = true, type = Integer.class, nillable = true)
        protected Integer niveauGestion;
        @XmlElement(required = true, type = Integer.class, nillable = true)
        protected Integer nbGammes;
        @XmlElement(required = true, type = Integer.class, nillable = true)
        protected Integer estPrincipale;
        @XmlElement(required = true, type = Integer.class, nillable = true)
        protected Integer estActive;
        @XmlElement(required = true, nillable = true)
        protected String codeRacine;
        @XmlElement(required = true, nillable = true)
        protected String libelleRacine;
        @XmlElement(required = true)
        protected List<StructureNomenclatureCMO> structureNomenclature;
     
        /**
         * Gets the value of the id property.
         * 
         * @return
         *     possible object is
         *     {@link Long }
         *     
         */
        public Long getId() {
            return id;
        }
     
        /**
         * Sets the value of the id property.
         * 
         * @param value
         *     allowed object is
         *     {@link Long }
         *     
         */
        public void setId(Long value) {
            this.id = value;
        }
     
        /**
         * Gets the value of the libelle property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getLibelle() {
            return libelle;
        }
     
        /**
         * Sets the value of the libelle property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setLibelle(String value) {
            this.libelle = value;
        }
     
        /**
         * Gets the value of the profondeur property.
         * 
         * @return
         *     possible object is
         *     {@link Integer }
         *     
         */
        public Integer getProfondeur() {
            return profondeur;
        }
     
        /**
         * Sets the value of the profondeur property.
         * 
         * @param value
         *     allowed object is
         *     {@link Integer }
         *     
         */
        public void setProfondeur(Integer value) {
            this.profondeur = value;
        }
     
        /**
         * Gets the value of the niveauGestion property.
         * 
         * @return
         *     possible object is
         *     {@link Integer }
         *     
         */
        public Integer getNiveauGestion() {
            return niveauGestion;
        }
     
        /**
         * Sets the value of the niveauGestion property.
         * 
         * @param value
         *     allowed object is
         *     {@link Integer }
         *     
         */
        public void setNiveauGestion(Integer value) {
            this.niveauGestion = value;
        }
     
        /**
         * Gets the value of the nbGammes property.
         * 
         * @return
         *     possible object is
         *     {@link Integer }
         *     
         */
        public Integer getNbGammes() {
            return nbGammes;
        }
     
        /**
         * Sets the value of the nbGammes property.
         * 
         * @param value
         *     allowed object is
         *     {@link Integer }
         *     
         */
        public void setNbGammes(Integer value) {
            this.nbGammes = value;
        }
     
        /**
         * Gets the value of the estPrincipale property.
         * 
         * @return
         *     possible object is
         *     {@link Integer }
         *     
         */
        public Integer getEstPrincipale() {
            return estPrincipale;
        }
     
        /**
         * Sets the value of the estPrincipale property.
         * 
         * @param value
         *     allowed object is
         *     {@link Integer }
         *     
         */
        public void setEstPrincipale(Integer value) {
            this.estPrincipale = value;
        }
     
        /**
         * Gets the value of the estActive property.
         * 
         * @return
         *     possible object is
         *     {@link Integer }
         *     
         */
        public Integer getEstActive() {
            return estActive;
        }
     
        /**
         * Sets the value of the estActive property.
         * 
         * @param value
         *     allowed object is
         *     {@link Integer }
         *     
         */
        public void setEstActive(Integer value) {
            this.estActive = value;
        }
     
        /**
         * Gets the value of the codeRacine property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getCodeRacine() {
            return codeRacine;
        }
     
        /**
         * Sets the value of the codeRacine property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setCodeRacine(String value) {
            this.codeRacine = value;
        }
     
        /**
         * Gets the value of the libelleRacine property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getLibelleRacine() {
            return libelleRacine;
        }
     
        /**
         * Sets the value of the libelleRacine property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setLibelleRacine(String value) {
            this.libelleRacine = value;
        }
     
        /**
         * Gets the value of the structureNomenclature property.
         * 
         * <p>
         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a <CODE>set</CODE> method for the structureNomenclature property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getStructureNomenclature().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link StructureNomenclatureCMO }
         * 
         * 
         */
        public List<StructureNomenclatureCMO> getStructureNomenclature() {
            if (structureNomenclature == null) {
                structureNomenclature = new ArrayList<StructureNomenclatureCMO>();
            }
            return this.structureNomenclature;
        }
     
        /**
         * Sets the value of the structureNomenclature property.
         * 
         * @param structureNomenclature
         *     allowed object is
         *     {@link StructureNomenclatureCMO }
         *     
         */
        public void setStructureNomenclature(List<StructureNomenclatureCMO> structureNomenclature) {
            this.structureNomenclature = structureNomenclature;
        }
     
    }

  2. #2
    Membre éprouvé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    138
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations forums :
    Inscription : Juin 2005
    Messages : 138
    Par défaut
    Salut,

    moi j'ai opté finalement pour hyperjaxb3, plugin pour jaxb, qui permet d'ajouter à tes POJO la couche de persistance JPA.

    Et ca marche nickel !
    Je n'aimai pas la philo de teneo qui fonctionne un peut comme Xdoclet avec le mapping en commentaire !!!

  3. #3
    Membre confirmé
    Inscrit en
    Mars 2007
    Messages
    100
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Mars 2007
    Messages : 100
    Par défaut
    Bonjour, enfin il y a une personne qui connait quelque chose sur ça.

    Donc c'est hyperjaxb3. c'est quoi en faite et comment je peux l'utiliser ?

    Merci

  4. #4
    Membre éprouvé
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    138
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations forums :
    Inscription : Juin 2005
    Messages : 138
    Par défaut
    ATTENTION c'est plutôt nv et donc la doc n'est très riche


    Pour la doc de référence ! (exemples...)
    http://wiki.glassfish.java.net/Wiki....jaxb3Reference

    Comment ca marche !

    Tu as deux solutions:
    Ant ou Maven (tout est sur le site, il suffit de farfouiller )
    https://hyperjaxb3.dev.java.net/

    Bonne chance

  5. #5
    Membre confirmé
    Inscrit en
    Mars 2007
    Messages
    100
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Mars 2007
    Messages : 100
    Par défaut
    Merci pour les liens et pour l'aide j'ai regardé ça reste un peu encore floue pour moi au niveau des xsd, j'ai ajouté des truc et ça génère pas ce que je souhaite comme si il les ignores.
    Comme
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <xsd:annotation>
     
    				<xsd:appinfo>
    					<hj:id >
    						<orm:column name="MY_ID"/>
    						<orm:generated-value  strategy="SEQUENCE" generator="my-sequence"/>
    						<orm:sequence-generator name="my-sequence" sequence-name="MY_SEQ"/>
    					</hj:id>	
    				</xsd:appinfo>
    			</xsd:annotation>
    les <orm:colomn ... sont ignorée et aussi hj je trouve dessous que hj:id et hj:table

  6. #6
    Membre confirmé
    Inscrit en
    Mars 2007
    Messages
    100
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Mars 2007
    Messages : 100
    Par défaut
    Mon problème maintenant c'est comment définir mes propres valeur pour mes annotation par exemple je défini le nom de la table le générateur de séquence le lazy=''false" ...
    Mais avec ça j'ai jamais réussi à le faire

    Merci de m'aider.

Discussions similaires

  1. JPA, Spring et classe java
    Par Spidermeu dans le forum JPA
    Réponses: 3
    Dernier message: 29/06/2012, 09h24
  2. [JAXB] JAXB 2.0 et class customization
    Par Apach2011 dans le forum Format d'échange (XML, JSON...)
    Réponses: 0
    Dernier message: 13/04/2012, 11h46
  3. [JAXB] Marshalling/Unmarshalling de classes non générées
    Par Invité dans le forum Persistance des données
    Réponses: 0
    Dernier message: 04/01/2009, 15h35
  4. [JAXB] Après génération des classes problème avec AccessType
    Par GabriHell dans le forum Persistance des données
    Réponses: 3
    Dernier message: 17/09/2008, 11h52
  5. [JAXB] Generation dynamique des classes
    Par Invité dans le forum Persistance des données
    Réponses: 6
    Dernier message: 09/09/2008, 12h20

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