package com.example.db01;

import java.util.List;

import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class Alarm 
{
	public static final String TABLE_NAME = "alarm";
	public static final String COL_ID = "_id";
	public static final String COL_CREATEDTIME = "created_time";
	public static final String COL_MODIFIEDTIME = "modified_time";
	public static final String COL_NAME = "name";
	public static final String COL_FROMDATE = "from_date";
	public static final String COL_TODATE = "to_date";
	public static final String COL_RULE = "rule";
	public static final String COL_INTERVAL = "interval";
	public static final String COL_SOUND = "sound";
	
	
	public static final String HIGH = "H";
	public static final String MED = "M";
	public static final String LOW = "L"; 
	
	
	public static String name;
	public static String fromDate;
	public static String toDate;
	public static String at;
	public static String status;
	public static long timestamp;
	public static long createdTime;
	public static long modifiedTime;
	public static String rule;
	public static String interval;
	public static Boolean sound = Boolean.FALSE;
	public static String info;
	
	//public List<AlarmTime> occurrences;
	
	private long id;
	
	public Alarm() {}
	
	public Alarm(long id)
	{
		this.id = id;
	}
	
	public void reset()
	{
		//super.reset();
		
		name = null;
		fromDate = null;
		toDate = null;
		at = null;
		status = null;
		timestamp = 0;
		createdTime = 0;
		modifiedTime = 0;
		rule = null;
		interval = null;
		sound = Boolean.FALSE;
		info = null;
	}	
	
	/*
	 public static long save(SQLiteDatabase db) 
	{
		  
			ContentValues cv = new ContentValues();
			long now = System.currentTimeMillis();
			cv.put(COL_CREATEDTIME, now);
			cv.put(COL_MODIFIEDTIME, now);
			cv.put(COL_NAME, name==null ? "" : name);
			cv.put(COL_FROMDATE, fromDate);
			cv.put(COL_TODATE, toDate);
			cv.put(COL_RULE, rule);
			cv.put(COL_INTERVAL, interval);
			cv.put(COL_SOUND, sound ? 1 : 0);
			
			
			return db.insert(TABLE_NAME, null, cv);
	}
	*/
	public long getId() 
	{
		return id;
	}
	public void setId(long id)
	{
		this.id = id;
	}
	
	/****/
	public long getCreatedTime()
	{
		return createdTime;
	}
	public void setCreatedTime(long createdTime) 
	{
		this.createdTime = createdTime;
	}
	/****/
	public long getModifiedTime() 
	{
		return modifiedTime;
	}
	public void setModifiedTime(long modifiedTime) 
	{
		this.modifiedTime = modifiedTime;
	}
	/****/
	public String getName() 
	{
		return name;
	}
	public void setName(String name) 
	{
		this.name = name;
	}
	/****/
	public String getFromDate() 
	{
		return fromDate;
	}
	public void setFromDate(String fromDate)
	{
		this.fromDate = fromDate;
	}
	/****/
	public String getToDate() 
	{
		return toDate;
	}
	
	public void setToDate(String toDate) 
	{
		this.toDate = toDate;
	}
	
	public String getStatus() 
	{
		return status;
	}
	public void setStatus(String status)
	{
		this.status = status;
	}
	
	
	public String getAt() 
	{
		return at;
	}
	public void setAt(String at) 
	{
		this.at = at;
	}
	
	
	public long getTimestamp() 
	{
		return timestamp;
	}
	public void SetTimestamp(long timestamp) 
	{
		this.timestamp = timestamp;
	}
	
	/****/
	public String getRule() 
	{
		return rule;
	}
	public void setRule(String rule) 
	{
		this.rule = rule;
	}
	/****/
	public String getInterval()
	{
		return interval;
	}
	public void setInterval(String interval) 
	{
		this.interval = interval;
	}
	/****/
	public Boolean getSound()
	{
		return sound;
	}
	public void setSound(Boolean sound)
	{
		this.sound = sound;
	}	
	/****/
	public String getInfo()
	{
		return info;
	}
	public void setInfo(String info) 
	{
		this.info = info;
	}
	
	

}
