All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openprovenance.prov.sql.NamedDocument Maven / Gradle / Ivy

Go to download

Java Objects representing the PROV model, XML serialiser/deserialiser for them, and ORM mapping generated by HyperJaxb.

The newest version!
package org.openprovenance.prov.sql;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAttribute;


/**
 * Data structure containing associations between names and documents. 
 * Works in conjunction with PutableDocument, allowing the history of previous associations to be maintained.
 * 
 */
@Entity(name = "NamedDocument")
@NamedQuery(name="NamedDocument.Find", query="SELECT e FROM NamedDocument e WHERE e.name LIKE :name")


@javax.persistence.Cacheable 
@Table(name = "NAMEDDOCUMENT", [email protected](columnNames={"NAME"}))
@Inheritance(strategy = InheritanceType.JOINED)
public class NamedDocument    
{

    public NamedDocument() {} 

    @XmlAttribute(name = "pk")
    protected Long pk;

   
    /**
     * Gets the value of the pk property.
     * 
     * @return
     *     possible object is
     *     {@link Long }
     *     
     */
    @Id
    @Column(name = "PK")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getPk() {
        return pk;
    }

    /**
     * Sets the value of the pk property.
     * 
     * @param value
     *     allowed object is
     *     {@link Long }
     *     
     */
    public void setPk(Long value) {
        this.pk = value;
    }

    protected String name;
 
    @Basic
    @Column(name = "NAME")
    public String getName() {
	return name;
    } 
    
    
    public void setName(String name) {
        this.name=name;
    } 
    
    protected PutableDocument document;
    
    @ManyToOne(targetEntity = org.openprovenance.prov.sql.PutableDocument.class, 
            cascade = {
                       CascadeType.ALL
    })
    @JoinColumn(name = "VALUE")
    public PutableDocument getDocument() {
        return document;
    }
    public void setDocument(PutableDocument document) {
        this.document=document;
    }
   
    public String toString() {
	return "";
    }

    	     
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy