List of usage examples for javax.persistence InheritanceType toString
public String toString()
From source file:org.castor.cpa.jpa.processors.classprocessors.JPAInheritanceProcessor.java
/** * {@inheritDoc}/* w ww . ja va2s.c o m*/ * * @see org.castor.core.annotationprocessing.TargetAwareAnnotationProcessor# * processAnnotation(BaseNature, Annotation, AnnotatedElement) */ public <I extends BaseNature, A extends Annotation> boolean processAnnotation(final I info, final A annotation, final AnnotatedElement target) throws AnnotationTargetException { if ((info instanceof JPAClassNature) && (annotation instanceof Inheritance) && (target instanceof Class<?>) && (target.isAnnotationPresent(Inheritance.class))) { LOG.debug("Processing class annotation " + annotation.toString()); JPAClassNature jpaClassNature = (JPAClassNature) info; Inheritance inheritance = (Inheritance) annotation; InheritanceType strategy = inheritance.strategy(); if (strategy != InheritanceType.JOINED) { throw new AnnotationTargetException("InheritanceType not supported: " + strategy.toString()); } jpaClassNature.setInheritanceStrategy(strategy); return true; } return false; }