BEA Systems, Inc.

com.beasys.commerce.axiom.reasoning.rules.results
Class ContentQuery

java.lang.Object
  |
  +--com.beasys.commerce.axiom.reasoning.rules.results.ContentQuery

public class ContentQuery
extends java.lang.Object
implements Nameable, java.io.Serializable

Object which serves as result type for ContentSelector rule. This object was built specifically to incrementally build ANDed phrases.

See Also:
Serialized Form

Constructor Summary
ContentQuery()
          Constructor (used by ContentSelector rule)
ContentQuery(java.lang.String newContentType, java.lang.String newName)
          Constructor.
 
Method Summary
 void addAndedPhrase(java.lang.String property, java.lang.String comparator, java.lang.String criteriaType, java.lang.Object criteria)
          Adds a phrase onto the current AND expression.
 void addOredPhrase(java.lang.String property, java.lang.String comparator, java.lang.String criteriaType, java.lang.Object criteria)
          Adds a phrase, OR'ed onto the previous expression AND'ed.
 java.lang.String getContentType()
          Getter for content type of content query.
 java.lang.String getExprAsText()
          Returns in String form the expression built by successive addAndedQuery calls.
 Expression getExprTree()
          Returns in object form the expression built by successive addAndedQuery calls.
 java.lang.String getName()
          Getter for name of content query.
 void setContentType(java.lang.String newType)
          Setter for name of content query.
 void setName(java.lang.String newName)
          Setter for name of content query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentQuery

public ContentQuery()
Constructor (used by ContentSelector rule)

ContentQuery

public ContentQuery(java.lang.String newContentType,
                    java.lang.String newName)
Constructor.
Method Detail

addAndedPhrase

public void addAndedPhrase(java.lang.String property,
                           java.lang.String comparator,
                           java.lang.String criteriaType,
                           java.lang.Object criteria)
Adds a phrase onto the current AND expression.
Parameters:
property - content attribute to use in query phrase.
comparator - comparator to use for query phrase.
criteriaType - the native type of the criteria argument.
comparator - criteria object to do comparison with.

addOredPhrase

public void addOredPhrase(java.lang.String property,
                          java.lang.String comparator,
                          java.lang.String criteriaType,
                          java.lang.Object criteria)
Adds a phrase, OR'ed onto the previous expression AND'ed. If there's no previous AND'ed expresssion, add to the AND.
Parameters:
property - content attribute to use in query phrase.
comparator - comparator to use for query phrase.
criteriaType - the native type of the criteria argument.
comparator - criteria object to do comparison with.

getExprAsText

public java.lang.String getExprAsText()
Returns in String form the expression built by successive addAndedQuery calls.
Returns:
string showing all of the anded phrase added to this object.

getExprTree

public Expression getExprTree()
Returns in object form the expression built by successive addAndedQuery calls.
Returns:
Current tree or expression objects.

getContentType

public java.lang.String getContentType()
Getter for content type of content query.
Returns:
Content type.

setContentType

public void setContentType(java.lang.String newType)
Setter for name of content query.
Parameters:
newName - New content type for content query.

getName

public java.lang.String getName()
Getter for name of content query.
Specified by:
getName in interface Nameable
Returns:
Content query name.

setName

public void setName(java.lang.String newName)
             throws java.lang.IllegalArgumentException
Setter for name of content query. In the personalization advisor, this is the name of the rule that created the ContentQuery.
Specified by:
setName in interface Nameable
Parameters:
newName - New name for content query.
Throws:
java.lang.IllegalArgumentException - Thrown if newName is null or zero-length

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved