com.simba.dsi.dataengine.utilities
Class DSITimeSpan

java.lang.Object
  extended by com.simba.dsi.dataengine.utilities.DSITimeSpan
All Implemented Interfaces:
java.lang.Cloneable

public class DSITimeSpan
extends java.lang.Object
implements java.lang.Cloneable

This class represents an interval of time from days to seconds and fractions of a second.


Constructor Summary
DSITimeSpan(int intervalType, int day, int hour, int minute, int second, int fraction, boolean isNegative)
          Constructor.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object other)
           
 int getDay()
          Gets the day component of this DSITimeSpan.
 int getFraction()
          Gets the fraction component of this DSITimeSpan.
 int getHour()
          Gets the hour component of this DSITimeSpan.
 int getIntervalType()
          Gets the SQL interval data type of this DSIMonthSpan.
 int getMinute()
          Gets the minute component of this DSITimeSpan.
 int getSecond()
          Gets the second component of this DSITimeSpan.
 int hashCode()
           
 boolean isNegative()
          Gets the sign component of this DSITimeSpan.
 void setDay(int day)
          Sets the day component of this DSITimeSpan.
 void setFraction(int fraction)
          Sets the fraction component of this DSITimeSpan.
 void setHour(int hour)
          Sets the hour component of this DSITimeSpan.
 void setIsNegative(boolean isNegative)
          Sets the sign component of this DSITimeSpan.
 void setMinute(int minute)
          Sets the minute component of this DSITimeSpan.
 void setSecond(int second)
          Sets the second component of this DSITimeSpan.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DSITimeSpan

public DSITimeSpan(int intervalType,
                   int day,
                   int hour,
                   int minute,
                   int second,
                   int fraction,
                   boolean isNegative)
Constructor.

Parameters:
intervalType - The SQL interval type.
day - The interval day.
hour - The interval hour.
minute - The interval minute.
second - The interval second.
fraction - The interval fractional seconds.
isNegative - The interval sign.
Method Detail

getDay

public int getDay()
Gets the day component of this DSITimeSpan.

Returns:
The day component of this DSITimeSpan.

getFraction

public int getFraction()
Gets the fraction component of this DSITimeSpan.

Returns:
The fraction component of this DSITimeSpan.

getHour

public int getHour()
Gets the hour component of this DSITimeSpan.

Returns:
The hour component of this DSITimeSpan.

getIntervalType

public int getIntervalType()
Gets the SQL interval data type of this DSIMonthSpan.

Returns:
The SQL interval data type of this DSIMonthSpan.

getMinute

public int getMinute()
Gets the minute component of this DSITimeSpan.

Returns:
The minute component of this DSITimeSpan.

getSecond

public int getSecond()
Gets the second component of this DSITimeSpan.

Returns:
The second component of this DSITimeSpan.

isNegative

public boolean isNegative()
Gets the sign component of this DSITimeSpan.

Returns:
true if this DSIMonthSpan is negative.

setDay

public void setDay(int day)
Sets the day component of this DSITimeSpan.

Parameters:
day - The new interval day.

setFraction

public void setFraction(int fraction)
Sets the fraction component of this DSITimeSpan.

Parameters:
fraction - The new interval fraction.

setHour

public void setHour(int hour)
Sets the hour component of this DSITimeSpan.

Parameters:
hour - The new interval hour.

setIsNegative

public void setIsNegative(boolean isNegative)
Sets the sign component of this DSITimeSpan.

Parameters:
isNegative - The new interval sign.

setMinute

public void setMinute(int minute)
Sets the minute component of this DSITimeSpan.

Parameters:
minute - The new interval minute.

setSecond

public void setSecond(int second)
Sets the second component of this DSITimeSpan.

Parameters:
second - The new interval second.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.