BEA Systems, Inc.

com.beasys.commerce.foundation.expression
Class CriteriaImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.expression.ExpressionImpl
        |
        +--com.beasys.commerce.foundation.expression.CriteriaImpl

public class CriteriaImpl
extends ExpressionImpl
implements Criteria, java.lang.Cloneable

The default Criteria implementation.

Unlinke most Belonging implementations, this does not attempt to clone everything.

See Also:
Serialized Form

Field Summary
 java.lang.String comparator
          The comparision operator.
 java.lang.Object criteria
          The criteria value.
 java.lang.String property
          The property name.
 java.lang.String scope
          The property scope.
 
Fields inherited from class com.beasys.commerce.foundation.expression.ExpressionImpl
not
 
Constructor Summary
CriteriaImpl()
          Constructor.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare this belonging to another
 java.lang.String getComparator()
          Get the value of comparator
 java.lang.Object getCriteria()
          Get the value of criteria
 java.lang.String getProperty()
          Get the value of property
 java.lang.String getScope()
          Get the value of scope
 java.lang.String interfaceName()
          interfaceName() returns the unqualified name of the interface from the UML model.
 void setByValue(Belonging value)
          It is possible to call set-by-value with a superclass.
 void setComparator(java.lang.String comparator)
          Set the value of comparator
 void setCriteria(java.lang.Object criteria)
          Set the value of criteria
 void setProperty(java.lang.String property)
          Set the value of property
 void setScope(java.lang.String scope)
          Set the value of scope
 Belonging value()
          value() is a more typesafe implementation of clone()
 void valueOf(java.lang.String expression)
          Set this Criteria's attributes from the specified query sting, which must be of the form "property comparator criteria" (e.g.
 
Methods inherited from class com.beasys.commerce.foundation.expression.ExpressionImpl
clone, equals, getNot, setNot, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

criteria

public java.lang.Object criteria
The criteria value.

property

public java.lang.String property
The property name.

scope

public java.lang.String scope
The property scope.

comparator

public java.lang.String comparator
The comparision operator.
Constructor Detail

CriteriaImpl

public CriteriaImpl()
Constructor.

All values are initialized to null.

Method Detail

getCriteria

public java.lang.Object getCriteria()
Get the value of criteria
Specified by:
getCriteria in interface Criteria

setCriteria

public void setCriteria(java.lang.Object criteria)
Set the value of criteria
Specified by:
setCriteria in interface Criteria
Parameters:
criteria - criteria to be added

getProperty

public java.lang.String getProperty()
Get the value of property
Specified by:
getProperty in interface Criteria

setProperty

public void setProperty(java.lang.String property)
Set the value of property
Specified by:
setProperty in interface Criteria

getScope

public java.lang.String getScope()
Get the value of scope
Specified by:
getScope in interface Criteria

setScope

public void setScope(java.lang.String scope)
Set the value of scope
Specified by:
setScope in interface Criteria

getComparator

public java.lang.String getComparator()
Get the value of comparator
Specified by:
getComparator in interface Criteria

setComparator

public void setComparator(java.lang.String comparator)
Set the value of comparator
Specified by:
setComparator in interface Criteria

value

public Belonging value()
value() is a more typesafe implementation of clone()
Overrides:
value in class ExpressionImpl
Returns:
a clone of this instance

interfaceName

public java.lang.String interfaceName()
interfaceName() returns the unqualified name of the interface from the UML model.
Overrides:
interfaceName in class ExpressionImpl
Returns:
the unqualified name of the belonging interface

setByValue

public void setByValue(Belonging value)
It is possible to call set-by-value with a superclass.

If that is the case, only the fields in the superclass will be set in this instance. The remaining fields get the default values. It is also possible to call set-by-value with a subclass. In this case, the specialized fields in the subclass will be ignored. The overridden fields in the subclass will be populated.

Overrides:
setByValue in class ExpressionImpl
Tags copied from interface: Belonging
Parameters:
belonging - The Belonging to use for initialization.

compareTo

public int compareTo(java.lang.Object o)
Compare this belonging to another
Overrides:
compareTo in class ExpressionImpl
Parameters:
o - target object for comparision
Returns:
0 objects are equal

valueOf

public void valueOf(java.lang.String expression)
             throws java.lang.IllegalArgumentException
Set this Criteria's attributes from the specified query sting, which must be of the form "property comparator criteria" (e.g. "identifier == '1234').
Overrides:
valueOf in class ExpressionImpl
Throws:
java.lang.IllegalArgumentException - thrown on an invalid expression string.
See Also:
ExpressionHelper.parse(java.lang.String)

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved