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

com.denimgroup.threadfix.data.entities.ScanFileName Maven / Gradle / Ivy

package com.denimgroup.threadfix.data.entities;

import com.denimgroup.threadfix.views.AllViews;
import com.fasterxml.jackson.annotation.JsonView;

import javax.persistence.*;

/**
 * Created by jcatron on 2/11/17.
 */
@Entity
@Table(name="ScanFileName")
public class ScanFileName extends AuditableEntity {

    private Scan scan;
    private String originalFileName;
    private String savedFileName;

    private ChannelType channelType;

    public ScanFileName() {}

    public ScanFileName(Scan scan, String originalFileName, String savedFileName) {
        this.scan = scan;
        this.originalFileName = originalFileName;
        this.savedFileName = savedFileName;
    }

    public ScanFileName(String originalFileName, String savedFileName) {
        this(null, originalFileName, savedFileName);
    }

    @ManyToOne
    @JoinColumn(name = "scanId", foreignKey = @ForeignKey(name="FKcal9hkwicubahvcr1571krmm1"))
    public Scan getScan() {
        return scan;
    }

    public void setScan(Scan scan) {
        this.scan = scan;
    }

    @Column(length = 256)
    @JsonView({AllViews.FormInfo.class, AllViews.TableRow.class, AllViews.RestViewScanStatistic.class})
    public String getOriginalFileName() {
        return originalFileName;
    }

    public void setOriginalFileName(String originalFileName) {
        this.originalFileName = originalFileName;
    }

    @Column(length = 2048)
    @JsonView({AllViews.FormInfo.class, AllViews.TableRow.class, AllViews.RestViewScanStatistic.class})
    public String getSavedFileName() {
        return savedFileName;
    }

    public void setSavedFileName(String savedFileName) {
        this.savedFileName = savedFileName;
    }

    @ManyToOne
    @JoinColumn(name = "channelTypeId", foreignKey = @ForeignKey(name="FK541458fcef65spdcr76m5legf"))
    public ChannelType getChannelType() {
        return channelType;
    }

    public void setChannelType(ChannelType channelType) {
        this.channelType = channelType;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy