1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| // Classe représentant notre objet metier sous forme de ligne d'une base de données
public class DataRow {
/** Numéro de la ligne*/
private int numRow;
/** Objets contenus dans la ligne*/
private Object[] elements;
public DataRow (int numRow, Object[] dataRow, Colorator colorator){
this.numRow = numRow;
this.elements = dataRow;
colorator.setState(this);
}
public int getNumRow() {return numRow;}
public void setNumRow(int numRow) {this.numRow = numRow;}
public Object[] getElements() {return elements;}
public void setElements(Object[] elements) {this.elements = elements;}
public Object getElementAt(int row){return elements[row];}
} |
Partager