Java Code Examples for ims.framework.utils.Time.setSecond()

The following are Jave code examples for showing how to use setSecond() of the ims.framework.utils.Time class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File:   Source Code and License Vote up 5 votes
public int compare(StoolScaleVo o1, StoolScaleVo o2)
	if (o1 != null && o1.getDateTimeInitiatedIsNotNull() && o2!=null && o2.getDateTimeInitiatedIsNotNull())
		Time time1 = o1.getDateTimeInitiated().getTime();
		Time time2 = o2.getDateTimeInitiated().getTime();
		DateTime dateToCompare1 = new DateTime(o1.getDateTimeInitiated().getDate(), time1);
		DateTime dateToCompare2 = new DateTime(o2.getDateTimeInitiated().getDate(), time2);
		int dateOrder = order*dateToCompare1.compareTo(dateToCompare2);
		if(dateOrder == 0)
			return compareByHcp(o1, o2);
		return dateOrder;
	if (o1 == null || !o1.getDateTimeInitiatedIsNotNull())
		return -1*order;
	if (o2 == null || !o2.getDateTimeInitiatedIsNotNull())
		return order;
	return 0;