Advertisement
IronJoo

Untitled

Feb 14th, 2025 (edited)
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.65 KB | None | 0 0
  1. @Entity
  2. @Table(name = "core_project_project_call_submission")
  3. public class ProjectCallSubmission extends Model {
  4.  
  5.     private static final Finder<Long, ProjectCallSubmission> finder = new Finder<>(ProjectCallSubmission.class);
  6.  
  7.     public static final int MAX_SIZE_SHORT = 255;
  8.     public static final int MAX_SIZE_MEDIUM = 500;
  9.  
  10.     @Id
  11.     @GeneratedValue(strategy = GenerationType.SEQUENCE)
  12.     @Column(name = "id", nullable = false)
  13.     private Long id;
  14.  
  15.     // The project call this submission applies to
  16.     @ManyToOne
  17.     private ProjectCall projectCall;
  18.  
  19.     // The scientific areas covered by the project call
  20.     @ManyToMany
  21.     @JoinTable(
  22.             name = "core_project_project_call_submission_scientific_area", // Name of the join table
  23.             joinColumns = @JoinColumn(name = "project_call_submission_id"), // Foreign key to the current entity
  24.             inverseJoinColumns = @JoinColumn(name = "scientific_area_id") // Foreign key to the other entity
  25.     )
  26.     private List<CustomListElement> scientificAreas;
  27.  
  28.     // The acronym of the project call submission (in Portuguese)
  29.     @Column(name = "acronym_pt", length = MAX_SIZE_SHORT)
  30.     private String acronymPt;
  31.  
  32.     // The acronym of the project call submission (in English)
  33.     @Column(name = "acronym_en", length = MAX_SIZE_SHORT)
  34.     private String acronymEn;
  35.  
  36.     // The title of the project call submission (in Portuguese)
  37.     @Column(name = "title_pt", length = MAX_SIZE_MEDIUM)
  38.     private String titlePt;
  39.  
  40.     // The title of the project call submission (in English)
  41.     @Column(name = "title_en", length = MAX_SIZE_MEDIUM)
  42.     private String titleEn;
  43.  
  44.     // TODO: Lembrete: Coordenador, co-coordenador, coordenador local, equipa local, consultores locais
  45.     // The list of internal users that participate in the project call submission
  46.     @OneToMany(cascade = CascadeType.ALL, mappedBy = "projectCallSubmission")
  47.     private List<ProjectCallSubmissionInternalUserParticipation> internalUsersParticipations;
  48.  
  49.     // TODO: Lembrete: Coordenador, co-coordenador, coordenador local, equipa local, consultores locais
  50.     // The list of external users that participate in the project call submission
  51.     @OneToMany(cascade = CascadeType.ALL, mappedBy = "projectCallSubmission")
  52.     private List<ProjectCallSubmissionExternalUserParticipation> externalUsersParticipations;
  53.  
  54.     // The list of external institutions that participate in the project call submission
  55.     @OneToMany(cascade = CascadeType.ALL, mappedBy = "projectCallSubmission")
  56.     private List<ProjectCallSubmissionExternalInstitutionParticipation> externalInstitutionParticipation;
  57.  
  58.     // The date when the application was submitted
  59.     @Column(name = "submission_date")
  60.     private Date submissionDate;
  61.  
  62.     // The duration of the project (in months)
  63.     @Column(name = "duration")
  64.     private Integer durationInMonths;
  65.  
  66.     // The total budget requested for the project
  67.     @DbJsonB
  68.     @JsonProperty(value = "solicited_global_budget")
  69.     private CurrencyAmount solicitedGlobalBudget;
  70.  
  71.     // The budget requested for the local partner
  72.     @DbJsonB
  73.     @JsonProperty(value = "solicited_local_budget")
  74.     private CurrencyAmount solicitedLocalBudget;
  75.  
  76.     // Whether the local budget has been validated by the Project Management / Research & Development team
  77.     @Column(name = "is_budget_validated")
  78.     private Boolean isBudgetValidated;
  79.  
  80.     // Whether the project call submission is currently public in the system
  81.     @Column(name = "privacy_level")
  82.     private PrivacyLevelEnum privacyLevel;
  83.  
  84.     @DbJsonB
  85.     @Column(name = "extra_data")
  86.     private ProjectCallSubmissionExtraData extraData;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement