moved to mongoID

This commit is contained in:
Francesco Mangiacrapa 2021-08-02 15:12:33 +02:00
parent d66e4a0c9f
commit 5e0ed38245
2 changed files with 23 additions and 16 deletions

View File

@ -75,7 +75,7 @@ public class ConvertToDataViewModel {
theConcessione.setDescrizioneContenuto(concessione.getDescrizioneContenuto()); theConcessione.setDescrizioneContenuto(concessione.getDescrizioneContenuto());
theConcessione.setEditore(concessione.getEditore()); theConcessione.setEditore(concessione.getEditore());
theConcessione.setFontiFinanziamento(concessione.getFontiFinanziamento()); theConcessione.setFontiFinanziamento(concessione.getFontiFinanziamento());
theConcessione.setId(concessione.getId()); theConcessione.setItemId(concessione.getMongo_id());
theConcessione.setNome(concessione.getNome()); theConcessione.setNome(concessione.getNome());
theConcessione.setIntroduzione(concessione.getIntroduzione()); theConcessione.setIntroduzione(concessione.getIntroduzione());

View File

@ -2,23 +2,24 @@ package org.gcube.application.geoportalcommon.shared.products.model;
import java.io.Serializable; 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 { public abstract class RecordDV implements Serializable {
/** /**
* *
*/ */
private static final long serialVersionUID = 2913726613820175679L; private static final long serialVersionUID = 2913726613820175679L;
/** The id. */ /** The id. */
private Long id; // this is the mongoID
private String itemId;
/** The record type. */ /** The record type. */
private String recordType; 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() { public String getItemId() {
return id; 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) { public void setItemId(String itemId) {
this.id = id; this.itemId = itemId;
} }
/** /**
@ -257,11 +258,16 @@ public abstract class RecordDV implements Serializable {
this.creationUser = creationUser; this.creationUser = creationUser;
} }
/**
* To string.
*
* @return the string
*/
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append("RecordDV [id="); builder.append("RecordDV [itemId=");
builder.append(id); builder.append(itemId);
builder.append(", recordType="); builder.append(", recordType=");
builder.append(recordType); builder.append(recordType);
builder.append(", version="); builder.append(", version=");
@ -286,4 +292,5 @@ public abstract class RecordDV implements Serializable {
return builder.toString(); return builder.toString();
} }
} }