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

Merge branch 'release-0.9.0' into 'master'

release-0.9.0

See merge request redmic-project/server/library/db!17
parents 0acbdb4a 3bebc9e7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,14 +14,14 @@
	<groupId>es.redmic.lib</groupId>
	<artifactId>db</artifactId>
	<packaging>jar</packaging>
	<version>0.8.0</version>
	<version>0.9.0</version>
	<name>DB</name>
	<description>Services, repository and models in DB</description>

	<properties>
		<!-- REDMIC -->
		<redmic.db-commons.version>0.7.0</redmic.db-commons.version>
		<redmic.models.version>0.13.0</redmic.models.version>
		<redmic.models.version>0.14.0</redmic.models.version>
		<redmic.exceptions.version>0.10.0</redmic.exceptions.version>

		<!-- OTHER -->
+28 −5
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ import org.joda.time.DateTime;

import es.redmic.db.administrative.taxonomy.model.Misidentification;
import es.redmic.db.administrative.taxonomy.model.Peculiarity;
import es.redmic.db.common.model.UpdatableModel;
import es.redmic.db.common.model.EnabledModel;
import es.redmic.db.maintenance.administrative.model.DocumentType;
import es.redmic.db.maintenance.device.model.Device;

@@ -51,7 +51,7 @@ import es.redmic.db.maintenance.device.model.Device;
@Entity
@Table(name = "document")
@NamedQuery(name = "Document.findAll", query = "SELECT d FROM Document d")
public class Document extends UpdatableModel implements Serializable {
public class Document extends EnabledModel implements Serializable {
	private static final long serialVersionUID = 1L;

	@Column(length = 50)
@@ -78,6 +78,12 @@ public class Document extends UpdatableModel implements Serializable {
	@Column(length = 250)
	private String url;

	@Column(length = 250)
	private String internalurl;

	@Column
	private Boolean privateinternalurl;

	@Column(nullable = false)
	private Integer year;

@@ -109,6 +115,7 @@ public class Document extends UpdatableModel implements Serializable {
	private Set<Misidentification> misidentifications;

	public Document() {
		super();
	}

	public String getCode() {
@@ -180,6 +187,22 @@ public class Document extends UpdatableModel implements Serializable {
		this.url = url;
	}

	public String getInternalUrl() {
		return this.internalurl;
	}

	public void setInternalUrl(String internalurl) {
		this.internalurl = internalurl;
	}

	public Boolean getPrivateInternalUrl() {
		return this.privateinternalurl;
	}

	public void setPrivateInternalUrl(Boolean privateinternalurl) {
		this.privateinternalurl = privateinternalurl;
	}

	public Integer getYear() {
		return this.year;
	}
+43 −0
Original line number Diff line number Diff line
package es.redmic.db.common.model;

/*-
 * #%L
 * DB
 * %%
 * Copyright (C) 2019 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

@MappedSuperclass
public class EnabledModel extends UpdatableModel {

	public EnabledModel() {
		super();
	}

	@Column
	private Boolean enabled;

	public Boolean getEnabled() {
		return this.enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
}