Skip to content

models.EventItem

Vikramaditya Kukreja edited this page Jan 29, 2017 · 1 revision

package com.csatimes.dojma.models.EventItem
extends RealmObject
access public

@Primary String key
@Required String title
@Required String startDate
@Required String startTime
String desc
String location
@Excluded long time

###Extra Methods ####getStartDateObj() #####Get Date object return Date - Returns a Date object from the date mentioned in Firebase or null if date could not be constructed

   getStartDateObj() {
   EventItem foo;
   //Initialise the foo item from the database
   ...
   Date dateObj = foo.getStartDateObj();

####getStartDateFormatted() #####Get date as a string of the format dd MMM return String - Formatted date or else return the String as mentioned in Firebase

   EventItem foo;
   //Initialise the foo item from the database
   ...
   DHC.log("Formatted date is " + foo.getStartDateFormatted());

####getStartTimeFormatted() #####Get time as a string of the format h:mm a return String - Formatted time or else return the String as mentioned in Firebase

   EventItem foo;
   //Initialise the foo item from the database
   ...
   DHC.log("Formatted time is " + foo.getStartTimeFormatted());
Clone this wiki locally