com.wewebu.expression.language
Class OwExprStringValue

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

public class OwExprStringValue
extends OwExprValue

The string value implementation.
The implementation relays on the String Java implementation.

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
OwExprStringValue(String string_p)
          Constructor
OwExprStringValue(String string_p, Class<?> javaType_p)
          Constructor
 
Method Summary
 OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprBooleanValue v1_p)
          Stage 2 binary operator visitor acceptance method
 OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprDateValue v1_p)
          Stage 2 binary operator visitor acceptance method
 OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprNumericValue 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)
           
protected  String escapeSQLToRegExp(String sqlLike_p)
          SQL to Java regular expression pattern conversion and escaping method.
 String getString()
           
protected  Map getValuePropeties()
          Overridable default value properties factory method
 int hashCode()
           
 boolean like(String aString_p)
          SQL Like function implementation
 Object toJavaObject(Class javaSuperType_p)
          Java class conversion method.
 String toString()
           
 
Methods inherited from class com.wewebu.expression.language.OwExprValue
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

OwExprStringValue

public OwExprStringValue(String string_p)
Constructor

Parameters:
string_p - inner String value

OwExprStringValue

public OwExprStringValue(String string_p,
                         Class<?> javaType_p)
Constructor

Parameters:
string_p - inner String value
javaType_p - original java type
Since:
1.3.0 and AWD 3.1.0
Method Detail

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 final OwExprValue accept(OwExprBinaryOperator binaryOperator_p,
                                OwExprNumericValue 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 final 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)

accept

public OwExprValue accept(OwExprBinaryOperator binaryOperator_p,
                          OwExprBooleanValue 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,
                          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)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getString

public String getString()

toString

public String toString()
Overrides:
toString in class Object

toJavaObject

public final 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 string value
Throws:
OwExprEvaluationException

getValuePropeties

protected 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

like

public boolean like(String aString_p)
SQL Like function implementation

Parameters:
aString_p - the like matching pattern
Returns:
true if this string matches the given pattern
false otherwise

escapeSQLToRegExp

protected String escapeSQLToRegExp(String sqlLike_p)
SQL to Java regular expression pattern conversion and escaping method.

Parameters:
sqlLike_p - an SQL like pattern
Returns:
the Java regular expression String corresponding to the given String
Since:
version 1.1.0 and AWD 3.1.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.