From 5e0ed382459ecfc8f252e05bb8932439acd127df Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Mon, 2 Aug 2021 15:12:33 +0200 Subject: [PATCH] moved to mongoID --- .../ConvertToDataViewModel.java | 2 +- .../shared/products/model/RecordDV.java | 37 +++++++++++-------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java index 232a3a8..a08c54c 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java +++ b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java @@ -75,7 +75,7 @@ public class ConvertToDataViewModel { theConcessione.setDescrizioneContenuto(concessione.getDescrizioneContenuto()); theConcessione.setEditore(concessione.getEditore()); theConcessione.setFontiFinanziamento(concessione.getFontiFinanziamento()); - theConcessione.setId(concessione.getId()); + theConcessione.setItemId(concessione.getMongo_id()); theConcessione.setNome(concessione.getNome()); theConcessione.setIntroduzione(concessione.getIntroduzione()); diff --git a/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/RecordDV.java b/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/RecordDV.java index 837a86f..efa066d 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/RecordDV.java +++ b/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/RecordDV.java @@ -2,23 +2,24 @@ package org.gcube.application.geoportalcommon.shared.products.model; import java.io.Serializable; + /** - * The Class Record. + * The Class RecordDV. * - * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) + * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it * - * Nov 2, 2020 + * Aug 2, 2021 */ public abstract class RecordDV implements Serializable { - /** * */ private static final long serialVersionUID = 2913726613820175679L; /** The id. */ - private Long id; + // this is the mongoID + private String itemId; /** The record type. */ private String recordType; @@ -60,21 +61,21 @@ public abstract class RecordDV implements Serializable { } /** - * Gets the id. + * Gets the item id. * - * @return the id + * @return the item id */ - public Long getId() { - return id; + public String getItemId() { + return itemId; } /** - * Sets the id. + * Sets the item id. * - * @param id the new id + * @param itemId the new item id */ - public void setId(Long id) { - this.id = id; + public void setItemId(String itemId) { + this.itemId = itemId; } /** @@ -257,11 +258,16 @@ public abstract class RecordDV implements Serializable { this.creationUser = creationUser; } + /** + * To string. + * + * @return the string + */ @Override public String toString() { StringBuilder builder = new StringBuilder(); - builder.append("RecordDV [id="); - builder.append(id); + builder.append("RecordDV [itemId="); + builder.append(itemId); builder.append(", recordType="); builder.append(recordType); builder.append(", version="); @@ -286,4 +292,5 @@ public abstract class RecordDV implements Serializable { return builder.toString(); } + }