com.simba.dsi.dataengine.utilities
Class DSIMonthSpan

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

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

This class represents an interval of time for years and months.


Constructor Summary
DSIMonthSpan(int intervalType, int year, int month, boolean isNegative)
          Constructor.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object other)
           
 int getIntervalType()
          Gets the SQL interval data type of this DSIMonthSpan.
 int getMonth()
          Gets the month component of this DSIMonthSpan.
 int getYear()
          Gets the year component of this DSIMonthSpan.
 int hashCode()
           
 boolean isNegative()
          Gets the sign component of this DSIMonthSpan.
 void setIsNegative(boolean isNegative)
          Sets the sign component of this DSIMonthSpan.
 void setMonth(int month)
          Sets the month component of this DSIMonthSpan.
 void setYear(int year)
          Sets the year component of this DSIMonthSpan.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DSIMonthSpan

public DSIMonthSpan(int intervalType,
                    int year,
                    int month,
                    boolean isNegative)
Constructor.

Parameters:
intervalType - The SQL interval type of this new DSIMonthSpan.
year - The year component of this new DSIMonthSpan.
month - The month component of this new DSIMonthSpan.
isNegative - The sign component of this new DSIMonthSpan.
Method Detail

getIntervalType

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

Returns:
The SQL interval data type of this DSIMonthSpan.

getMonth

public int getMonth()
Gets the month component of this DSIMonthSpan.

Returns:
The month component of this DSIMonthSpan.

getYear

public int getYear()
Gets the year component of this DSIMonthSpan.

Returns:
The year component of this DSIMonthSpan.

isNegative

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

Returns:
true if this DSIMonthSpan is negative.

setIsNegative

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

Parameters:
isNegative - The new interval sign.

setMonth

public void setMonth(int month)
Sets the month component of this DSIMonthSpan.

Parameters:
month - The new interval month.

setYear

public void setYear(int year)
Sets the year component of this DSIMonthSpan.

Parameters:
year - The new interval year.

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.