Loading src/main/java/es/redmic/db/administrative/model/Document.java +28 −5 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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) Loading @@ -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; Loading Loading @@ -109,6 +115,7 @@ public class Document extends UpdatableModel implements Serializable { private Set<Misidentification> misidentifications; public Document() { super(); } public String getCode() { Loading Loading @@ -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; } Loading src/main/java/es/redmic/db/common/model/EnabledModel.java 0 → 100644 +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; } } Loading
src/main/java/es/redmic/db/administrative/model/Document.java +28 −5 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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) Loading @@ -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; Loading Loading @@ -109,6 +115,7 @@ public class Document extends UpdatableModel implements Serializable { private Set<Misidentification> misidentifications; public Document() { super(); } public String getCode() { Loading Loading @@ -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; } Loading
src/main/java/es/redmic/db/common/model/EnabledModel.java 0 → 100644 +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; } }