com.elasticpath.domain.catalogview.impl
Class CategoryFilterImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractTransientImpl
          extended by com.elasticpath.domain.catalogview.impl.AbstractFilterImpl
              extended by com.elasticpath.domain.catalogview.impl.CategoryFilterImpl
All Implemented Interfaces:
Filter, EpDomain, Transient, java.io.Serializable, java.lang.Comparable

public class CategoryFilterImpl
extends AbstractFilterImpl
implements Filter

Represents a filter on category.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Fields inherited from interface com.elasticpath.domain.catalogview.Filter
SEPARATOR, SEPARATOR_IN_REGEX
 
Constructor Summary
CategoryFilterImpl()
          Default Constructer.
 
Method Summary
 int compareTo(java.lang.Object object)
          Compares this object with the specified object for ordering.
 boolean equals(java.lang.Object object)
          Returns true if this filter equals to the given object.
 CategoryService getCategoryService()
          Returns the category servcie.
 java.lang.String getDisplayName(java.util.Locale locale)
          Returns the display name of the filter with the given locale.
 java.lang.String getSeoId()
          This method is not used.
 java.lang.String getSeoName(java.util.Locale locale)
          This method is not used.
 int hashCode()
          Returns the hash code.
 void initialize(java.lang.String filterId)
          Sets the id of the filter.
 boolean match(java.lang.Object obj)
          Check whether the given object has the same brand with this filter.
 void setCategoryService(CategoryService categoryService)
          Sets the category servcie.
 
Methods inherited from class com.elasticpath.domain.catalogview.impl.AbstractFilterImpl
filter, getId, isLocalized, setId, setLocalized
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.catalogview.Filter
filter, getId, isLocalized, setId, setLocalized
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

CategoryFilterImpl

public CategoryFilterImpl()
Default Constructer.

Method Detail

compareTo

public int compareTo(java.lang.Object object)
              throws EpDomainException
Compares this object with the specified object for ordering.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - the given object
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
EpDomainException - in case the given object is not a CategoryFilter

equals

public boolean equals(java.lang.Object object)
Returns true if this filter equals to the given object.

Overrides:
equals in class AbstractFilterImpl
Parameters:
object - the object to compare
Returns:
true if this filter equals to the given object.

getCategoryService

public CategoryService getCategoryService()
Returns the category servcie.

Returns:
the category servcie

getDisplayName

public java.lang.String getDisplayName(java.util.Locale locale)
Returns the display name of the filter with the given locale.

Specified by:
getDisplayName in interface Filter
Parameters:
locale - the locale
Returns:
the display name of the filter with the given locale.

getSeoId

public java.lang.String getSeoId()
This method is not used.

Specified by:
getSeoId in interface Filter
Overrides:
getSeoId in class AbstractFilterImpl
Returns:
the SEO identifier of the filter with the given locale.

getSeoName

public java.lang.String getSeoName(java.util.Locale locale)
This method is not used.

Specified by:
getSeoName in interface Filter
Parameters:
locale - the locale
Returns:
the SEO url of the filter with the given locale.

hashCode

public int hashCode()
Returns the hash code.

Overrides:
hashCode in class AbstractFilterImpl
Returns:
the hash code

initialize

public void initialize(java.lang.String filterId)
Sets the id of the filter.

Specified by:
initialize in interface Filter
Parameters:
filterId - the id to set

match

public boolean match(java.lang.Object obj)
Check whether the given object has the same brand with this filter. Generally, the given object should be a product.

Specified by:
match in interface Filter
Parameters:
obj - the given object.
Returns:
true: the given object matchs with the filter.

setCategoryService

public void setCategoryService(CategoryService categoryService)
Sets the category servcie.

Parameters:
categoryService - the category servcie