ContentItems for publications
parent
2e613688d8
commit
a16579771c
|
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
package org.scientificcms.publications.contenttypes;
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
import org.librecms.contentsection.ContentItem;
|
import org.librecms.contentsection.ContentItem;
|
||||||
import org.scientificcms.publications.Publication;
|
import org.scientificcms.publications.Publication;
|
||||||
|
|
||||||
|
|
@ -20,76 +21,20 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PUBLICATION_ITEMS", schema = DB_SCHEMA)
|
@Table(name = "PUBLICATION_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
public abstract class AbstractPublicationItem<T extends Publication>
|
public abstract class AbstractPublicationItem<T extends Publication>
|
||||||
extends ContentItem {
|
extends ContentItem {
|
||||||
//extends Publication {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public abstract T getPublication();
|
public abstract T getPublication();
|
||||||
|
|
||||||
protected abstract void setPublication(T publication);
|
protected abstract void setPublication(T publication);
|
||||||
//
|
|
||||||
// @Embedded
|
|
||||||
// private Publication basicProperties;
|
|
||||||
//
|
|
||||||
// public AbstractPublicationItem() {
|
|
||||||
//
|
|
||||||
// super();
|
|
||||||
//
|
|
||||||
// basicProperties = new Publication();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public Publication getBasicProperties() {
|
|
||||||
// return basicProperties;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// protected void setBasicProperties(
|
|
||||||
// final Publication basicProperties) {
|
|
||||||
//
|
|
||||||
// this.basicProperties = basicProperties;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public int hashCode() {
|
|
||||||
// int hash = super.hashCode();
|
|
||||||
// hash = 59 * hash + Objects.hashCode(basicProperties);
|
|
||||||
// return hash;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public boolean equals(Object obj) {
|
|
||||||
//
|
|
||||||
// if (this == obj) {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// if (obj == null) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// if (!super.equals(obj)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// if (!(obj instanceof AbstractPublicationItem)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// final AbstractPublicationItem other = (AbstractPublicationItem) obj;
|
|
||||||
// if (!other.canEqual(this)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return Objects.equals(basicProperties, other.getBasicProperties());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEqual(final Object obj) {
|
public boolean canEqual(final Object obj) {
|
||||||
|
|
||||||
return obj instanceof AbstractPublicationItem;
|
return obj instanceof AbstractPublicationItem;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public String toString(final String data) {
|
|
||||||
// return super.toString(String.format("basicProperties = %s%s",
|
|
||||||
// Objects.toString(basicProperties),
|
|
||||||
// data));
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,78 +5,30 @@
|
||||||
*/
|
*/
|
||||||
package org.scientificcms.publications.contenttypes;
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
import org.scientificcms.publications.PublicationWithPublisher;
|
import org.scientificcms.publications.PublicationWithPublisher;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
* @param <T>
|
* @param <T>
|
||||||
*/
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "PUBLICATION_WITH_PUBLISHER_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
public abstract class AbstractPublicationWithPublisherItem<T extends PublicationWithPublisher>
|
public abstract class AbstractPublicationWithPublisherItem<T extends PublicationWithPublisher>
|
||||||
extends AbstractPublicationItem<T> {
|
extends AbstractPublicationItem<T> {
|
||||||
//extends PublicationItem {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
//
|
|
||||||
// @Embedded
|
|
||||||
// private AbstractPublicationWithPublisherItem withPublisherProperties;
|
|
||||||
//
|
|
||||||
// public AbstractPublicationWithPublisherItem() {
|
|
||||||
//
|
|
||||||
// this.withPublisherProperties = new AbstractPublicationWithPublisherItem();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public AbstractPublicationWithPublisherItem getWithPublisherProperties() {
|
|
||||||
// return withPublisherProperties;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// protected void setWithPublisherProperties(
|
|
||||||
// final AbstractPublicationWithPublisherItem withPublisherProperties) {
|
|
||||||
// this.withPublisherProperties = withPublisherProperties;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public int hashCode() {
|
|
||||||
// int hash = super.hashCode();
|
|
||||||
// hash = 79 * hash + Objects.hashCode(withPublisherProperties);
|
|
||||||
// return hash;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public boolean equals(final Object obj) {
|
|
||||||
// if (this == obj) {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// if (obj == null) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// if (!super.equals(this)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// if (!(obj instanceof AbstractPublicationWithPublisherItem)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// final AbstractPublicationWithPublisherItem other = (AbstractPublicationWithPublisherItem) obj;
|
|
||||||
// if (!other.canEqual(this)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return Objects.equals(withPublisherProperties,
|
|
||||||
// other.getWithPublisherProperties());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEqual(final Object obj) {
|
public boolean canEqual(final Object obj) {
|
||||||
return obj instanceof AbstractPublicationWithPublisherItem;
|
return obj instanceof AbstractPublicationWithPublisherItem;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public String toString(final String data) {
|
|
||||||
//
|
|
||||||
// return super.toString(String.format("withPublisherProperties = %s%s",
|
|
||||||
// Objects.toString(
|
|
||||||
// withPublisherProperties),
|
|
||||||
// data));
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.ArticleInCollectedVolume;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "ARTICLE_IN_COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class ArticleInCollectedVolumeItem
|
||||||
|
extends AbstractPublicationItem<ArticleInCollectedVolume> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "ARTICLE_ID")
|
||||||
|
private ArticleInCollectedVolume article;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArticleInCollectedVolume getPublication() {
|
||||||
|
return article;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final ArticleInCollectedVolume article) {
|
||||||
|
this.article = article;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(this.article);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof ArticleInCollectedVolumeItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final ArticleInCollectedVolumeItem other
|
||||||
|
= (ArticleInCollectedVolumeItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.article, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof ArticleInCollectedVolumeItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", article = %s%s",
|
||||||
|
Objects.toString(article),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.ArticleInJournal;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "ARTICLE_IN_COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class ArticleInJournalItem
|
||||||
|
extends AbstractPublicationItem<ArticleInJournal> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "ARTICLE_ID")
|
||||||
|
private ArticleInJournal article;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArticleInJournal getPublication() {
|
||||||
|
return article;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final ArticleInJournal article) {
|
||||||
|
this.article = article;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(this.article);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof ArticleInJournalItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final ArticleInJournalItem other
|
||||||
|
= (ArticleInJournalItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.article, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof ArticleInJournalItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", article = %s%s",
|
||||||
|
Objects.toString(article),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,8 +5,9 @@
|
||||||
*/
|
*/
|
||||||
package org.scientificcms.publications.contenttypes;
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.CollectedVolume;
|
||||||
import org.scientificcms.publications.PublicationWithPublisher;
|
import org.scientificcms.publications.PublicationWithPublisher;
|
||||||
import org.scientificcms.publications.assets.CollectedVolumeAsset;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -23,73 +24,64 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
|
@Table(name = "COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
|
||||||
public class CollectedVolumeItem extends AbstractPublicationWithPublisherItem<PublicationWithPublisher>{
|
@Audited
|
||||||
// extends Publication {
|
public class CollectedVolumeItem
|
||||||
|
extends AbstractPublicationWithPublisherItem<CollectedVolume> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
//
|
|
||||||
// @OneToOne
|
@OneToOne
|
||||||
// @JoinColumn(name = "DATA_ID")
|
@JoinColumn(name = "COLLECTED_VOLUME_ID")
|
||||||
// private CollectedVolumeAsset publicationData;
|
private CollectedVolume collectedVolume;
|
||||||
//
|
|
||||||
// public CollectedVolumeAsset getPublicationData() {
|
|
||||||
// return publicationData;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// protected void setPublicationData(final CollectedVolumeAsset publicationData) {
|
|
||||||
// this.publicationData = publicationData;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public int hashCode() {
|
|
||||||
// int hash = super.hashCode();
|
|
||||||
// hash = 43 * hash + Objects.hashCode(publicationData);
|
|
||||||
// return hash;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public boolean equals(final Object obj) {
|
|
||||||
// if (this == obj) {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// if (obj == null) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// if (!super.equals(obj)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// if (!(obj instanceof CollectedVolumeItem)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// final CollectedVolumeItem other = (CollectedVolumeItem) obj;
|
|
||||||
// if (!other.canEqual(this)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return Objects.equals(publicationData, other.getPublicationData());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public boolean canEqual(final Object obj) {
|
|
||||||
//
|
|
||||||
// return obj instanceof CollectedVolumeItem;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public String toString(final String data) {
|
|
||||||
//
|
|
||||||
// return super.toString(String.format("data = %s%s",
|
|
||||||
// Objects.toString(publicationData),
|
|
||||||
// data));
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PublicationWithPublisher getPublication() {
|
public CollectedVolume getPublication() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
return collectedVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setPublication(PublicationWithPublisher publication) {
|
protected void setPublication(final CollectedVolume collectedVolume) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
this.collectedVolume = collectedVolume;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 59 * hash + Objects.hashCode(collectedVolume);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof CollectedVolume)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final CollectedVolumeItem other = (CollectedVolumeItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.collectedVolume, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof CollectedVolumeItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", collectedVolume = %s%s",
|
||||||
|
Objects.toString(collectedVolume),
|
||||||
|
data));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.Expertise;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "EXPERTISE_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class ExpertiseItem
|
||||||
|
extends AbstractPublicationItem<Expertise> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "EXPERTISE_ID")
|
||||||
|
private Expertise expertise;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Expertise getPublication() {
|
||||||
|
return expertise;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final Expertise expertise) {
|
||||||
|
this.expertise = expertise;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(expertise);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof ExpertiseItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final ExpertiseItem other
|
||||||
|
= (ExpertiseItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.expertise, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof ExpertiseItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", expertise = %s%s",
|
||||||
|
Objects.toString(expertise),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.GreyLiterature;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "GREY_LITERATURE_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class GreyLiteratureItem
|
||||||
|
extends AbstractPublicationItem<GreyLiterature> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "GREY_LITERATURE_ID")
|
||||||
|
private GreyLiterature greyLiterature;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GreyLiterature getPublication() {
|
||||||
|
return greyLiterature;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final GreyLiterature greyLiterature) {
|
||||||
|
this.greyLiterature = greyLiterature;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(greyLiterature);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof GreyLiteratureItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final GreyLiteratureItem other
|
||||||
|
= (GreyLiteratureItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.greyLiterature, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof GreyLiteratureItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", greyLiterature = %s%s",
|
||||||
|
Objects.toString(greyLiterature),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.InProceedings;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "INPROCEEDINGS_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class InProceedingsItem
|
||||||
|
extends AbstractPublicationItem<InProceedings> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "INPROCEEDINGS_ID")
|
||||||
|
private InProceedings inProcedings;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InProceedings getPublication() {
|
||||||
|
return inProcedings;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final InProceedings inProceedings) {
|
||||||
|
this.inProcedings = inProceedings;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(inProcedings);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof InProceedingsItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final InProceedingsItem other
|
||||||
|
= (InProceedingsItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.inProcedings, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof InProceedingsItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", inProceedings = %s%s",
|
||||||
|
Objects.toString(inProcedings),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.InternetArticle;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "INTERNET_ARTICLE_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class InternetArticleItem
|
||||||
|
extends AbstractPublicationItem<InternetArticle> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "EXPERTISE_ID")
|
||||||
|
private InternetArticle expertise;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InternetArticle getPublication() {
|
||||||
|
return expertise;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final InternetArticle internetArticle) {
|
||||||
|
this.expertise = internetArticle;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(expertise);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof InternetArticleItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final InternetArticleItem other
|
||||||
|
= (InternetArticleItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.expertise, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof InternetArticleItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", internetArticle = %s%s",
|
||||||
|
Objects.toString(expertise),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -22,31 +22,29 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "MONOGRAPH_ITEMS", schema = DB_SCHEMA)
|
@Table(name = "MONOGRAPH_ITEMS", schema = DB_SCHEMA)
|
||||||
public class MonographItem extends AbstractPublicationWithPublisherItem<Monograph> {
|
public class MonographItem
|
||||||
|
extends AbstractPublicationWithPublisherItem<Monograph> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "PUBLICATION_ID")
|
@JoinColumn(name = "MONOGRAPH_ID")
|
||||||
private Monograph publication;
|
private Monograph monograph;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Monograph getPublication() {
|
public Monograph getPublication() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
return monograph;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setPublication(final Monograph publication) {
|
protected void setPublication(final Monograph monograph) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
this.monograph = monograph;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = super.hashCode();
|
int hash = super.hashCode();
|
||||||
hash = 29 * hash + Objects.hashCode(publication);
|
hash = 29 * hash + Objects.hashCode(monograph);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,21 +66,19 @@ public class MonographItem extends AbstractPublicationWithPublisherItem<Monograp
|
||||||
if (!other.canEqual(this)) {
|
if (!other.canEqual(this)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return Objects.equals(publication, other.getPublication());
|
return Objects.equals(monograph, other.getPublication());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEqual(Object obj) {
|
public boolean canEqual(Object obj) {
|
||||||
return obj instanceof MonographItem;
|
return obj instanceof MonographItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
return super.toString(String.format(", publication = %s%s",
|
return super.toString(String.format(", publication = %s%s",
|
||||||
Objects.toString(publication),
|
Objects.toString(monograph),
|
||||||
data));
|
data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
*/
|
*/
|
||||||
package org.scientificcms.publications.contenttypes;
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
import org.scientificcms.publications.PublicationWithPublisher;
|
import org.scientificcms.publications.Proceedings;
|
||||||
import org.scientificcms.publications.assets.ProceedingsAsset;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -23,73 +22,64 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROCEEDINGS_ITEMS", schema = DB_SCHEMA)
|
@Table(name = "PROCEEDINGS_ITEMS", schema = DB_SCHEMA)
|
||||||
public class ProceedingsItem extends AbstractPublicationWithPublisherItem<PublicationWithPublisher>{
|
public class ProceedingsItem
|
||||||
|
extends AbstractPublicationWithPublisherItem<Proceedings> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "PROCEEDINGS_ID")
|
||||||
|
private Proceedings article;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PublicationWithPublisher getPublication() {
|
public Proceedings getPublication() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
return article;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setPublication(PublicationWithPublisher publication) {
|
protected void setPublication(final Proceedings article) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
this.article = article;
|
||||||
}
|
}
|
||||||
// extends Publication {
|
|
||||||
|
|
||||||
// private static final long serialVersionUID = 1L;
|
@Override
|
||||||
//
|
public int hashCode() {
|
||||||
// @OneToOne
|
int hash = super.hashCode();
|
||||||
// @JoinColumn(name = "DATA_ID")
|
hash = 67 * hash + Objects.hashCode(article);
|
||||||
// private ProceedingsAsset publicationData;
|
return hash;
|
||||||
//
|
}
|
||||||
// public ProceedingsAsset getPublicationData() {
|
|
||||||
// return publicationData;
|
@Override
|
||||||
// }
|
public boolean equals(final Object obj) {
|
||||||
//
|
if (this == obj) {
|
||||||
// protected void setPublicationData(final ProceedingsAsset publicationData) {
|
return true;
|
||||||
// this.publicationData = publicationData;
|
}
|
||||||
// }
|
if (obj == null) {
|
||||||
//
|
return false;
|
||||||
// @Override
|
}
|
||||||
// public int hashCode() {
|
if (!super.equals(obj)) {
|
||||||
// int hash = super.hashCode();
|
return false;
|
||||||
// hash = 43 * hash + Objects.hashCode(publicationData);
|
}
|
||||||
// return hash;
|
if (!(obj instanceof ProceedingsItem)) {
|
||||||
// }
|
return false;
|
||||||
//
|
}
|
||||||
// @Override
|
final ProceedingsItem other
|
||||||
// public boolean equals(final Object obj) {
|
= (ProceedingsItem) obj;
|
||||||
// if (this == obj) {
|
if (!other.canEqual(this)) {
|
||||||
// return true;
|
return false;
|
||||||
// }
|
}
|
||||||
// if (obj == null) {
|
return Objects.equals(this.article, other.getPublication());
|
||||||
// return false;
|
}
|
||||||
// }
|
|
||||||
// if (!super.equals(obj)) {
|
@Override
|
||||||
// return false;
|
public boolean canEqual(final Object obj) {
|
||||||
// }
|
return obj instanceof ProceedingsItem;
|
||||||
// if (!(obj instanceof ProceedingsItem)) {
|
}
|
||||||
// return false;
|
|
||||||
// }
|
@Override
|
||||||
// final ProceedingsItem other = (ProceedingsItem) obj;
|
public String toString(final String data) {
|
||||||
// if (!other.canEqual(this)) {
|
return super.toString(String.format(", proceedings = %s%s",
|
||||||
// return false;
|
Objects.toString(article),
|
||||||
// }
|
data));
|
||||||
// return Objects.equals(publicationData, other.getPublicationData());
|
}
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public boolean canEqual(final Object obj) {
|
|
||||||
//
|
|
||||||
// return obj instanceof ProceedingsItem;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public String toString(final String data) {
|
|
||||||
//
|
|
||||||
// return super.toString(String.format("data = %s%s",
|
|
||||||
// Objects.toString(publicationData),
|
|
||||||
// data));
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.Talk;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "TALK_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class TalkItem
|
||||||
|
extends AbstractPublicationItem<Talk> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "TALK_ID")
|
||||||
|
private Talk talk;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Talk getPublication() {
|
||||||
|
return talk;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final Talk talk) {
|
||||||
|
this.talk = talk;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(talk);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof TalkItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final TalkItem other
|
||||||
|
= (TalkItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.talk, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof TalkItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", talk = %s%s",
|
||||||
|
Objects.toString(talk),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.scientificcms.publications.contenttypes;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.scientificcms.publications.Expertise;
|
||||||
|
import org.scientificcms.publications.WorkingPaper;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "WORKING_PAPER_ITEMS", schema = DB_SCHEMA)
|
||||||
|
@Audited
|
||||||
|
public class WorkingPaperItem
|
||||||
|
extends AbstractPublicationItem<WorkingPaper> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "EXPERTISE_ID")
|
||||||
|
private WorkingPaper workingPaper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WorkingPaper getPublication() {
|
||||||
|
return workingPaper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPublication(final WorkingPaper workingPaper) {
|
||||||
|
this.workingPaper = workingPaper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 67 * hash + Objects.hashCode(workingPaper);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof WorkingPaperItem)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final WorkingPaperItem other
|
||||||
|
= (WorkingPaperItem) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(this.workingPaper, other.getPublication());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof WorkingPaperItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", workingPaper = %s%s",
|
||||||
|
Objects.toString(workingPaper),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue