Commit c0d345bf authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade nuevos campos a actividad

parent 344a1056
Loading
Loading
Loading
Loading
+50 −3
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import es.redmic.db.maintenance.administrative.model.ActivityType;
import es.redmic.db.maintenance.administrative.model.ThemeInspire;

/**
 * The persistent class for the activity database table.
@@ -55,12 +56,26 @@ public class Activity extends ActivityBase {
	@JoinColumn(name = "embargoid")
	private Embargo embargo;

	// bi-directional many-to-one association to ThemeInspire
	@ManyToOne
	@JoinColumn(name = "themeinspireid")
	private ThemeInspire themeInspire;

	@Column(name = "activitycategory", length = 2)
	private String activityCategory;

	@Column(length = 5000)
	private String license;

	@Column(name = "spatialextension")
	private String spatialExtension;

	@Column
	private Boolean starred;

	// bi-directional many-to-one association to ActivityResource
	@OneToMany(mappedBy = "activity", fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
	private Set<ActivityResource> resources = new HashSet<ActivityResource>();
	private Set<ActivityResource> resources = new HashSet<>();

	public Activity() {
		// Constructor por defecto para que accedan los mappers
@@ -82,6 +97,14 @@ public class Activity extends ActivityBase {
		this.embargo = embargo;
	}

	public ThemeInspire getThemeInspire() {
		return this.themeInspire;
	}

	public void setThemeInspire(ThemeInspire themeInspire) {
		this.themeInspire = themeInspire;
	}

	public String getActivityCategory() {
		return activityCategory;
	}
@@ -90,10 +113,34 @@ public class Activity extends ActivityBase {
		this.activityCategory = activityCategory;
	}

	public String getLicense() {
		return this.license;
	}

	public void setLicense(String license) {
		this.license = license;
	}

	public String getSpatialExtension() {
		return this.spatialExtension;
	}

	public void setSpatialExtension(String spatialExtension) {
		this.spatialExtension = spatialExtension;
	}

	public Set<ActivityResource> getResources() {
		return resources;
	}

	public Boolean getStarred() {
		return this.starred;
	}

	public void setStarred(Boolean starred) {
		this.starred = starred;
	}

	public void setResources(Set<ActivityResource> activityResources) {

		this.resources.clear();