public class QueryCustomizerDefaultImpl extends java.lang.Object implements QueryCustomizer
Constructor and Description |
---|
QueryCustomizerDefaultImpl()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
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
|
public QueryCustomizerDefaultImpl()
public Query customizeQuery(java.lang.Object anObject, PersistenceBroker aBroker, CollectionDescriptor aCod, QueryByCriteria aQuery)
customizeQuery
in interface QueryCustomizer
anObject
- the originator objectaBroker
- the PersistenceBrokeraCod
- the CollectionDescriptoraQuery
- the original 1:n-QueryQueryCustomizer.customizeQuery(java.lang.Object, org.apache.ojb.broker.PersistenceBroker, org.apache.ojb.broker.metadata.CollectionDescriptor, org.apache.ojb.broker.query.QueryByCriteria)
public void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
AttributeContainer
addAttribute
in interface AttributeContainer
attributeName
- the name of the attribute to retrieveattributeValue
- the attribute's valueAttributeContainer.addAttribute(String, String)
public java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrievedefaultValue
- the value to return if the attribute is not presentpublic java.lang.String getAttribute(java.lang.String attributeName)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrieve(C) 2002 - 2005 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