Problème de Correspondance Objet/Relationnel
Bonjour à tous ,
j'ai un problème sur la relation entre mes classes.
En fait j'ai trois classe et mon problème est comment charger la liste d'exploitations contenue comme attribut dans CANTONVIRTUELLE.
Merci pour le temps que vous prendrez à me répondre.
PREMIÈRE CLASSE: EXPLOITATIONS
Code:
1 2 3 4 5 6 7
|
public class ExploitationRICA {
private int ident;
private int region;
private int otex;
.... |
DEUXIÈME CLASSE: CANTON
Code:
1 2 3 4 5 6 7 8 9 10
|
public class CantonRGA
{
private int id;
private String region;
private int depcanton;
private String nomCanton;
private int nbOtex45Commune;
.... |
TROISIÈME CLASSE: CANTONVIRTUELLE
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
public class CantonVIRTUELLE {
private int nbExploitationOtex45;
private CantonRGA crga;
private List<ExploitationRICA> exploitations;
public static void main(){
List<ExploitationRICA> listeexploitations = new ArrayList<ExploitationRICA>();
List<CantonRGA> listecantons = new ArrayList<CantonRGA>();
} |