org.apache.ojb.broker.accesslayer
Class QueryCustomizerDefaultImpl

java.lang.Object
  extended by org.apache.ojb.broker.accesslayer.QueryCustomizerDefaultImpl
All Implemented Interfaces:
java.io.Serializable, QueryCustomizer, AttributeContainer

public class QueryCustomizerDefaultImpl
extends java.lang.Object
implements QueryCustomizer

Default Implementation of QueryCustomizer.

Version:
$Id: QueryCustomizerDefaultImpl.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
Jakob Braeuchi
See Also:
Serialized Form

Constructor Summary
QueryCustomizerDefaultImpl()
          Default Constructor
 
Method Summary
 void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
          Store the specified attribute and it's value.
 Query customizeQuery(java.lang.Object anObject, PersistenceBroker aBroker, CollectionDescriptor aCod, QueryByCriteria aQuery)
          Default implementation returns unmodified original Query
 java.lang.String getAttribute(java.lang.String attributeName)
          Get the value of an attribute
 java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
          Get the value of an attribute
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryCustomizerDefaultImpl

public QueryCustomizerDefaultImpl()
Default Constructor

Method Detail

customizeQuery

public Query customizeQuery(java.lang.Object anObject,
                            PersistenceBroker aBroker,
                            CollectionDescriptor aCod,
                            QueryByCriteria aQuery)
Default implementation returns unmodified original Query

Specified by:
customizeQuery in interface QueryCustomizer
Parameters:
anObject - the originator object
aBroker - the PersistenceBroker
aCod - the CollectionDescriptor
aQuery - the original 1:n-Query
Returns:
Query the customized 1:n-Query, return null to skip execution of the query
See Also:
QueryCustomizer.customizeQuery(java.lang.Object, org.apache.ojb.broker.PersistenceBroker, org.apache.ojb.broker.metadata.CollectionDescriptor, org.apache.ojb.broker.query.QueryByCriteria)

addAttribute

public void addAttribute(java.lang.String attributeName,
                         java.lang.String attributeValue)
Description copied from interface: AttributeContainer
Store the specified attribute and it's value.

Specified by:
addAttribute in interface AttributeContainer
Parameters:
attributeName - the name of the attribute to retrieve
attributeValue - the attribute's value
See Also:
AttributeContainer.addAttribute(String, String)

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName,
                                     java.lang.String defaultValue)
Description copied from interface: AttributeContainer
Get the value of an attribute

Specified by:
getAttribute in interface AttributeContainer
Parameters:
attributeName - the attribute to retrieve
defaultValue - the value to return if the attribute is not present
Returns:
the attribute value

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName)
Description copied from interface: AttributeContainer
Get the value of an attribute

Specified by:
getAttribute in interface AttributeContainer
Parameters:
attributeName - the attribute to retrieve
Returns:
the attribute value


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30