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
|
package Controlleur;
import Modele.*;
import com.db4o.*;
public class Main {
public static void main(String[] args) {
ObjectContainer db = Db4o.openFile("baselabo.yap");
// Produit acheté
//POUR ANTISTRESS 24 STRESS SURMENAGE B/28
Produit achat1= new ProduitAchete("A001","Oxyde de magnésium 1L",5 ,50, "Boiron", 7);
Produit achat2= new ProduitAchete("A002","vitamine B3 2L",7, 20, "Unilever",9 );
Produit achat3= new ProduitAchete("A003","extrait de Mélisse (Melissa officinalis) 1L",5, 20, "sanofi adventis", 7);
Produit achat4= new ProduitAchete("A004","H.P.S.(Hydrolysat de Poissons Sauvages) 1L",10, 20, "Pfizer", 12);
Produit achat5= new ProduitAchete("A005","extrait de Houblon(Humulus lupulus) 1L",8,10, "3msanté", 10);
//POUR ARTICULATION 24 GLUCOSAMINE ET CHONDROÏTINE 28 cp
Produit achat6= new ProduitAchete("A006","chondroïtine(cartilage de raie, calcium marin) 1L", 5, 10,"physio-mins", 7);
Produit achat7= new ProduitAchete("A007","huile de poisson 750 ML", 7, 15,"physio-mins", 9);
Produit achat8= new ProduitAchete("A008","vitamine C 1ML", 3, 20,"boiron", 5);
Produit achat9= new ProduitAchete("A009","gluconate de manganèse 750ml", 9, 10 ,"eugène-pharma", 11);
Produit achat10= new ProduitAchete("A010","sulfate de zinc 1L", 4, 5,"sepsa", 6);
//GELEE ROYALE 1200mg 12 AMPOULES/10ml (Vie et Santé)
Produit achat11= new ProduitAchete("A011","Eau purifiée QSP 2L", 0.50f, 30,"sepsa", 1);// ca ne m'affiche pas cette ligne sur db4o
Produit achat12= new ProduitAchete("A012","jus d'Argousier à base de concentré 2L", 6, 15,"sanofi adventis", 8);
Produit achat13= new ProduitAchete("A013","Gelée Royale 750 ML", 18, 15,"sanofi aventis", 20);
Produit achat14= new ProduitAchete("A014","Jus d'orange à base de concentré 2L", 1.5f , 30,"nectar Import-export SA", 2);// celle la aussi
Produit achat15= new ProduitAchete("A015","Miel", 4, 5,"bzzz SA", 6);
// Produit que l'ont fabrique
Produit pdt1= new ProduitFabrique("F001","ANTISTRESS 24 STRESS SURMENAGE B/28(Forte pharma)", 10.95d, 200 , "15 jours", 2190);// 200 qtés
Produit pdt2= new ProduitFabrique("F002","POUR ARTICULATION 24 GLUCOSAMINE ET CHONDROÏTINE 28 cp", 13.95d, 200 , "20 jours",2790 );// pareil
Produit pdt3= new ProduitFabrique("F003","GELEE ROYALE 1200mg 12 AMPOULES/10ml", 5.99d, 300,"30 jours", 2890);
db.set(achat1);
db.set(achat2);
db.set(achat3);
db.set(achat4);
db.set(achat5);
db.set(achat6);
db.set(achat7);
db.set(achat8);
db.set(achat9);
db.set(achat10);
db.set(achat11);
db.set(achat12);
db.set(achat13);
db.set(achat14);
db.set(achat15);
db.set(pdt1);
db.set(pdt2);
db.set(pdt3);
db.commit();
db.close();
System.out.println("achat1: "+achat1.getCode());
}
} |