Author: dgeraskov
Date: 2011-08-23 04:56:42 -0400 (Tue, 23 Aug 2011)
New Revision: 34163
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/GenericGeneratorAnnotationImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedNativeQueryAnnotation.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedQueryAnnotation.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceParameterAnnotation.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-9562
JPA: Standalone annotations lose properties when become nested
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java 2011-08-23
08:12:13 UTC (rev 34162)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaGeneratorContainerImpl.java 2011-08-23
08:56:42 UTC (rev 34163)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -11,7 +11,6 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
import java.util.Iterator;
-import java.util.List;
import java.util.ListIterator;
import java.util.Vector;
@@ -25,8 +24,6 @@
import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
import
org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaGeneratorContainer;
import org.eclipse.jpt.jpa.core.resource.java.NestableAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateAbstractJpaFactory;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGenerator;
import
org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
@@ -148,14 +145,14 @@
}
- protected void moveNamedQuery_(int index, JavaGenericGenerator genericGenerator) {
+ protected void moveGenericGenerator_(int index, JavaGenericGenerator genericGenerator)
{
this.moveItemInList(index, genericGenerator, this.genericGenerators,
GENERIC_GENERATORS_LIST);
}
protected JavaGenericGenerator addGenericGenerator_(int index,
GenericGeneratorAnnotation ggAnnotation) {
- JavaGenericGenerator query = this.buildGenericGenerator(ggAnnotation);
- this.addItemToList(index, query, this.genericGenerators, GENERIC_GENERATORS_LIST);
- return query;
+ JavaGenericGenerator generator = this.buildGenericGenerator(ggAnnotation);
+ this.addItemToList(index, generator, this.genericGenerators, GENERIC_GENERATORS_LIST);
+ return generator;
}
protected void removeGenericGenerator_(JavaGenericGenerator rgenericGenerator) {
@@ -183,7 +180,7 @@
}
@Override
public void moveContextElement(int index, JavaGenericGenerator element) {
- HibernateJavaGeneratorContainerImpl.this.moveNamedQuery_(index, element);
+ HibernateJavaGeneratorContainerImpl.this.moveGenericGenerator_(index, element);
}
@Override
public void addContextElement(int index, GenericGeneratorAnnotation resourceElement) {
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/GenericGeneratorAnnotationImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/GenericGeneratorAnnotationImpl.java 2011-08-23
08:12:13 UTC (rev 34162)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/GenericGeneratorAnnotationImpl.java 2011-08-23
08:56:42 UTC (rev 34163)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.resource.java;
+import java.util.HashMap;
+import java.util.List;
import java.util.ListIterator;
+import java.util.Map;
import java.util.Vector;
import org.eclipse.jdt.core.IAnnotation;
@@ -92,7 +95,40 @@
this.strategyTextRange = this.buildStrategyTextRange(astRoot);
AnnotationContainerTools.synchronize(this.parametersContainer, astRoot);
}
+
+ @Override
+ public void storeOn(Map<String, Object> map) {
+ super.storeOn(map);
+ map.put(NAME_PROPERTY, this.name);
+ this.name = null;
+ map.put(STRATEGY_PROPERTY, this.strategy);
+ this.strategy = null;
+
+ List<Map<String, Object>> paramStaet =
this.buildStateList(this.parameters.size());
+ for (NestableParameterAnnotation param : nestableParameters()) {
+ Map<String, Object> hintState = new HashMap<String, Object>();
+ param.storeOn(hintState);
+ paramStaet.add(hintState);
+ }
+ map.put(PARAMETERS_LIST, paramStaet);
+ this.parameters.clear();
+ }
+
+ @Override
+ public void restoreFrom(Map<String, Object> map) {
+ super.restoreFrom(map);
+
+ this.setName((String) map.get(NAME_PROPERTY));
+ this.setStrategy((String) map.get(STRATEGY_PROPERTY));
+
+ @SuppressWarnings("unchecked")
+ List<Map<String, Object>> paramsState = (List<Map<String,
Object>>) map.get(PARAMETERS_LIST);
+ for (Map<String, Object> paramState : paramsState) {
+ this.addParameter().restoreFrom(paramState);
+ }
+ }
+
public String getAnnotationName() {
return ANNOTATION_NAME;
}
@@ -191,6 +227,9 @@
//************************ parameters ***********************
+ private NestableParameterAnnotation addParameter() {
+ return this.addParameter(this.parameters.size());
+ }
public NestableParameterAnnotation addParameter(int index) {
return (NestableParameterAnnotation)
AnnotationContainerTools.addNestedAnnotation(index, this.parametersContainer);
@@ -362,11 +401,11 @@
}
public static GenericGeneratorAnnotation createNestedGenericGenerator(
- JavaResourceNode parent, AnnotatedElement member,
+ JavaResourceNode parent, AnnotatedElement element,
int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
IndexedDeclarationAnnotationAdapter idaa =
buildNestedHibernateDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new
ElementIndexedAnnotationAdapter(member, idaa);
- return new GenericGeneratorAnnotationImpl(parent, member, idaa, annotationAdapter);
+ IndexedAnnotationAdapter annotationAdapter = new
ElementIndexedAnnotationAdapter(element, idaa);
+ return new GenericGeneratorAnnotationImpl(parent, element, idaa, annotationAdapter);
}
private static IndexedDeclarationAnnotationAdapter
buildNestedHibernateDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter
hibernateGenericGeneratorsAdapter) {
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedNativeQueryAnnotation.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedNativeQueryAnnotation.java 2011-08-23
08:12:13 UTC (rev 34162)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedNativeQueryAnnotation.java 2011-08-23
08:56:42 UTC (rev 34163)
@@ -11,6 +11,7 @@
package org.jboss.tools.hibernate.jpt.core.internal.resource.java;
import java.util.ListIterator;
+import java.util.Map;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
@@ -33,7 +34,6 @@
import org.eclipse.jpt.common.utility.internal.iterators.EmptyListIterator;
import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.NestableQueryHintAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
import org.jboss.tools.hibernate.jpt.core.internal.context.CacheModeType;
@@ -602,27 +602,57 @@
}
// ********** NestableAnnotation implementation **********
- /**
- * convenience implementation of method from NestableAnnotation interface
- * for subclasses
- */
- public void initializeFrom(NestableAnnotation oldAnnotation) {
- HibernateSourceNamedNativeQueryAnnotation oldQuery =
(HibernateSourceNamedNativeQueryAnnotation) oldAnnotation;
- this.setName(oldQuery.getName());
- this.setQuery(oldQuery.getQuery());
- this.setFlushMode(oldQuery.getFlushMode());
- this.setCacheMode(oldQuery.getCacheMode());
- this.setCacheable(oldQuery.isCacheable());
- this.setComment(oldQuery.getComment());
- this.setFetchSize(oldQuery.getFetchSize());
- this.setTimeout(oldQuery.getTimeout());
- this.setCacheRegion(oldQuery.getCacheRegion());
- this.setReadOnly(oldQuery.isReadOnly());
- this.setCallable(oldQuery.isCallable());
- this.setResultClass(oldQuery.getResultClass());
- this.setResultSetMapping(oldQuery.getResultSetMapping());
+ @Override
+ public void storeOn(Map<String, Object> map) {
+ super.storeOn(map);
+
+ map.put(NAME_PROPERTY, this.name);
+ this.name = null;
+ map.put(QUERY_PROPERTY, this.query);
+ this.query = null;
+ map.put(FLUSH_MODE_PROPERTY, this.flushMode);
+ this.flushMode = null;
+ map.put(CACHE_MODE_PROPERTY, this.cacheMode);
+ this.cacheMode = null;
+ map.put(CACHEABLE_PROPERTY, this.cacheable);
+ this.cacheable = null;
+ map.put(CACHE_REGION_PROPERTY, this.cacheRegion);
+ this.cacheRegion = null;
+ map.put(FETCH_SIZE_PROPERTY, this.fetchSize);
+ this.fetchSize = null;
+ map.put(TIMEOUT_PROPERTY, this.timeout);
+ this.timeout = null;
+ map.put(COMMENT_PROPERTY, this.comment);
+ this.comment = null;
+ map.put(READ_ONLY_PROPERTY, this.readOnly);
+ this.readOnly = null;
+ map.put(CALLABLE_PROPERTY, this.callable);
+ this.callable = null;
+ map.put(RESULT_CLASS_PROPERTY, this.resultClass);
+ this.resultClass = null;
+ map.put(RESULT_SET_MAPPING_PROPERTY, this.resultSetMapping);
+ this.resultSetMapping = null;
}
+ @Override
+ public void restoreFrom(Map<String, Object> map) {
+ super.restoreFrom(map);
+
+ this.setName((String) map.get(NAME_PROPERTY));
+ this.setQuery((String) map.get(QUERY_PROPERTY));
+ this.setFlushMode((FlushModeType) map.get(FLUSH_MODE_PROPERTY));
+ this.setCacheMode((CacheModeType) map.get(CACHE_MODE_PROPERTY));
+ this.setCacheable((Boolean) map.get(CACHEABLE_PROPERTY));
+ this.setCacheRegion((String) map.get(CACHE_REGION_PROPERTY));
+ this.setFetchSize((Integer) map.get(FETCH_SIZE_PROPERTY));
+ this.setTimeout((Integer) map.get(TIMEOUT_PROPERTY));
+ this.setComment((String)map.get(COMMENT_PROPERTY));
+ this.setReadOnly((Boolean) map.get(READ_ONLY_PROPERTY));
+ this.setCallable((Boolean) map.get(CALLABLE_PROPERTY));
+ this.setResultClass((String) map.get(RESULT_CLASS_PROPERTY));
+ this.setResultSetMapping((String) map.get(RESULT_SET_MAPPING_PROPERTY));
+ }
+
/**
* convenience implementation of method from NestableAnnotation interface
* for subclasses
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedQueryAnnotation.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedQueryAnnotation.java 2011-08-23
08:12:13 UTC (rev 34162)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/HibernateSourceNamedQueryAnnotation.java 2011-08-23
08:56:42 UTC (rev 34163)
@@ -11,6 +11,7 @@
package org.jboss.tools.hibernate.jpt.core.internal.resource.java;
import java.util.ListIterator;
+import java.util.Map;
import org.eclipse.jdt.core.dom.CompilationUnit;
import
org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
@@ -31,7 +32,6 @@
import org.eclipse.jpt.common.utility.internal.iterators.EmptyListIterator;
import org.eclipse.jpt.jpa.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.JavaResourceNode;
-import org.eclipse.jpt.jpa.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.NestableQueryHintAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
import org.jboss.tools.hibernate.jpt.core.internal.context.CacheModeType;
@@ -42,7 +42,6 @@
* @author Dmitry Geraskov
*
*/
-@SuppressWarnings("restriction")
public class HibernateSourceNamedQueryAnnotation extends
SourceAnnotation<AnnotatedElement>
implements HibernateNamedQueryAnnotation {
@@ -467,25 +466,49 @@
return this.readOnlyAdapter.getValue(astRoot);
}
// ********** NestableAnnotation implementation **********
+ @Override
+ public void storeOn(Map<String, Object> map) {
+ super.storeOn(map);
- /**
- * convenience implementation of method from NestableAnnotation interface
- * for subclasses
- */
- public void initializeFrom(NestableAnnotation oldAnnotation) {
- HibernateSourceNamedQueryAnnotation oldQuery = (HibernateSourceNamedQueryAnnotation)
oldAnnotation;
- this.setName(oldQuery.getName());
- this.setQuery(oldQuery.getQuery());
- this.setFlushMode(oldQuery.getFlushMode());
- this.setCacheMode(oldQuery.getCacheMode());
- this.setCacheable(oldQuery.isCacheable());
- this.setComment(oldQuery.getComment());
- this.setFetchSize(oldQuery.getFetchSize());
- this.setTimeout(oldQuery.getTimeout());
- this.setCacheRegion(oldQuery.getCacheRegion());
- this.setReadOnly(oldQuery.isReadOnly());
+ map.put(NAME_PROPERTY, this.name);
+ this.name = null;
+ map.put(QUERY_PROPERTY, this.query);
+ this.query = null;
+
+ map.put(FLUSH_MODE_PROPERTY, this.flushMode);
+ this.flushMode = null;
+ map.put(CACHE_MODE_PROPERTY, this.cacheMode);
+ this.cacheMode = null;
+ map.put(CACHEABLE_PROPERTY, this.cacheable);
+ this.cacheable = null;
+ map.put(CACHE_REGION_PROPERTY, this.cacheRegion);
+ this.cacheRegion = null;
+ map.put(FETCH_SIZE_PROPERTY, this.fetchSize);
+ this.fetchSize = null;
+ map.put(TIMEOUT_PROPERTY, this.timeout);
+ this.timeout = null;
+ map.put(COMMENT_PROPERTY, this.comment);
+ this.comment = null;
+ map.put(READ_ONLY_PROPERTY, this.readOnly);
+ this.readOnly = null;
}
+ @Override
+ public void restoreFrom(Map<String, Object> map) {
+ super.restoreFrom(map);
+
+ this.setName((String) map.get(NAME_PROPERTY));
+ this.setQuery((String) map.get(QUERY_PROPERTY));
+ this.setFlushMode((FlushModeType) map.get(FLUSH_MODE_PROPERTY));
+ this.setCacheMode((CacheModeType) map.get(CACHE_MODE_PROPERTY));
+ this.setCacheable((Boolean) map.get(CACHEABLE_PROPERTY));
+ this.setCacheRegion((String) map.get(CACHE_REGION_PROPERTY));
+ this.setFetchSize((Integer) map.get(FETCH_SIZE_PROPERTY));
+ this.setTimeout((Integer) map.get(TIMEOUT_PROPERTY));
+ this.setComment((String)map.get(COMMENT_PROPERTY));
+ this.setReadOnly((Boolean) map.get(READ_ONLY_PROPERTY));
+ }
+
/**
* convenience implementation of method from NestableAnnotation interface
* for subclasses
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceParameterAnnotation.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceParameterAnnotation.java 2011-08-23
08:12:13 UTC (rev 34162)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceParameterAnnotation.java 2011-08-23
08:56:42 UTC (rev 34163)
@@ -10,6 +10,10 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.resource.java;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import org.eclipse.jdt.core.dom.CompilationUnit;
import
org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.common.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
@@ -144,17 +148,26 @@
// ********** NestableAnnotation implementation **********
-
- public void initializeFrom(NestableAnnotation oldAnnotation) {
- ParameterAnnotation oldParameter = (ParameterAnnotation) oldAnnotation;
- this.setName(oldParameter.getName());
- this.setValue(oldParameter.getValue());
- }
-
public void moveAnnotation(int newIndex) {
this.getIndexedAnnotationAdapter().moveAnnotation(newIndex);
}
+
+ @Override
+ public void storeOn(Map<String, Object> map) {
+ super.storeOn(map);
+ map.put(NAME_PROPERTY, this.name);
+ this.name = null;
+ map.put(VALUE_PROPERTY, this.value);
+ this.value = null;
+ }
+ @Override
+ public void restoreFrom(Map<String, Object> map) {
+ super.restoreFrom(map);
+ this.setName((String) map.get(NAME_PROPERTY));
+ this.setValue((String) map.get(VALUE_PROPERTY));
+ }
+
// ********** static methods **********
public static SourceParameterAnnotation createParameter(JavaResourceNode parent,
AnnotatedElement member, DeclarationAnnotationAdapter annotationAdapter, String
elementName, int index) {
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java 2011-08-23
08:12:13 UTC (rev 34162)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java 2011-08-23
08:56:42 UTC (rev 34163)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.resource.java;
+import java.util.HashMap;
+import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Vector;
@@ -121,17 +123,33 @@
@Override
public void storeOn(Map<String, Object> map) {
super.storeOn(map);
+ map.put(NAME_PROPERTY, this.name);
+ this.name = null;
map.put(TYPE_CLASS_PROPERTY, this.typeClass);
this.typeClass = null;
map.put(DEF_FOR_TYPE_PROPERTY, this.defaultForType);
this.defaultForType = null;
+ List<Map<String, Object>> paramStaet =
this.buildStateList(this.parameters.size());
+ for (NestableParameterAnnotation param : nestableParameters()) {
+ Map<String, Object> hintState = new HashMap<String, Object>();
+ param.storeOn(hintState);
+ paramStaet.add(hintState);
+ }
+ map.put(PARAMETERS_LIST, paramStaet);
+ this.parameters.clear();
}
@Override
public void restoreFrom(Map<String, Object> map) {
super.restoreFrom(map);
+ this.setName((String) map.get(NAME_PROPERTY));
this.setTypeClass((String) map.get(TYPE_CLASS_PROPERTY));
this.setDefaultForType((String) map.get(DEF_FOR_TYPE_PROPERTY));
+ @SuppressWarnings("unchecked")
+ List<Map<String, Object>> paramsState = (List<Map<String,
Object>>) map.get(PARAMETERS_LIST);
+ for (Map<String, Object> paramState : paramsState) {
+ this.addParameter().restoreFrom(paramState);
+ }
}
// ********** TypeDefAnnotation implementation **********
@@ -249,7 +267,10 @@
return (this.defaultForType == null) ? null :
ASTTools.resolveFullyQualifiedName(this.defaultForTypeAdapter.getExpression(astRoot));
}
//************************ parameters ***********************
-
+ private NestableParameterAnnotation addParameter() {
+ return this.addParameter(this.parameters.size());
+ }
+
public NestableParameterAnnotation addParameter(int index) {
return (NestableParameterAnnotation)
AnnotationContainerTools.addNestedAnnotation(index, this.parametersContainer);
}