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.relational
Class RelativeDateValueExpression

    com.sas.iquery.metadata.expr.relational.RelativeDateValueExpression

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

    public class RelativeDateValueExpression

Models relative date-oriented values used within filter sub-expressions. This class is used to generate an expression for a relative date. This date may be represented in SAS as `today()` to represent today, or an interval time such as `intnx("week",today(),-1,"sameday")` to represent the same day last week. This time is creating by setting the following variables:

- Alignment - `TimeShiftAlignment`
- Direction - `TimeShiftDirection`
- Multiplier - `integer`
- Unit - `TimeShiftUnit`
- ShiftFrom - `Expression`

Field Summary
`static FunctionCall` | `TODAY` Today represents the current day.
`static RelativeDateValueExpression` | `TOMORROW` Tomorrow represents (TODAY + 1)
`static RelativeDateValueExpression` | `YESTERDAY` Yesterday represents (TODAY - 1)

Fields inherited from class com.sas.iquery.metadata.expr.relational.AbstractRelativeTimeValueExpression
`EVENT_ALIGNMENT_CHANGED, EVENT_MULTIPLIER_CHANGED, EVENT_SHIFT_DIRECTION_CHANGED, EVENT_SHIFT_FROM_CHANGED, EVENT_UNIT_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
`RelativeDateValueExpression()` Constructor for RelativeDateValueExpression
`RelativeDateValueExpression(ExpressionInterface shiftFrom, TimeShiftUnit unitValue, TimeShiftDirection directionValue, int multiplierValue, TimeShiftAlignment alignmentValue)` Create a RelativeDateValueExpression setting all values using input.

Method Summary
`int` | `getExpressionType()` Return the integer form of the expression type.
`void` | `setShiftingFrom(ExpressionInterface exp)` Set the date/time to shift from.

Methods inherited from class com.sas.iquery.metadata.expr.relational.AbstractRelativeTimeValueExpression
`getAlignment, getRelativeSASDateExpression, getShiftDirection, getShiftingFrom, getShiftMultiplier, getShiftUnit, isConstant, setAlignment, setShiftDirection, setShiftMultiplier, setShiftUnit`

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`

Field Detail

*** This field is subject to change. ***

### TODAY

    public static final FunctionCall TODAY

  Today represents the current day.

*** This field is subject to change. ***

### YESTERDAY

    public static final RelativeDateValueExpression YESTERDAY

  Yesterday represents (TODAY - 1)

*** This field is subject to change. ***

### TOMORROW

    public static final RelativeDateValueExpression TOMORROW

  Tomorrow represents (TODAY + 1)

Constructor Detail

*** This constructor is subject to change. ***

### RelativeDateValueExpression

    public RelativeDateValueExpression()

  Constructor for RelativeDateValueExpression

*** This constructor is subject to change. ***

### RelativeDateValueExpression

    public RelativeDateValueExpression(ExpressionInterface shiftFrom,
                                       TimeShiftUnit unitValue,
                                       TimeShiftDirection directionValue,
                                       int multiplierValue,
                                       TimeShiftAlignment alignmentValue)

  Create a RelativeDateValueExpression setting all values using input.

  Parameters:
    `shiftFrom` - Must be an expression of type `ExpressionTypes.EXP_TYPE_DATE`
    `unitValue` -
    `directionValue` -
    `multiplierValue` -
    `alignmentValue` -

Method Detail

*** This method is subject to change. ***

### setShiftingFrom

    public void setShiftingFrom(ExpressionInterface exp)
                         throws java.lang.IllegalArgumentException,
                                MetadataException

  Description copied from class: `AbstractRelativeTimeValueExpression`
  Set the date/time to shift from. This checks to ensure that it does not set the object itself as the shifting from. In that case the current shift remains in place. This throws an exception if the current object is a constant expression, this can be check with `isConstant()` method.

  Overrides:
    `setShiftingFrom` in class `AbstractRelativeTimeValueExpression`
  Parameters:
    `exp` - ExpressionInterface
  Throws:
    `java.lang.IllegalArgumentException`
    `MetadataException`
  See Also:
    `AbstractRelativeTimeValueExpression.setShiftingFrom(com.sas.iquery.metadata.expr.ExpressionInterface)`

*** This method is subject to change. ***

### getExpressionType

    public int getExpressionType()

  Description copied from interface: `ExpressionInterface`
  Return the integer form of the expression type.

  Specified by:
    `getExpressionType` in interface `ExpressionInterface`
  Specified by:
    `getExpressionType` in class `AbstractRelativeTimeValueExpression`
  Returns:
    int
  See Also:
    `AbstractRelativeTimeValueExpression.getExpressionType()`

*** 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.