1 43 package net.jforum.entities; 44 45 import java.io.Serializable ; 46 import java.text.SimpleDateFormat ; 47 import java.util.GregorianCalendar ; 48 49 import net.jforum.util.preferences.ConfigKeys; 50 import net.jforum.util.preferences.SystemGlobals; 51 52 56 public class MostUsersEverOnline implements Serializable 57 { 58 private int total; 59 private String date; 60 private long timeInMillis; 61 62 public MostUsersEverOnline() {} 63 64 public int getTotal() { 65 return this.total; 66 } 67 68 public String getDate() { 69 return this.date; 70 } 71 72 public long getTimeInMillis() { 73 return this.timeInMillis; 74 } 75 76 public void setTotal(int total) { 77 this.total = total; 78 } 79 80 public void setDate(String date) { 81 this.date = date; 82 } 83 84 public void setTimeInMillis(long time) { 85 this.timeInMillis = time; 86 87 SimpleDateFormat df = new SimpleDateFormat (SystemGlobals.getValue(ConfigKeys.DATE_TIME_FORMAT)); 88 GregorianCalendar gc = new GregorianCalendar (); 89 gc.setTimeInMillis(time); 90 91 this.setDate(df.format(gc.getTime())); 92 } 93 } 94 | Popular Tags |