org.sql.generation.implementation.grammar.common.datatypes
Class SQLIntervalImpl

java.lang.Object
  extended by org.atp.spi.TypeableImpl<SQLDataType,SQLInterval>
      extended by org.sql.generation.implementation.grammar.common.datatypes.SQLIntervalImpl
All Implemented Interfaces:
org.atp.api.Typeable<SQLDataType>, ParametrizableDataType, SQLDataType, SQLInterval

public class SQLIntervalImpl
extends org.atp.spi.TypeableImpl<SQLDataType,SQLInterval>
implements SQLInterval

Author:
Stanislav Muhametsin

Constructor Summary
SQLIntervalImpl(IntervalDataType startField, java.lang.Integer startFieldPrecision, IntervalDataType endField, java.lang.Integer secondFracs)
           
 
Method Summary
protected  boolean doesEqual(SQLInterval another)
           
 IntervalDataType getEndField()
          Returns the end field precision for this INTERVAL.
 java.lang.Integer getSecondFracs()
          Returns the fraction seconds precision for this INTERVAL.
 IntervalDataType getStartField()
          Returns the start field type for this INTERVAL.
 java.lang.Integer getStartFieldPrecision()
          Return the start field precision for this INTERVAL.
 
Methods inherited from class org.atp.spi.TypeableImpl
bothNullOrEquals, equals, getImplementedType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.atp.api.Typeable
getImplementedType
 

Constructor Detail

SQLIntervalImpl

public SQLIntervalImpl(IntervalDataType startField,
                       java.lang.Integer startFieldPrecision,
                       IntervalDataType endField,
                       java.lang.Integer secondFracs)
Method Detail

doesEqual

protected boolean doesEqual(SQLInterval another)
Specified by:
doesEqual in class org.atp.spi.TypeableImpl<SQLDataType,SQLInterval>

getStartField

public IntervalDataType getStartField()
Returns the start field type for this INTERVAL.

Specified by:
getStartField in interface SQLInterval
Returns:
The start field type for this INTERVAL.

getStartFieldPrecision

public java.lang.Integer getStartFieldPrecision()
Return the start field precision for this INTERVAL. May be null if none specified.

Specified by:
getStartFieldPrecision in interface SQLInterval
Returns:
The start field precision for this INTERVAL.

getEndField

public IntervalDataType getEndField()
Returns the end field precision for this INTERVAL. Will always be null for single datetime field intervals.

Specified by:
getEndField in interface SQLInterval
Returns:
The end field precision for this INTERVAL.

getSecondFracs

public java.lang.Integer getSecondFracs()
Returns the fraction seconds precision for this INTERVAL. Will always be null if the end field type is not IntervalDataType.SECOND, or if this is single datetime field interval, and its start type is not IntervalDataType.SECOND.

Specified by:
getSecondFracs in interface SQLInterval
Returns:
The fraction seconds precision for this INTERVAL.


Copyright © 2010. All Rights Reserved.