/** * Checks if the class passed as an argument has the annotation <code>@javax.persistence.Entity</code>. * If not, this methods throws a <code>NotAnEntityException</code> * * @param entity The entity to validate */ public static void validateEntity( Class<? extends IntactObject> entity ) { if ( entity.getAnnotation( Entity.class ) == null ) { throw new NotAnEntityException( entity ); } }
/** * Checks if the class passed as an argument has the annotation <code>@javax.persistence.Entity</code>. * If not, this methods throws a <code>NotAnEntityException</code> * * @param entity The entity to validate */ public static void validateEntity( Class<? extends IntactObject> entity ) { if ( entity.getAnnotation( Entity.class ) == null ) { throw new NotAnEntityException( entity ); } }
/** * Checks if the class passed as an argument has the annotation <code>@javax.persistence.Entity</code>. * If not, this methods throws a <code>NotAnEntityException</code> * * @param entity The entity to validate */ public static void validateEntity( Class<? extends IntactObject> entity ) { if ( entity.getAnnotation( Entity.class ) == null ) { throw new NotAnEntityException( entity ); } }