001/* 002 * Copyright 2022 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.forms.data; 017 018import java.sql.Timestamp; 019 020/** 021 * Object representing an answer with common attribute for each forms 022 */ 023public class Answer 024{ 025 private String _id; 026 private String _formId; 027 private String _formLabel; 028 private String _workflowName; 029 private Timestamp _creationDate; 030 private Integer _workflowId; 031 032 /** 033 * The constructor 034 * @param id the id of the answer in SQL 035 * @param formId the form id 036 * @param formLabel the form label 037 * @param creationDate the creation date 038 * @param workflowName the workflow name 039 * @param workflowId the workflow id 040 */ 041 public Answer(String id, String formId, String formLabel, Timestamp creationDate, String workflowName, Integer workflowId) 042 { 043 this._id = id; 044 this._formId = formId; 045 this._formLabel = formLabel; 046 this._creationDate = creationDate; 047 this._workflowName = workflowName; 048 this._workflowId = workflowId; 049 } 050 051 /** 052 * Get the id in the table SQL 053 * @return the id in the table SQL 054 */ 055 public String getId() 056 { 057 return this._id; 058 } 059 060 /** 061 * Get the form id 062 * @return the form id 063 */ 064 public String getFormId() 065 { 066 return this._formId; 067 } 068 069 /** 070 * Get the form label 071 * @return the form label 072 */ 073 public String getFormLabel() 074 { 075 return this._formLabel; 076 } 077 078 /** 079 * Get the creation date 080 * @return the creation date 081 */ 082 public Timestamp getCreationDate() 083 { 084 return this._creationDate; 085 } 086 087 /** 088 * Get the workflow name 089 * @return the workflow workflow 090 */ 091 public String getWorkflowName() 092 { 093 return this._workflowName; 094 } 095 096 /** 097 * Get the workflow id. Can be null. 098 * @return the workflow id. Can be null. 099 */ 100 public Integer getWorkflowId() 101 { 102 return this._workflowId; 103 } 104}