it.amattioli.dominate.specifications
Class EnumSpecification<T extends Entity<?>,U extends Enum<U>>

Show UML class diagram
java.lang.Object
  extended by it.amattioli.dominate.specifications.AbstractSpecification<T>
      extended by it.amattioli.dominate.specifications.ChainedSpecification<T>
          extended by it.amattioli.dominate.specifications.EnumSpecification<T,U>
All Implemented Interfaces:
Specification<T>, PropertyChangeEmitter
Direct Known Subclasses:
CriteriaEnumSpecification, DefaultEnumSpecification, HqlEnumSpecification

public abstract class EnumSpecification<T extends Entity<?>,U extends Enum<U>>
extends ChainedSpecification<T>


Constructor Summary
EnumSpecification()
           
EnumSpecification(String propertyName, Class<U> enumClass)
           
EnumSpecification(String propertyName, Class<U> enumClass, EnumSpecification<T,U> chained)
           
 
Method Summary
 Collection<T> getAdmittedValues()
           
protected  Class<U> getEnumClass()
           
protected  String getPropertyName()
           
 U getValue()
           
 boolean isSatisfiedBy(T entity)
          Check if an object satisfies this specification.
static
<T extends Entity<?>,U extends Enum<U>>
EnumSpecification<T,U>
newInstance(String propertyName, Class<U> enumClass)
           
protected  void setEnumClass(Class<U> enumClass)
           
protected  void setPropertyName(String propertyName)
           
 void setValue(U value)
           
 boolean wasSet()
          If this specification is parametric check if the parameter(s) has been set.
 
Methods inherited from class it.amattioli.dominate.specifications.ChainedSpecification
assembleQuery, chainAssembler, createChain, getNextInChain, itselfAssembleQuery, itselfSupportsAssembler, setNextInChain, supportsAssembler
 
Methods inherited from class it.amattioli.dominate.specifications.AbstractSpecification
addPropertyChangeListener, firePropertyChange, isSatisfiedIfNotSet, removePropertyChangeListener, setSatisfiedIfNotSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumSpecification

public EnumSpecification()

EnumSpecification

public EnumSpecification(String propertyName,
                         Class<U> enumClass)

EnumSpecification

public EnumSpecification(String propertyName,
                         Class<U> enumClass,
                         EnumSpecification<T,U> chained)
Method Detail

newInstance

public static <T extends Entity<?>,U extends Enum<U>> EnumSpecification<T,U> newInstance(String propertyName,
                                                                                         Class<U> enumClass)

getPropertyName

protected String getPropertyName()

setPropertyName

protected void setPropertyName(String propertyName)

getEnumClass

protected Class<U> getEnumClass()

setEnumClass

protected void setEnumClass(Class<U> enumClass)

setValue

public void setValue(U value)

getValue

public U getValue()

getAdmittedValues

public Collection<T> getAdmittedValues()

isSatisfiedBy

public boolean isSatisfiedBy(T entity)
Description copied from interface: Specification
Check if an object satisfies this specification.

Returns:

wasSet

public boolean wasSet()
Description copied from interface: Specification
If this specification is parametric check if the parameter(s) has been set. If this specification is not parametric always returns true.

Returns:


Copyright © 2011. All Rights Reserved.