1 | package org.medias.eccad.persistance.dummy; |
---|
2 | |
---|
3 | import java.util.LinkedList; |
---|
4 | import java.util.List; |
---|
5 | |
---|
6 | import org.medias.eccad.helpers.Donnees; |
---|
7 | import org.medias.eccad.modele.Grille; |
---|
8 | import org.medias.eccad.persistance.dao.GrilleDAO; |
---|
9 | import org.medias.eccad.persistance.exception.PersistanceException; |
---|
10 | |
---|
11 | public class GrilleDAOdummy implements GrilleDAO { |
---|
12 | |
---|
13 | public float[][] getGrilleValue(int oid) throws PersistanceException { |
---|
14 | float[][] data = new float[Donnees.LIGNE][Donnees.COLONNE]; |
---|
15 | |
---|
16 | for (int i=0; i < Donnees.LIGNE; i++) |
---|
17 | for (int j=0; j<Donnees.COLONNE; j++) |
---|
18 | data[Donnees.LIGNE-1-i][j] = i+j; |
---|
19 | |
---|
20 | return data; |
---|
21 | } |
---|
22 | public List<Grille> getListGrille(long id_produit,long id_parametre, String date_debut, |
---|
23 | String date_fin) throws PersistanceException { |
---|
24 | |
---|
25 | Grille grille; |
---|
26 | List<Grille> liste = new LinkedList<Grille>(); |
---|
27 | |
---|
28 | grille = new Grille(1, new java.sql.Date(1)); |
---|
29 | grille.setLegend("legend1"); |
---|
30 | liste.add(grille); |
---|
31 | |
---|
32 | grille = new Grille(2, new java.sql.Date(2)); |
---|
33 | grille.setLegend("legend2"); |
---|
34 | liste.add(grille); |
---|
35 | |
---|
36 | grille = new Grille(3, new java.sql.Date(3)); |
---|
37 | grille.setLegend("legend3"); |
---|
38 | liste.add(grille); |
---|
39 | |
---|
40 | grille = new Grille(4, new java.sql.Date(4)); |
---|
41 | grille.setLegend("legend4"); |
---|
42 | liste.add(grille); |
---|
43 | |
---|
44 | grille = new Grille(5, new java.sql.Date(5)); |
---|
45 | grille.setLegend("legend5"); |
---|
46 | liste.add(grille); |
---|
47 | |
---|
48 | return liste; |
---|
49 | } |
---|
50 | |
---|
51 | public List<Grille> getListGrille(long id_produit, String date_debut, |
---|
52 | String date_fin) throws PersistanceException { |
---|
53 | |
---|
54 | Grille grille; |
---|
55 | List<Grille> liste = new LinkedList<Grille>(); |
---|
56 | |
---|
57 | grille = new Grille(1, new java.sql.Date(1)); |
---|
58 | grille.setLegend("legend1"); |
---|
59 | liste.add(grille); |
---|
60 | |
---|
61 | grille = new Grille(2, new java.sql.Date(2)); |
---|
62 | grille.setLegend("legend2"); |
---|
63 | liste.add(grille); |
---|
64 | |
---|
65 | grille = new Grille(3, new java.sql.Date(3)); |
---|
66 | grille.setLegend("legend3"); |
---|
67 | liste.add(grille); |
---|
68 | |
---|
69 | grille = new Grille(4, new java.sql.Date(4)); |
---|
70 | grille.setLegend("legend4"); |
---|
71 | liste.add(grille); |
---|
72 | |
---|
73 | grille = new Grille(5, new java.sql.Date(5)); |
---|
74 | grille.setLegend("legend5"); |
---|
75 | liste.add(grille); |
---|
76 | |
---|
77 | return liste; |
---|
78 | } |
---|
79 | |
---|
80 | public String getCodification(long oid) throws PersistanceException { |
---|
81 | return "named"; |
---|
82 | } |
---|
83 | |
---|
84 | public String getDateGrille(long id_grille) throws PersistanceException { |
---|
85 | return "19700101"; |
---|
86 | } |
---|
87 | |
---|
88 | public Grille getFirstGrilleByProduit(long id_produit) throws PersistanceException { |
---|
89 | // TODO Auto-generated method stub |
---|
90 | return null; |
---|
91 | } |
---|
92 | |
---|
93 | public Grille getGrille(long id_grille) throws PersistanceException { |
---|
94 | // TODO Auto-generated method stub |
---|
95 | return null; |
---|
96 | } |
---|
97 | |
---|
98 | public float getGrilleResolution(long id_grille) throws PersistanceException { |
---|
99 | // TODO Auto-generated method stub |
---|
100 | return 0; |
---|
101 | } |
---|
102 | public float getProduitResolution(long id_produit) throws PersistanceException { |
---|
103 | // TODO Auto-generated method stub |
---|
104 | return 0; |
---|
105 | } |
---|
106 | |
---|
107 | } |
---|