/* ===================================================================
* ReportingDayDatum.java
*
* Created Sep 14, 2009 10:37:10 AM
*
* Copyright (c) 2009 Solarnetwork.net Dev Team.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
* ===================================================================
* $Id$
* ===================================================================
*/
package net.solarnetwork.central.datum.domain;
import java.util.TimeZone;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import org.joda.time.LocalTime;
/**
* Extension of {@link DayDatum} with some additional properties
* geared towards reporting.
*
* @author matt
* @version $Revision$ $Date$
*/
public class ReportingDayDatum extends DayDatum implements ReportingDatum {
private static final long serialVersionUID = 8461923146681980795L;
private String timeZoneId = TimeZone.getDefault().getID();
private Float latitude;
private Float longitude;
/* (non-Javadoc)
* @see net.sf.solarnetwork.central.domain.ReportingDatum#getLocalDate()
*/
public LocalDate getLocalDate() {
if ( super.getCreated() == null ) {
return null;
}
return super.getCreated().toLocalDate();
}
@Override
public DateTime getCreated() {
return null; // force localDate
}
/* (non-Javadoc)
* @see net.sf.solarnetwork.central.domain.ReportingDatum#getLocalTime()
*/
public LocalTime getLocalTime() {
return null;
}
/**
* @return the latitude
*/
public Float getLatitude() {
return latitude;
}
/**
* @param latitude the latitude to set
*/
public void setLatitude(Float latitude) {
this.latitude = latitude;
}
/**
* @return the longitude
*/
public Float getLongitude() {
return longitude;
}
/**
* @param longitude the longitude to set
*/
public void setLongitude(Float longitude) {
this.longitude = longitude;
}
/**
* @return the timeZoneId
*/
public String getTimeZoneId() {
return timeZoneId;
}
/**
* @param timeZoneId the timeZoneId to set
*/
public void setTimeZoneId(String timeZoneId) {
this.timeZoneId = timeZoneId;
}
}