it.amattioli.dominate.specifications
Class MultipleEntitySpecification<T extends Entity<?>,I extends Serializable,U extends Entity<I>>

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.MultipleEntitySpecification<T,I,U>
All Implemented Interfaces:
Specification<T>, PropertyChangeEmitter
Direct Known Subclasses:
CriteriaMultipleEntitySpecification, DefaultMultipleEntitySpecification, HqlMultipleEntitySpecification

public abstract class MultipleEntitySpecification<T extends Entity<?>,I extends Serializable,U extends Entity<I>>
extends ChainedSpecification<T>


Constructor Summary
MultipleEntitySpecification()
           
MultipleEntitySpecification(String propertyName, Class<U> entityClass)
           
 
Method Summary
 Collection<U> getAdmittedValues()
           
protected  Class<U> getEntityClass()
           
protected  String getPropertyName()
           
 Collection<U> getValue()
           
 boolean isSatisfiedBy(T entity)
          Check if an object satisfies this specification.
static
<T extends Entity<?>,I extends Serializable,U extends Entity<I>>
MultipleEntitySpecification<T,I,U>
newInstance(String propertyName, Class<U> entityClass)
           
protected  void setEntityClass(Class<U> entityClass)
           
protected  void setPropertyName(String propertyName)
           
 void setValue(Collection<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

MultipleEntitySpecification

public MultipleEntitySpecification()

MultipleEntitySpecification

public MultipleEntitySpecification(String propertyName,
                                   Class<U> entityClass)
Method Detail

newInstance

public static <T extends Entity<?>,I extends Serializable,U extends Entity<I>> MultipleEntitySpecification<T,I,U> newInstance(String propertyName,
                                                                                                                              Class<U> entityClass)

getPropertyName

protected String getPropertyName()

setPropertyName

protected void setPropertyName(String propertyName)

getEntityClass

protected Class<U> getEntityClass()

setEntityClass

protected void setEntityClass(Class<U> entityClass)

setValue

public void setValue(Collection<U> value)

getValue

public Collection<U> getValue()

getAdmittedValues

public Collection<U> 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.