SGF-605 - Add override attribute defaulted to false in the @Indexed annotation.
(cherry picked from commit 007cd25608083264e5796f04f338b551b9fa84ad) Signed-off-by: John Blum <jblum@pivotal.io>
This commit is contained in:
@@ -181,10 +181,8 @@ public class IndexConfiguration extends EntityDefinedRegionsConfiguration {
|
||||
|
||||
indexFactoryBeanBuilder.addPropertyValue("name", indexName);
|
||||
|
||||
/*
|
||||
indexFactoryBeanBuilder.addPropertyValue("override",
|
||||
resolveOverride(persistentEntity, persistentProperty, indexedAttributes));
|
||||
*/
|
||||
|
||||
indexFactoryBeanBuilder.addPropertyValue("type",
|
||||
resolveType(persistentEntity, persistentProperty, indexedAttributes, indexType).toString());
|
||||
@@ -289,7 +287,6 @@ public class IndexConfiguration extends EntityDefinedRegionsConfiguration {
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
/*
|
||||
@SuppressWarnings("unused")
|
||||
private boolean resolveOverride(GemfirePersistentEntity persistentEntity,
|
||||
GemfirePersistentProperty persistentProperty, AnnotationAttributes indexedAttributes) {
|
||||
@@ -297,7 +294,6 @@ public class IndexConfiguration extends EntityDefinedRegionsConfiguration {
|
||||
return (indexedAttributes.containsKey("override")
|
||||
&& indexedAttributes.getBoolean("override"));
|
||||
}
|
||||
*/
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@@ -70,6 +70,13 @@ public @interface Indexed {
|
||||
*/
|
||||
String from() default "";
|
||||
|
||||
/**
|
||||
* Determines whether this given {@link Index} definition should override any existing {@link Index} definition.
|
||||
*
|
||||
* Defaults to {@literal false}.
|
||||
*/
|
||||
boolean override() default false;
|
||||
|
||||
/**
|
||||
* Type of Index to create.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user