Page MenuHomec4science

ContextApp.java
No OneTemporary

File Metadata

Created
Thu, Jan 2, 23:08

ContextApp.java

package com.example.genomicprivacy;
import FrameWork.MedUnit;
import FrameWork.Patient;
import FrameWork.RequestPatient;
import android.app.Application;
import android.content.Context;
/**
*
* @author Serrano Kevin
* @author Weber Jeremy
*
*/
public class ContextApp extends Application {
/**
* The context App object
*/
private static ContextApp instance;
/**
* The patient object
*/
private static Patient p;
/**
* the request patient object
*/
private static RequestPatient rp;
/**
* The medical unit object
*/
private static MedUnit mu;
/**
* @return the medical unit object
*/
public static MedUnit getMu() {
return mu;
}
/**
* array of result for Metabolic disorders
*/
public static double result12;
/**
*
* @return Result12
*/
public static double getResult12() {
return result12;
}
public static void setResult12(double result12) {
ContextApp.result12 = result12;
}
/**
* Save the Medical Unit
* @param mu
*/
public static void setMu(MedUnit mu) {
ContextApp.mu = mu;
}
/**
* @return A request patient object
*/
public static RequestPatient getRp() {
return rp;
}
/**
* Save a request patient
* @param Request Patient
*/
public static void setRp(RequestPatient rp) {
ContextApp.rp = rp;
}
/**
* @return the patient object
*/
public static Patient getP() {
return p;
}
/**
* Save the patient
* @param p
*/
public static void setP(Patient p) {
ContextApp.p = p;
}
/**
* @return the context of the application
*/
public static Context getContext(){
return instance.getApplicationContext();
}
@Override
public void onCreate() {
super.onCreate();
instance = this;
}
}

Event Timeline