<commit_before>package org.project.openbaton.catalogue.mano.common;

/**
 * Created by lto on 05/02/15.
 *
 * Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12)
 */

import org.project.openbaton.catalogue.mano.descriptor.VirtualNetworkFunctionDescriptor;
import org.project.openbaton.catalogue.util.IdGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Set;

/**
 * Describe dependencies between VNF. Defined in terms of
 * source and target VNF i.e. target VNF "depends on" source
 * VNF. In other words a source VNF shall exist and connect to
 * the service before target VNF can be initiated/deployed and
 * connected. This element would be used, for example, to define
 * the sequence in which various numbered network nodes and
 * links within a VNF FG should be instantiated by the NFV
 * Orchestrator.*/
@Entity
public class VNFDependency implements Serializable {

	@Id
	private String id = IdGenerator.createUUID();
	@Version
	private int version = 0;
	
	@OneToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, fetch = FetchType.EAGER)
    private VirtualNetworkFunctionDescriptor source;

	@OneToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, fetch = FetchType.EAGER)
    private VirtualNetworkFunctionDescriptor target;

	@ElementCollection(fetch = FetchType.EAGER)
	private Set<String> parameters;

    public VNFDependency() {
    }

    public VirtualNetworkFunctionDescriptor getSource() {
        return source;
    }

    public void setSource(VirtualNetworkFunctionDescriptor source) {
        this.source = source;
    }

	public Set<String> getParameters() {
		return parameters;
	}

	public void setParameters(Set<String> parameters) {
		this.parameters = parameters;
	}

    public VirtualNetworkFunctionDescriptor getTarget() {
        return target;
    }

    public void setTarget(VirtualNetworkFunctionDescriptor target) {<commit_msg>Fixed small bugs<commit_after>package org.project.openbaton.catalogue.mano.common;

/**
 * Created by lto on 05/02/15.
 *
 * Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12)
 */

import org.project.openbaton.catalogue.mano.descriptor.VirtualNetworkFunctionDescriptor;
import org.project.openbaton.catalogue.util.IdGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Set;

/**
 * Describe dependencies between VNF. Defined in terms of
 * source and target VNF i.e. target VNF "depends on" source
 * VNF. In other words a source VNF shall exist and connect to
 * the service before target VNF can be initiated/deployed and
 * connected. This element would be used, for example, to define
 * the sequence in which various numbered network nodes and
 * links within a VNF FG should be instantiated by the NFV
 * Orchestrator.*/
@Entity
public class VNFDependency implements Serializable {

	@Id
	private String id = IdGenerator.createUUID();
	@Version
	private int version = 0;
	
	@ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
	@JoinColumn(nullable = false)
    private VirtualNetworkFunctionDescriptor source;

	@ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
	@JoinColumn(nullable = false)
	private VirtualNetworkFunctionDescriptor target;

	@ElementCollection(fetch = FetchType.EAGER)
	private Set<String> parameters;

    public VNFDependency() {
    }

    public VirtualNetworkFunctionDescriptor getSource() {
        return source;
    }

    public void setSource(VirtualNetworkFunctionDescriptor source) {
        this.source = source;
    }

	public Set<String> getParameters() {
		return parameters;
	}

	public void setParameters(Set<String> parameters) {
		this.parameters = parameters;
	}

    public VirtualNetworkFunctionDescriptor getTarget() {
        return target;
    }

    public void setTarget(VirtualNetworkFunctionDescriptor target) {
{'fraction_non_alphanumeric': 0.08342022940563086, 'fraction_numerical': 0.009906152241918665, 'mean_word_length': 4.256164383561644, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2657917', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1098, 'n_words': 334}