Files
ebean/src/main/java/io/ebeaninternal/server/deploy/parse/AnnotationSql.java
T
Rob BygraveandGitHub a861e8bdcc Remove reading mapping annotations from "Getters" with associated refactoring for performance (#1971)
* #1970 - Change test code only moving mapping annotations to fields

First step in remove support for mapping annotations on "Getters" (so field only target for mapping annotations)

* #1970 - Remove reading mapping annotations from "Getters"

* #1970 - Refactor to use simple annotation lookup where possible

* #1970 - Remove GenerationType.TABLE and SequenceGenerator from type/class

* #1970 - Refactor meta annotation reading

* #1970 - Read @Aggregation as a meta annotation
2020-03-09 16:09:41 +13:00

25 lines
591 B
Java

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