GrOOm  0.2
BTS SNIR LaSalle Avignon 2020
GroomBDD.java
Aller à la documentation de ce fichier.
1 package com.example.groom;
2 
3 import android.content.Context;
4 import android.database.sqlite.SQLiteDatabase;
5 
6 public class GroomBDD
7 {
8  private SQLiteDatabase bdd = null;
9  private GroomSQLite groomSQLite = null;
10 
11  public GroomBDD(Context context)
12  {
13  groomSQLite = new GroomSQLite(context);
14  }
15 
16  public void open()
17  {
18  if (bdd == null)
19  bdd = groomSQLite.getWritableDatabase();
20  }
21 
22  public void close()
23  {
24  if (bdd != null)
25  if (bdd.isOpen())
26  bdd.close();
27  }
28 
29  public SQLiteDatabase getBDD()
30  {
31  if (bdd == null)
32  open();
33  return bdd;
34  }
35 }
SQLiteDatabase bdd
Definition: GroomBDD.java:8
GroomBDD(Context context)
Definition: GroomBDD.java:11
SQLiteDatabase getBDD()
Definition: GroomBDD.java:29