it.amattioli.dominate.specifications
Class EntitySpecification<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.EntitySpecification<T,I,U>
All Implemented Interfaces:
Specification<T>, PropertyChangeEmitter
Direct Known Subclasses:
CriteriaEntitySpecification, DefaultEntitySpecification, HqlEntitySpecification

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


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

EntitySpecification

public EntitySpecification()

EntitySpecification

public EntitySpecification(String propertyName,
                           Class<U> entityClass)

EntitySpecification

public EntitySpecification(String propertyName,
                           Class<U> entityClass,
                           EntitySpecification<T,I,U> chained)
Method Detail

newInstance

public static <T extends Entity<?>,I extends Serializable,U extends Entity<I>> EntitySpecification<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(U value)

getValue

public U getValue()

setId

public void setId(I id)

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.