All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This class is subject to change. ***

## com.sas.iquery.metadata.expr
Class TimeValueExpression

    com.sas.iquery.metadata.expr.TimeValueExpression

All Implemented Interfaces:
  Base, BusinessModelResourceReferencer, ModelItem, UsabilityInterface, ExpressionInterface, PropertyChangeListenee, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

    @SASScope(value="ALL")
    @SubjectToChange
    public final class TimeValueExpression

Models time values while fitting into the SAS Query Services' expression model by implementing the ExpressionInterface.

Time values stored within objects of this type are implicitly associated with the Greenwich Mean Time (GMT) timezone. No explicit specification of a timezone is allowed or necessary. This behavior is consistent with the Java time-oriented values associated with the classes java.util.Date, java.sql.Date, java.sql.Time, and java.sql.Timestamp.

See the Javadoc in the AbstractTimeValueExpression class for more information on timezones.

Field Summary

Fields inherited from class com.sas.iquery.metadata.expr.AbstractTimeValueExpression
`EVENT_VALUE_CHANGED`

Fields inherited from interface com.sas.iquery.metadata.business.ModelItem
`EVENT_OBJECT_PROPERTY_CHANGED`

Fields inherited from interface com.sas.iquery.metadata.business.Base
`EVENT_OBJECT_DEFINITION_CHANGED`

Constructor Summary
`TimeValueExpression()` Creates a TimeValueExpression object with no time value set.
`TimeValueExpression(java.util.Date value)` Creates a TimeValueExpression object and sets the time value stored within the object as the setValue(java.util.Date) method describes.
`TimeValueExpression(java.sql.Time timeValue)` Creates a TimeValueExpression object with the specified time value set.

Method Summary
`int` | `getExpressionType()` Returns the time expression type ExpressionTypes.EXP_TYPE_TIME
`java.sql.Time` | `getTimeValue()` Returns the same as getValue() but as a more explicit type for this type of object.
`static java.sql.Time` | `newTimeOnlyValue(java.util.Date dateValue)` Creates a new java.sql.Time object to that only includes the time portion of the date object.
`void` | `setTimeValue(java.sql.Time timeValue)` Sets the time value within this object to the specified value.

Methods inherited from class com.sas.iquery.metadata.expr.AbstractTimeValueExpression
`equals, generateQueryText, generateQueryText, getExplicitDoubleValue, getValue, newValue, setExplicitDoubleValue, setValue`

Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelResourceReferencer
`getResources`

Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee
`addListener, getListeners, removeListener`

Methods inherited from interface com.sas.iquery.metadata.business.UsabilityInterface
`getReasonsUnusable, isUsableInQuery`

Constructor Detail

### TimeValueExpression

    public TimeValueExpression()

  Creates a TimeValueExpression object with no time value set.

### TimeValueExpression

    public TimeValueExpression(java.sql.Time timeValue)

  Creates a TimeValueExpression object with the specified time value set.

  The value specified is copied into this object and no future changes to the specified value affect this object's stored value.

  Parameters:
    `timeValue` - the value to set this object to or null

### TimeValueExpression

    public TimeValueExpression(java.util.Date value)

  Creates a TimeValueExpression object and sets the time value stored within the object as the setValue(java.util.Date) method describes.

  Parameters:
    `value` - the time value to set this object to or null

Method Detail

### getTimeValue

    public java.sql.Time getTimeValue()

  Returns the same as getValue() but as a more explicit type for this type of object.

  Returns:
    java.sql.Time the time value stored in this object or null if none set

### setTimeValue

    public void setTimeValue(java.sql.Time timeValue)

  Sets the time value within this object to the specified value.

  The value specified is copied into this object and no future changes to the specified value affect this object's stored value.

  Parameters:
    `timeValue` - the value to set this object to.

### getExpressionType

    public int getExpressionType()

  Returns the time expression type ExpressionTypes.EXP_TYPE_TIME

  Returns:
    an expression type from class ExpressionTypes

### newTimeOnlyValue

    public static java.sql.Time newTimeOnlyValue(java.util.Date dateValue)

  Creates a new java.sql.Time object to that only includes the time portion of the date object. This value should only be used for time comparisons and formatting when it is a time of day comparison and the date portion is to be ignored.

  Parameters:
    `dateValue` - with possible time and date information
  Returns:
    java.sql.Time with only time information

*** This class is subject to change. ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.