net.sf.oval.configuration.annotation
Class JPAAnnotationsConfigurer

java.lang.Object
  extended by net.sf.oval.configuration.annotation.JPAAnnotationsConfigurer
All Implemented Interfaces:
Configurer

public class JPAAnnotationsConfigurer
extends Object
implements Configurer

Constraints configurer that interprets certain EJB3 JPA annotations:

Author:
Sebastian Thomschke

Field Summary
protected  Boolean applyFieldConstraintsToConstructors
           
protected  Boolean applyFieldConstraintsToSetters
           
 
Constructor Summary
JPAAnnotationsConfigurer()
           
 
Method Summary
 Boolean getApplyFieldConstraintsToConstructors()
           
 ClassConfiguration getClassConfiguration(Class<?> clazz)
          Returns the constraint configurations for the given class.
 ConstraintSetConfiguration getConstraintSetConfiguration(String constraintSetId)
          Returns the constraint configuration for the constraint set with the given Id.
protected  void initializeChecks(javax.persistence.Basic annotation, Collection<Check> checks)
           
protected  void initializeChecks(javax.persistence.Column annotation, Collection<Check> checks, AccessibleObject fieldOrMethod)
           
protected  void initializeChecks(javax.persistence.ManyToMany annotation, Collection<Check> checks)
           
protected  void initializeChecks(javax.persistence.ManyToOne annotation, Collection<Check> checks)
           
protected  void initializeChecks(javax.persistence.OneToMany annotation, Collection<Check> checks)
           
protected  void initializeChecks(javax.persistence.OneToOne annotation, Collection<Check> checks)
           
 Boolean isApplyFieldConstraintsToSetter()
           
 void setApplyFieldConstraintsToConstructors(Boolean applyFieldConstraintsToConstructors)
           
 void setApplyFieldConstraintsToSetters(Boolean applyFieldConstraintsToSetters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applyFieldConstraintsToSetters

protected Boolean applyFieldConstraintsToSetters

applyFieldConstraintsToConstructors

protected Boolean applyFieldConstraintsToConstructors
Constructor Detail

JPAAnnotationsConfigurer

public JPAAnnotationsConfigurer()
Method Detail

getApplyFieldConstraintsToConstructors

public Boolean getApplyFieldConstraintsToConstructors()
Returns:
the applyFieldConstraintsToConstructors

getClassConfiguration

public ClassConfiguration getClassConfiguration(Class<?> clazz)
Returns the constraint configurations for the given class. This method is invoked only once by the Validator, the very first time an object of the given class needs to be validated. The constraint configuration is then translated into an Validator internal format and cached.

Specified by:
getClassConfiguration in interface Configurer
Parameters:
clazz - the class to get the configuration for
Returns:
The constraint configurations for the given class.

getConstraintSetConfiguration

public ConstraintSetConfiguration getConstraintSetConfiguration(String constraintSetId)
Returns the constraint configuration for the constraint set with the given Id.

Specified by:
getConstraintSetConfiguration in interface Configurer
Parameters:
constraintSetId - the ID of the constraint set
Returns:
The constraint configuration for the constraint set with the given Id.

initializeChecks

protected void initializeChecks(javax.persistence.Basic annotation,
                                Collection<Check> checks)

initializeChecks

protected void initializeChecks(javax.persistence.Column annotation,
                                Collection<Check> checks,
                                AccessibleObject fieldOrMethod)

initializeChecks

protected void initializeChecks(javax.persistence.ManyToMany annotation,
                                Collection<Check> checks)

initializeChecks

protected void initializeChecks(javax.persistence.ManyToOne annotation,
                                Collection<Check> checks)

initializeChecks

protected void initializeChecks(javax.persistence.OneToMany annotation,
                                Collection<Check> checks)

initializeChecks

protected void initializeChecks(javax.persistence.OneToOne annotation,
                                Collection<Check> checks)

isApplyFieldConstraintsToSetter

public Boolean isApplyFieldConstraintsToSetter()
Returns:
the applyFieldConstraintsToSetter

setApplyFieldConstraintsToConstructors

public void setApplyFieldConstraintsToConstructors(Boolean applyFieldConstraintsToConstructors)
Parameters:
applyFieldConstraintsToConstructors - the applyFieldConstraintsToConstructors to set

setApplyFieldConstraintsToSetters

public void setApplyFieldConstraintsToSetters(Boolean applyFieldConstraintsToSetters)
Parameters:
applyFieldConstraintsToSetters - the applyFieldConstraintsToSetter to set


Copyright © 2005-2013 The OVal Development Team. All Rights Reserved.