Code example for Timestamp

Methods: toString

0
	 * Gets the current object as a formatted string for storage. (start and end time stored as timestamps) 
	 * @return String formatted as "[startTime as (yyyy-MM-dd HH:mm:ss.SSS)], [endTime as (yyyy-MM-dd HH:mm:ss.SSS)]" 
	 */ 
	public String sessionAsStoredString(){ 
		//should match what constructor SessionData(String storedString) needs for parsing 
	    java.sql.Timestamp timeStampBegan = new 
	    		 Timestamp(this.began.getTime());
	    java.sql.Timestamp timeStampEnded = new 
	    		 Timestamp(this.ended.getTime());
	     
 
 
		return timeStampBegan.toString() + storageDividerKey + timeStampEnded.toString();
	} 
		 
	/** 
	 * Compare method so we can confirm another object is essentially the same. 
	 * internally compares both start and end times, if they are both the same, theobjects are equal. 
	 */ 
	public int compare(Object o1, Object o2)
	{