com.wewebu.expression.language
Class OwExprTimeValue

java.lang.Object
  extended by com.wewebu.expression.language.OwExprValue
      extended by com.wewebu.expression.language.OwExprTimeValue
All Implemented Interfaces:
OwExprScope

public class OwExprTimeValue
extends OwExprValue

A date value built around the OwExprTime implementation.
Time values represent time spans.
The following properties are supported by values of this type :

seconds
minutes
hours
inDays
inUTCDays
days
months
years

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwExprTimeValue(OwExprTime time_p)
          Constructor
OwExprTimeValue(OwExprTime time_p, Class<?> javaType_p)
          Constructor
 
Method Summary
 OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprDateValue v1_p)
          Stage 2 binary operator visitor acceptance method
 OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprStringValue v1_p)
          Stage 2 binary operator visitor acceptance method
 OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprTimeValue v1_p)
          Stage 2 binary operator visitor acceptance method
 OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprValue v2_p)
          Stage 1 binary operator visitor acceptance method
 boolean equals(Object obj_p)
           
 OwExprTime getTime()
           
protected  Map getValuePropeties()
          Overridable default value properties factory method
 int hashCode()
           
 Object toJavaObject(Class javaSuperType_p)
          Java class conversion method.
 String toString()
           
 
Methods inherited from class com.wewebu.expression.language.OwExprValue
accept, accept, accept, accept, at, fromJavaValue, fromJavaValue, function, getJavaType, hasProperty, length, property
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwExprTimeValue

public OwExprTimeValue(OwExprTime time_p)
Constructor

Parameters:
time_p - the inner time value

OwExprTimeValue

public OwExprTimeValue(OwExprTime time_p,
                       Class<?> javaType_p)
Constructor

Parameters:
time_p - the inner time value
javaType_p - original java type
Since:
1.3.0 and AWD 3.1.0
Method Detail

getValuePropeties

protected final Map getValuePropeties()
Description copied from class: OwExprValue
Overridable default value properties factory method

Overrides:
getValuePropeties in class OwExprValue
Returns:
a Map of OwExprProperty for this value

accept

public final OwExprValue accept(OwExprBinaryOperator binaryOperator_p,
                                OwExprValue v2_p)
                         throws OwExprEvaluationException
Description copied from class: OwExprValue
Stage 1 binary operator visitor acceptance method

Overrides:
accept in class OwExprValue
Parameters:
binaryOperator_p - binary operator visitor
v2_p - right side operator value
Returns:
the operator visit processed OwExprValue
Throws:
OwExprEvaluationException - if the operation fails for any reason (unsupported operand types , incompatible operands, unimplemented operation or operation failure at evaluation time)

accept

public OwExprValue accept(OwExprBinaryOperator binaryOperator_p,
                          OwExprDateValue v1_p)
                   throws OwExprEvaluationException
Description copied from class: OwExprValue
Stage 2 binary operator visitor acceptance method

Overrides:
accept in class OwExprValue
Parameters:
binaryOperator_p - binary operator visitor
v1_p - lef side operator value
Returns:
the operator visit processed OwExprValue
Throws:
OwExprEvaluationException - if the operation fails for any reason (unsupported operand types , incompatible operands, unimplemented operation or operation failure at evaluation time)

accept

public OwExprValue accept(OwExprBinaryOperator binaryOperator_p,
                          OwExprTimeValue v1_p)
                   throws OwExprEvaluationException
Description copied from class: OwExprValue
Stage 2 binary operator visitor acceptance method

Overrides:
accept in class OwExprValue
Parameters:
binaryOperator_p - binary operator visitor
v1_p - lef side operator value
Returns:
the operator visit processed OwExprValue
Throws:
OwExprEvaluationException - if the operation fails for any reason (unsupported operand types , incompatible operands, unimplemented operation or operation failure at evaluation time)

accept

public OwExprValue accept(OwExprBinaryOperator binaryOperator_p,
                          OwExprStringValue v1_p)
                   throws OwExprEvaluationException
Description copied from class: OwExprValue
Stage 2 binary operator visitor acceptance method

Overrides:
accept in class OwExprValue
Parameters:
binaryOperator_p - binary operator visitor
v1_p - lef side operator value
Returns:
the operator visit processed OwExprValue
Throws:
OwExprEvaluationException - if the operation fails for any reason (unsupported operand types , incompatible operands, unimplemented operation or operation failure at evaluation time)

toJavaObject

public Object toJavaObject(Class javaSuperType_p)
                    throws OwExprEvaluationException
Description copied from class: OwExprValue
Java class conversion method.

Specified by:
toJavaObject in class OwExprValue
Parameters:
javaSuperType_p -
Returns:
the inner OwExprTime
Throws:
OwExprEvaluationException

getTime

public final OwExprTime getTime()

equals

public boolean equals(Object obj_p)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.