Java URL Optimization API (Core API) 2.1.0

com.endeca.soleng.urlformatter.basic
Class BasicQueryBuilder

java.lang.Object
  extended by com.endeca.soleng.urlformatter.basic.BasicQueryBuilder
All Implemented Interfaces:
QueryBuilder

public class BasicQueryBuilder
extends java.lang.Object
implements QueryBuilder

A QueryBuilder, used to create an UrlENEQuery from a UrlState object.

Property Summary
Property Type Default Value
paramBindings ParamBinding[] {new A(), new Af(),...}
queryEncoding String UTF-8
baseUrlENEQuery String null
baseNavigationUrlENEQuery String null
baseErecUrlENEQuery String null
baseAggrERecUrlENEQuery String null
defaultUrlENEQuery String null


Nested Class Summary
static class BasicQueryBuilder.ParamBinding
          Used by the BasicQueryBuilder class to bind parameters to the UrlENEQuery.
 
Constructor Summary
BasicQueryBuilder()
           
 
Method Summary
 void addParamBinding(BasicQueryBuilder.ParamBinding pParamBinding)
           
 com.endeca.navigation.ENEQuery buildQuery(UrlState pUrlState)
          Marshals the specified UrlState into an ENEQuery.
 java.lang.String getBaseAggrERecUrlENEQuery()
           
 java.lang.String getBaseERecUrlENEQuery()
           
 java.lang.String getBaseNavigationUrlENEQuery()
           
 java.lang.String getBaseUrlENEQuery()
           
 java.lang.String getDefaultUrlENEQuery()
           
 BasicQueryBuilder.ParamBinding getParamBinding(java.lang.String pParamKey)
           
 BasicQueryBuilder.ParamBinding[] getParamBindings()
           
 java.lang.String getQueryEncoding()
           
 void setBaseAggrERecUrlENEQuery(java.lang.String pBaseAggrERecUrlENEQuery)
          Sets the baseAggrERecUrlENE Query.
 void setBaseERecUrlENEQuery(java.lang.String pBaseERecUrlENEQuery)
          Sets the baseERecUrlENEQuery.
 void setBaseNavigationUrlENEQuery(java.lang.String pBaseNavigationUrlENEQuery)
          Sets the baseNavigationUrlENEQuery.
 void setBaseUrlENEQuery(java.lang.String pBaseUrlENEQuery)
          Sets the baseUrlENEQuery.
 void setDefaultUrlENEQuery(java.lang.String pDefaultUrlENEQuery)
          Sets the detaultUrlENEQuery.
 void setParamBindings(BasicQueryBuilder.ParamBinding[] pParamBindings)
          Sets the parameters that, if present in the UrlState, will be set in the query.
 void setQueryEncoding(java.lang.String pQueryEncoding)
          Sets the encoding for this Query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicQueryBuilder

public BasicQueryBuilder()
Method Detail

getParamBindings

public BasicQueryBuilder.ParamBinding[] getParamBindings()

setParamBindings

public void setParamBindings(BasicQueryBuilder.ParamBinding[] pParamBindings)
Sets the parameters that, if present in the UrlState, will be set in the query.

Parameters:
pParamBindings - Array of parameters to be set in the query. If the array is set to {new A(), new An()}, these parameters will be bound to UrlENEQueries that are generated from UrlStates that are associated with the "A" parameter or "An" parameter.

addParamBinding

public void addParamBinding(BasicQueryBuilder.ParamBinding pParamBinding)

getParamBinding

public BasicQueryBuilder.ParamBinding getParamBinding(java.lang.String pParamKey)

getQueryEncoding

public java.lang.String getQueryEncoding()

setQueryEncoding

public void setQueryEncoding(java.lang.String pQueryEncoding)
Sets the encoding for this Query.

Parameters:
pQueryEncoding - Encoding to set. Cannot be null.
Throws:
java.lang.IllegalArgumentException - if pQueryEncoding is null.

getBaseUrlENEQuery

public java.lang.String getBaseUrlENEQuery()

setBaseUrlENEQuery

public void setBaseUrlENEQuery(java.lang.String pBaseUrlENEQuery)
Sets the baseUrlENEQuery. This query will be used to create the UrlENEQuery if the UrlState is not associated with a record or navigation state.

Parameters:
pBaseUrlENEQuery - base query to set.

getBaseNavigationUrlENEQuery

public java.lang.String getBaseNavigationUrlENEQuery()

setBaseNavigationUrlENEQuery

public void setBaseNavigationUrlENEQuery(java.lang.String pBaseNavigationUrlENEQuery)
Sets the baseNavigationUrlENEQuery. This query will be used to create the UrlENEQuery if the UrlState is associated with a navigation state, and is not associated with a record.

Parameters:
pBaseNavigationUrlENEQuery - base navigation query to set.

getBaseERecUrlENEQuery

public java.lang.String getBaseERecUrlENEQuery()

setBaseERecUrlENEQuery

public void setBaseERecUrlENEQuery(java.lang.String pBaseERecUrlENEQuery)
Sets the baseERecUrlENEQuery. This query will be used to create the UrlENEQuery if the UrlState is associated with a record, and is not associated with an aggregate record.

Parameters:
pBaseERecUrlENEQuery - base record UrlENEQuery to set.

getBaseAggrERecUrlENEQuery

public java.lang.String getBaseAggrERecUrlENEQuery()

setBaseAggrERecUrlENEQuery

public void setBaseAggrERecUrlENEQuery(java.lang.String pBaseAggrERecUrlENEQuery)
Sets the baseAggrERecUrlENE Query. This query will be used to create the UrlENEQuery if the UrlState is associated with an aggregate record.

Parameters:
pBaseAggrERecUrlENEQuery - base aggregate record UrlENEQuery to set.

getDefaultUrlENEQuery

public java.lang.String getDefaultUrlENEQuery()

setDefaultUrlENEQuery

public void setDefaultUrlENEQuery(java.lang.String pDefaultUrlENEQuery)
Sets the detaultUrlENEQuery. This query will be used to create the UrlENEQuery if the UrlState contains no parameters.

Parameters:
pDefaultUrlENEQuery - default UrlENEQuery to set.

buildQuery

public com.endeca.navigation.ENEQuery buildQuery(UrlState pUrlState)
                                          throws QueryBuildException
Description copied from interface: QueryBuilder
Marshals the specified UrlState into an ENEQuery.

Specified by:
buildQuery in interface QueryBuilder
Parameters:
pUrlState - the UrlState to marshal.
Throws:
QueryBuildException - if the UrlState cannot be successfully marshaled.

Java URL Optimization API (Core API) 2.1.0

Copyright © 2010 Endeca Technologies, Inc. All Rights Reserved.
@VERSION
PRODUCT: Java URL Optimization API (Core API) (urlFormatterCore)
VERSION: 2.1.0
BUILD:   12010DEV
ARCH_OS: n/a
DATE:    2010-06-29T04:02:40-0400