Files
ebean/src/main/java/io/ebeaninternal/server/deploy/parse/AnnotationSql.java
T
Roland PramlandRob Bygrave 46cdc84e6b Refactor/findannotation (#1104)
* refactor: renamed findAnnotation method that searches recursive to findAnnotationRecursive

* CHG: searching namedQueries & indices also recursive in superclasses

* FIX: Using the AnnotationBase methods on several places and documented them
2017-09-01 20:25:10 +12:00

25 lines
630 B
Java

package io.ebeaninternal.server.deploy.parse;
import io.ebean.annotation.Sql;
import io.ebeaninternal.server.deploy.BeanDescriptor;
/**
* Read the class level deployment annotations.
*/
public class AnnotationSql extends AnnotationParser {
public AnnotationSql(DeployBeanInfo<?> info, boolean javaxValidationAnnotations) {
super(info, javaxValidationAnnotations);
}
@Override
public void parse() {
Class<?> cls = descriptor.getBeanType();
Sql sql = AnnotationBase.findAnnotationRecursive(cls, Sql.class);
if (sql != null) {
descriptor.setEntityType(BeanDescriptor.EntityType.SQL);
}
}
}