com.metamatrix.common.object
Class DefaultPropertyDefinitionFilter

java.lang.Object
  extended by com.metamatrix.common.object.DefaultPropertyDefinitionFilter
All Implemented Interfaces:
PropertyDefinitionFilter

public class DefaultPropertyDefinitionFilter
extends java.lang.Object
implements PropertyDefinitionFilter

Version:
1.0
Author:

Field Summary
 
Fields inherited from interface com.metamatrix.common.object.PropertyDefinitionFilter
DISABLE, ENABLE, EXPERT, HIDE, NA, REMOVE
 
Constructor Summary
DefaultPropertyDefinitionFilter()
          Constructor for DefaultPropertyDefinitionFilter.
 
Method Summary
 boolean canFilter(PropertiedObject obj)
          Determine whether the given PropertiedObject is applicable to this filter.
 int filter(PropertiedObjectEditor editor, PropertiedObject obj, PropertyDefinition defn)
          Return the filter code indicating how this PropertyDefinition associated with the specified PropertiedObject instance should be treated by the calling method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertyDefinitionFilter

public DefaultPropertyDefinitionFilter()
Constructor for DefaultPropertyDefinitionFilter.

Method Detail

canFilter

public boolean canFilter(PropertiedObject obj)
Description copied from interface: PropertyDefinitionFilter
Determine whether the given PropertiedObject is applicable to this filter. If the filter is not applicable the calling method does not need to check all associated PropertyDefinition instances.

Specified by:
canFilter in interface PropertyDefinitionFilter
Parameters:
obj - the PropertiedObject instance to check
Returns:
true if filter applies, or false otherwise.
See Also:
PropertyDefinitionFilter.canFilter(PropertiedObject)

filter

public int filter(PropertiedObjectEditor editor,
                  PropertiedObject obj,
                  PropertyDefinition defn)
Description copied from interface: PropertyDefinitionFilter
Return the filter code indicating how this PropertyDefinition associated with the specified PropertiedObject instance should be treated by the calling method.

Specified by:
filter in interface PropertyDefinitionFilter
Parameters:
editor - PropertiedObjectEditor instance to use in the filter.
obj - the PropertiedObject instance the definition is associated with.
defn - the PropertyDefinition instance to check.
Returns:
int the filter code (one of HIDE, ENABLE, DISABLE); never null.
See Also:
PropertyDefinitionFilter.filter(PropertiedObjectEditor, PropertiedObject, PropertyDefinition)


Copyright © 2009. All Rights Reserved.