Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Accounting and Billing Portal
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[abportal] View of /src/main/java/eu/smartlm/abs/portal/view/portlet/model/SmartLMUsageRecordTypeSorted.java
ViewVC logotype

View of /src/main/java/eu/smartlm/abs/portal/view/portlet/model/SmartLMUsageRecordTypeSorted.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (annotate)
Wed Jul 28 10:05:51 2010 UTC (13 years, 9 months ago) by dgarcia
File size: 844 byte(s)
First code commit
package eu.smartlm.abs.portal.view.portlet.model;

import java.util.Calendar;

import eu.smartlm.schemas.x2009.x06.urec.SmartLMUsageRecordType;

public class SmartLMUsageRecordTypeSorted implements Comparable<SmartLMUsageRecordTypeSorted> {

	private Calendar date;
	private SmartLMUsageRecordType usagerecord;
	
	public SmartLMUsageRecordTypeSorted(SmartLMUsageRecordType usagerecord) {
		this.setUsagerecord(usagerecord);
		date = usagerecord.getLicenseResourceArray(0).getAccountingPeriod().getStartTime();
	}
	
	public Calendar getDate() {
		return date;
	}

	public int compareTo(SmartLMUsageRecordTypeSorted o) {
		return -date.compareTo(o.getDate());
	}

	private void setUsagerecord(SmartLMUsageRecordType usagerecord) {
		this.usagerecord = usagerecord;
	}

	public SmartLMUsageRecordType getUsagerecord() {
		return usagerecord;
	}
}

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge