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

com.sas.iquery.metadata.expr.relational
Class RelativeTimestampValueExpression

com.sas.iquery.metadata.expr.relational.RelativeTimestampValueExpression
All Implemented Interfaces:
Base, BusinessModelResourceReferencer, ModelItem, UsabilityInterface, ExpressionInterface, PropertyChangeListenee, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

public class RelativeTimestampValueExpression

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


Field Summary
static FunctionCall DATETIME
          DATETIME represents the current date and time.
 
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
RelativeTimestampValueExpression()
          Constructor for RelativeTimestampValueExpression
RelativeTimestampValueExpression(ExpressionInterface shiftFrom, TimeShiftUnit unitValue, TimeShiftDirection directionValue, int multiplierValue, TimeShiftAlignment alignmentValue)
          Create a RelativeTimestampValueExpression 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.  ***

DATETIME

public static final FunctionCall DATETIME
DATETIME represents the current date and time.

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

RelativeTimestampValueExpression

public RelativeTimestampValueExpression()
Constructor for RelativeTimestampValueExpression


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

RelativeTimestampValueExpression

public RelativeTimestampValueExpression(ExpressionInterface shiftFrom,
                                        TimeShiftUnit unitValue,
                                        TimeShiftDirection directionValue,
                                        int multiplierValue,
                                        TimeShiftAlignment alignmentValue)
Create a RelativeTimestampValueExpression 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.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.