ContentItems for publications
parent
2e613688d8
commit
a16579771c
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
import org.scientificcms.publications.Publication;
|
||||
|
||||
|
|
@ -20,76 +21,20 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
|||
*/
|
||||
@Entity
|
||||
@Table(name = "PUBLICATION_ITEMS", schema = DB_SCHEMA)
|
||||
@Audited
|
||||
public abstract class AbstractPublicationItem<T extends Publication>
|
||||
extends ContentItem {
|
||||
//extends Publication {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public abstract T getPublication();
|
||||
|
||||
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
|
||||
public boolean canEqual(final Object obj) {
|
||||
|
||||
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;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
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>
|
||||
* @param <T>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PUBLICATION_WITH_PUBLISHER_ITEMS", schema = DB_SCHEMA)
|
||||
@Audited
|
||||
public abstract class AbstractPublicationWithPublisherItem<T extends PublicationWithPublisher>
|
||||
extends AbstractPublicationItem<T> {
|
||||
//extends PublicationItem {
|
||||
|
||||
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
|
||||
public boolean canEqual(final Object obj) {
|
||||
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;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
import org.scientificcms.publications.CollectedVolume;
|
||||
import org.scientificcms.publications.PublicationWithPublisher;
|
||||
import org.scientificcms.publications.assets.CollectedVolumeAsset;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -23,73 +24,64 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
|||
*/
|
||||
@Entity
|
||||
@Table(name = "COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
|
||||
public class CollectedVolumeItem extends AbstractPublicationWithPublisherItem<PublicationWithPublisher>{
|
||||
// extends Publication {
|
||||
@Audited
|
||||
public class CollectedVolumeItem
|
||||
extends AbstractPublicationWithPublisherItem<CollectedVolume> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// @OneToOne
|
||||
// @JoinColumn(name = "DATA_ID")
|
||||
// private CollectedVolumeAsset publicationData;
|
||||
//
|
||||
// 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));
|
||||
// }
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "COLLECTED_VOLUME_ID")
|
||||
private CollectedVolume collectedVolume;
|
||||
|
||||
@Override
|
||||
public PublicationWithPublisher getPublication() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
public CollectedVolume getPublication() {
|
||||
return collectedVolume;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setPublication(PublicationWithPublisher publication) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
protected void setPublication(final CollectedVolume collectedVolume) {
|
||||
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
|
||||
@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;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "PUBLICATION_ID")
|
||||
private Monograph publication;
|
||||
@JoinColumn(name = "MONOGRAPH_ID")
|
||||
private Monograph monograph;
|
||||
|
||||
@Override
|
||||
public Monograph getPublication() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
return monograph;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void setPublication(final Monograph publication) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
protected void setPublication(final Monograph monograph) {
|
||||
this.monograph = monograph;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 29 * hash + Objects.hashCode(publication);
|
||||
hash = 29 * hash + Objects.hashCode(monograph);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
|
@ -68,21 +66,19 @@ public class MonographItem extends AbstractPublicationWithPublisherItem<Monograp
|
|||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(publication, other.getPublication());
|
||||
return Objects.equals(monograph, other.getPublication());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean canEqual(Object obj) {
|
||||
return obj instanceof MonographItem;
|
||||
return obj instanceof MonographItem;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
return super.toString(String.format(", publication = %s%s",
|
||||
Objects.toString(publication),
|
||||
Objects.toString(monograph),
|
||||
data));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
import org.scientificcms.publications.PublicationWithPublisher;
|
||||
import org.scientificcms.publications.assets.ProceedingsAsset;
|
||||
import org.scientificcms.publications.Proceedings;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -23,73 +22,64 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
|||
*/
|
||||
@Entity
|
||||
@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
|
||||
public PublicationWithPublisher getPublication() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
public Proceedings getPublication() {
|
||||
return article;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setPublication(PublicationWithPublisher publication) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
protected void setPublication(final Proceedings article) {
|
||||
this.article = article;
|
||||
}
|
||||
// extends Publication {
|
||||
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// @OneToOne
|
||||
// @JoinColumn(name = "DATA_ID")
|
||||
// private ProceedingsAsset publicationData;
|
||||
//
|
||||
// public ProceedingsAsset getPublicationData() {
|
||||
// return publicationData;
|
||||
// }
|
||||
//
|
||||
// protected void setPublicationData(final ProceedingsAsset 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 ProceedingsItem)) {
|
||||
// return false;
|
||||
// }
|
||||
// final ProceedingsItem other = (ProceedingsItem) obj;
|
||||
// if (!other.canEqual(this)) {
|
||||
// return false;
|
||||
// }
|
||||
// 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));
|
||||
// }
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 67 * hash + Objects.hashCode(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 ProceedingsItem)) {
|
||||
return false;
|
||||
}
|
||||
final ProceedingsItem other
|
||||
= (ProceedingsItem) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(this.article, other.getPublication());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
return obj instanceof ProceedingsItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
return super.toString(String.format(", proceedings = %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.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