From ae0bbaaaf803c23447ba2673c50844a3bc7a3296 Mon Sep 17 00:00:00 2001 From: Robin Bygrave Date: Mon, 20 Jul 2015 11:38:40 +1200 Subject: [PATCH] #344 - Remove deprecated annotation @ColumnHstore ... migrate to @DbHstore --- .../avaje/ebean/annotation/ColumnHstore.java | 17 ----------------- .../server/deploy/parse/AnnotationFields.java | 5 +---- .../deploy/parse/DeployCreateProperties.java | 17 ++++++++++++----- 3 files changed, 13 insertions(+), 26 deletions(-) delete mode 100644 src/main/java/com/avaje/ebean/annotation/ColumnHstore.java diff --git a/src/main/java/com/avaje/ebean/annotation/ColumnHstore.java b/src/main/java/com/avaje/ebean/annotation/ColumnHstore.java deleted file mode 100644 index 401afc188..000000000 --- a/src/main/java/com/avaje/ebean/annotation/ColumnHstore.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.avaje.ebean.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Deprecated - please use @DbHstore instead. - * @see DbHstore - */ -@Deprecated -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ColumnHstore { - -} \ No newline at end of file diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java index 77d308d24..7fe8323d7 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java @@ -1,6 +1,5 @@ package com.avaje.ebeaninternal.server.deploy.parse; -import com.avaje.ebean.annotation.ColumnHstore; import com.avaje.ebean.annotation.CreatedTimestamp; import com.avaje.ebean.annotation.DbHstore; import com.avaje.ebean.annotation.DbJson; @@ -180,9 +179,7 @@ public class AnnotationFields extends AnnotationParser { util.setDbJsonBType(prop); } } - if (get(prop, ColumnHstore.class) != null) { - util.setDbHstore(prop); - } + if (get(prop, DbHstore.class) != null) { util.setDbHstore(prop); } diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/DeployCreateProperties.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/DeployCreateProperties.java index 815ba21f8..4c90c2714 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/DeployCreateProperties.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/DeployCreateProperties.java @@ -1,12 +1,16 @@ package com.avaje.ebeaninternal.server.deploy.parse; -import com.avaje.ebean.annotation.ColumnHstore; import com.avaje.ebean.annotation.DbHstore; import com.avaje.ebean.annotation.DbJson; import com.avaje.ebean.annotation.DbJsonB; import com.avaje.ebeaninternal.server.deploy.DetermineManyType; import com.avaje.ebeaninternal.server.deploy.ManyType; -import com.avaje.ebeaninternal.server.deploy.meta.*; +import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanDescriptor; +import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanProperty; +import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanPropertyAssocMany; +import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanPropertyAssocOne; +import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanPropertyCompound; +import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanPropertySimpleCollection; import com.avaje.ebeaninternal.server.type.CtCompoundType; import com.avaje.ebeaninternal.server.type.ScalarType; import com.avaje.ebeaninternal.server.type.TypeManager; @@ -17,7 +21,11 @@ import org.slf4j.LoggerFactory; import javax.persistence.ManyToOne; import javax.persistence.PersistenceException; import javax.persistence.Transient; -import java.lang.reflect.*; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; /** * Create the properties for a bean. @@ -294,8 +302,7 @@ public class DeployCreateProperties { private boolean isMappedType(Field field) { return (field.getAnnotation(DbJson.class) != null) || (field.getAnnotation(DbJsonB.class) != null) - || (field.getAnnotation(DbHstore.class) != null) - || (field.getAnnotation(ColumnHstore.class) != null); + || (field.getAnnotation(DbHstore.class) != null); } private boolean isTransientField(Field field) {