Commit a2678d6d by nilu

S43010494 # Matchd / Talentology - No Plan [Enhancement] #Hiring Team Changes to…

S43010494 # Matchd / Talentology - No Plan [Enhancement] #Hiring Team Changes to include diversity questions
parent bed8c30c
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_candidate_diversity_answer</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="answer_id" type="Long" length="11" nullable="false"/>
<column name="question_id" type="Long" length="11" nullable="false"/>
<column name="candidate_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_candidate_diversity_answer" indexName="idx_tl_candidate_diversity_answer_candidate_id" isUnique="false"><column name="candidate_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_diversity_answer</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="answer" type="CLOB" nullable="false"/>
<column name="question_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_diversity_answer" indexName="idx_tl_diversity_answer_question_id" isUnique="false"><column name="question_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_diversity_question</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="question_text" type="CLOB" nullable="false"/>
<column name="australia_only" type="Boolean" nullable="true"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_ht_diversity_question</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="question_text" type="CLOB" nullable="false"/>
<column name="is_applicable" type="Boolean" nullable="true"/>
<column name="question_id" type="Long" length="11" nullable="false"/>
<column name="hiring_team_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_ht_diversity_question" indexName="idx_tl_ht_diversity_question_hiring_team_id" isUnique="false"><column name="hiring_team_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<column name="post_code" type="String" nullable="true" length="10"/> <column name="post_code" type="String" nullable="true" length="10"/>
<column name="city" type="String" nullable="true" length="100"/> <column name="city" type="String" nullable="true" length="100"/>
<column name="has_client_support" type="Boolean" nullable="true"/> <column name="has_client_support" type="Boolean" nullable="true"/>
<column name="has_diversity" type="Boolean" nullable="true"/>
<column name="manage_own_billing" type="Boolean" nullable="true"/> <column name="manage_own_billing" type="Boolean" nullable="true"/>
<column name="stripe_reference" type="String" nullable="true" length="100"/> <column name="stripe_reference" type="String" nullable="true" length="100"/>
<column name="stripe_subscription" type="String" nullable="true" length="100"/> <column name="stripe_subscription" type="String" nullable="true" length="100"/>
......
-- DROP TABLE tl_candidate_diversity_answer;
CREATE TABLE tl_candidate_diversity_answer (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
answer_id numeric(12) NOT NULL,
question_id numeric(12) NOT NULL,
candidate_id numeric(12) NOT NULL
);
ALTER TABLE tl_candidate_diversity_answer ADD
CONSTRAINT PK_tl_candidate_diversity_answer PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_candidate_diversity_answer_candidate_id
ON tl_candidate_diversity_answer (candidate_id);
-- DROP TABLE tl_diversity_answer;
CREATE TABLE tl_diversity_answer (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
answer text NOT NULL,
question_id numeric(12) NOT NULL
);
ALTER TABLE tl_diversity_answer ADD
CONSTRAINT PK_tl_diversity_answer PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_diversity_answer_question_id
ON tl_diversity_answer (question_id);
-- DROP TABLE tl_diversity_question;
CREATE TABLE tl_diversity_question (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
question_text text NOT NULL,
australia_only char(1) NULL
);
ALTER TABLE tl_diversity_question ADD
CONSTRAINT PK_tl_diversity_question PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
-- DROP TABLE tl_ht_diversity_question;
CREATE TABLE tl_ht_diversity_question (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
question_text text NOT NULL,
is_applicable char(1) NULL,
question_id numeric(12) NOT NULL,
hiring_team_id numeric(12) NOT NULL
);
ALTER TABLE tl_ht_diversity_question ADD
CONSTRAINT PK_tl_ht_diversity_question PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_ht_diversity_question_hiring_team_id
ON tl_ht_diversity_question (hiring_team_id);
...@@ -18,6 +18,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -18,6 +18,7 @@ CREATE TABLE tl_hiring_team (
post_code varchar(10) NULL, post_code varchar(10) NULL,
city varchar(100) NULL, city varchar(100) NULL,
has_client_support char(1) NULL, has_client_support char(1) NULL,
has_diversity char(1) NULL,
manage_own_billing char(1) NULL, manage_own_billing char(1) NULL,
stripe_reference varchar(100) NULL, stripe_reference varchar(100) NULL,
stripe_subscription varchar(100) NULL, stripe_subscription varchar(100) NULL,
......
-- DROP TABLE tl_candidate_diversity_answer;
CREATE TABLE tl_candidate_diversity_answer (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
answer_id number(12) NOT NULL,
question_id number(12) NOT NULL,
candidate_id number(12) NOT NULL
);
ALTER TABLE tl_candidate_diversity_answer ADD
CONSTRAINT PK_tl_candidate_diversity_answer PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_candidate_diversity_answer_candidate_id
ON tl_candidate_diversity_answer (candidate_id);
-- DROP TABLE tl_diversity_answer;
CREATE TABLE tl_diversity_answer (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
answer clob NOT NULL,
question_id number(12) NOT NULL
);
ALTER TABLE tl_diversity_answer ADD
CONSTRAINT PK_tl_diversity_answer PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_diversity_answer_question_id
ON tl_diversity_answer (question_id);
-- DROP TABLE tl_diversity_question;
CREATE TABLE tl_diversity_question (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
question_text clob NOT NULL,
australia_only char(1) NULL
);
ALTER TABLE tl_diversity_question ADD
CONSTRAINT PK_tl_diversity_question PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
-- DROP TABLE tl_ht_diversity_question;
CREATE TABLE tl_ht_diversity_question (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
question_text clob NOT NULL,
is_applicable char(1) NULL,
question_id number(12) NOT NULL,
hiring_team_id number(12) NOT NULL
);
ALTER TABLE tl_ht_diversity_question ADD
CONSTRAINT PK_tl_ht_diversity_question PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_ht_diversity_question_hiring_team_id
ON tl_ht_diversity_question (hiring_team_id);
...@@ -19,6 +19,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -19,6 +19,7 @@ CREATE TABLE tl_hiring_team (
post_code varchar2(10) NULL, post_code varchar2(10) NULL,
city varchar2(100) NULL, city varchar2(100) NULL,
has_client_support char(1) NULL, has_client_support char(1) NULL,
has_diversity char(1) NULL,
manage_own_billing char(1) NULL, manage_own_billing char(1) NULL,
stripe_reference varchar2(100) NULL, stripe_reference varchar2(100) NULL,
stripe_subscription varchar2(100) NULL, stripe_subscription varchar2(100) NULL,
......
-- @AutoRun
-- drop table tl_candidate_diversity_answer;
CREATE TABLE tl_candidate_diversity_answer (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
answer_id numeric(12) NOT NULL,
question_id numeric(12) NOT NULL,
candidate_id numeric(12) NOT NULL
);
ALTER TABLE tl_candidate_diversity_answer ADD
CONSTRAINT pk_tl_candidate_diversity_answer PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_candidate_diversity_answer_candidate_id
ON tl_candidate_diversity_answer (candidate_id);
-- @AutoRun
-- drop table tl_diversity_answer;
CREATE TABLE tl_diversity_answer (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
answer text NOT NULL,
question_id numeric(12) NOT NULL
);
ALTER TABLE tl_diversity_answer ADD
CONSTRAINT pk_tl_diversity_answer PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_diversity_answer_question_id
ON tl_diversity_answer (question_id);
-- @AutoRun
-- drop table tl_diversity_question;
CREATE TABLE tl_diversity_question (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
question_text text NOT NULL,
australia_only char(1) NULL
);
ALTER TABLE tl_diversity_question ADD
CONSTRAINT pk_tl_diversity_question PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
-- @AutoRun
-- drop table tl_ht_diversity_question;
CREATE TABLE tl_ht_diversity_question (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
question_text text NOT NULL,
is_applicable char(1) NULL,
question_id numeric(12) NOT NULL,
hiring_team_id numeric(12) NOT NULL
);
ALTER TABLE tl_ht_diversity_question ADD
CONSTRAINT pk_tl_ht_diversity_question PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_ht_diversity_question_hiring_team_id
ON tl_ht_diversity_question (hiring_team_id);
...@@ -19,6 +19,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -19,6 +19,7 @@ CREATE TABLE tl_hiring_team (
post_code varchar(10) NULL, post_code varchar(10) NULL,
city varchar(100) NULL, city varchar(100) NULL,
has_client_support char(1) NULL, has_client_support char(1) NULL,
has_diversity char(1) NULL,
manage_own_billing char(1) NULL, manage_own_billing char(1) NULL,
stripe_reference varchar(100) NULL, stripe_reference varchar(100) NULL,
stripe_subscription varchar(100) NULL, stripe_subscription varchar(100) NULL,
......
package performa.form;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException;
import oneit.servlets.forms.RedisplayResult;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessFormProcessor;
import oneit.servlets.process.ORMProcessState;
import oneit.utils.BusinessException;
import performa.orm.DiversityQuestion;
import performa.orm.HTDiversityQuestion;
import performa.orm.HiringTeam;
import performa.orm.types.Countries;
public class ChangeDiversityFP extends ORMProcessFormProcessor
{
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
ObjectTransaction objTran = process.getTransaction();
HiringTeam hiringTeam = (HiringTeam) request.getAttribute("HiringTeam");
LogMgr.log(HiringTeam.LOG, LogLevel.PROCESSING1, "Inside ChangeDiversityFP for ", hiringTeam , " Has Diversity:", hiringTeam.getHasDiversity());
if(hiringTeam.showHasDiversity())
{
if(hiringTeam.getDiversityQuestionsCount() == 0)
{
for(DiversityQuestion question : DiversityQuestion.searchAll(objTran))
{
if(hiringTeam.getCountry() != Countries.AU && question.getAustraliaOnly())
{
continue;
}
HTDiversityQuestion htDiversityQuestion = HTDiversityQuestion.createHTDiversityQuestion(objTran);
htDiversityQuestion.setQuestion(question);
htDiversityQuestion.setQuestionText(question.getQuestionText());
htDiversityQuestion.setHiringTeam(hiringTeam);
LogMgr.log(HiringTeam.LOG, LogLevel.PROCESSING1, "ChangeDiversityFP created diversity question : ", htDiversityQuestion);
}
}
}
LogMgr.log(HiringTeam.LOG, LogLevel.PROCESSING1, "ChangeDiversityFP completed for ", hiringTeam);
return RedisplayResult.getInstance();
}
}
...@@ -72,6 +72,14 @@ public class SaveCompanyFP extends SaveFP ...@@ -72,6 +72,14 @@ public class SaveCompanyFP extends SaveFP
} }
} }
if(!hiringTeam.showHasDiversity())
{
hiringTeam.getDiversityQuestionsSet().forEach((question) -> {
LogMgr.log(HiringTeam.LOG, LogLevel.PROCESSING1,"In SaveCompanyFP deleting diversity question : ", question );
question.delete();
});
}
//Set attribute IsHTLogoPresent false when HT logo is not uploaded or deleted //Set attribute IsHTLogoPresent false when HT logo is not uploaded or deleted
if(hiringTeam.getHiringTeamLogo() == null && !isHTLogoPresent) if(hiringTeam.getHiringTeamLogo() == null && !isHTLogoPresent)
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
<MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Candidate" /> <MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Candidate" />
<MULTIPLEREFERENCE name="JobApplications" type="JobApplication" backreferenceName="Candidate" /> <MULTIPLEREFERENCE name="JobApplications" type="JobApplication" backreferenceName="Candidate" />
<MULTIPLEREFERENCE name="CultureCriteriaAnswers" type="CultureCriteriaAnswer" backreferenceName="Candidate" /> <MULTIPLEREFERENCE name="CultureCriteriaAnswers" type="CultureCriteriaAnswer" backreferenceName="Candidate" />
<MULTIPLEREFERENCE name="ProfileAssessmentAnswers" type="Answer" backreferenceName="Candidate" /> <MULTIPLEREFERENCE name="ProfileAssessmentAnswers" type="Answer" backreferenceName="Candidate" />
<MULTIPLEREFERENCE name="DiversityAnswers" type="CandidateDiversityAnswer" backreferenceName="Candidate" />
<TRANSIENT name="PrivacyPolicyAgreed" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="PrivacyPolicyAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="ConditionsAgreed" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="ConditionsAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
......
package performa.orm;
public class CandidateDiversityAnswer extends BaseCandidateDiversityAnswer
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public CandidateDiversityAnswer ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="CandidateDiversityAnswer" package="performa.orm">
<TABLE name="tl_candidate_diversity_answer" tablePrefix="object" polymorphic="FALSE">
<SINGLEREFERENCE name="Answer" type="DiversityAnswer" dbcol="answer_id" mandatory="true" />
<SINGLEREFERENCE name="Question" type="DiversityQuestion" dbcol="question_id" mandatory="true" />
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id" mandatory="true" backreferenceName="DiversityAnswers" />
</TABLE>
<SEARCH type="All" paramFilter="tl_candidate_diversity_answer.object_id is not null" orderBy="tl_candidate_diversity_answer.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
public class DiversityAnswer extends BaseDiversityAnswer
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public DiversityAnswer ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="DiversityAnswer" package="performa.orm">
<TABLE name="tl_diversity_answer" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Answer" type="String" dbcol="answer" mandatory="true"/>
<SINGLEREFERENCE name="Question" type="DiversityQuestion" dbcol="question_id" backreferenceName="Answers" mandatory="true"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_diversity_answer.object_id is not null" orderBy="tl_diversity_answer.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
public class DiversityQuestion extends BaseDiversityQuestion
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public DiversityQuestion ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="DiversityQuestion" package="performa.orm">
<MULTIPLEREFERENCE name="Answers" type="DiversityAnswer" backreferenceName="Question" />
<TABLE name="tl_diversity_question" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="QuestionText" type="String" dbcol="question_text" mandatory="true"/>
<ATTRIB name="AustraliaOnly" type="Boolean" dbcol="australia_only" defaultValue="Boolean.FALSE" />
</TABLE>
<SEARCH type="All" paramFilter="tl_diversity_question.object_id is not null" orderBy="tl_diversity_question.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
public class HTDiversityQuestion extends BaseHTDiversityQuestion
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public HTDiversityQuestion ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="HTDiversityQuestion" package="performa.orm">
<TABLE name="tl_ht_diversity_question" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="QuestionText" type="String" dbcol="question_text" mandatory="true"/>
<ATTRIB name="IsApplicable" type="Boolean" dbcol="is_applicable" defaultValue="Boolean.TRUE" />
<SINGLEREFERENCE name="Question" type="DiversityQuestion" dbcol="question_id" mandatory="true"/>
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" backreferenceName="DiversityQuestions" mandatory="true"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_ht_diversity_question.object_id is not null" orderBy="tl_ht_diversity_question.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
...@@ -6,6 +6,7 @@ import java.util.Date; ...@@ -6,6 +6,7 @@ import java.util.Date;
import java.util.Set; import java.util.Set;
import oneit.logging.LoggingArea; import oneit.logging.LoggingArea;
import oneit.objstore.FieldWriteability; import oneit.objstore.FieldWriteability;
import oneit.objstore.StorageException;
import oneit.objstore.ValidationContext; import oneit.objstore.ValidationContext;
import oneit.objstore.rdbms.filters.EqualsFilter; import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.security.SecUser; import oneit.security.SecUser;
...@@ -38,6 +39,11 @@ public class HiringTeam extends BaseHiringTeam ...@@ -38,6 +39,11 @@ public class HiringTeam extends BaseHiringTeam
return isTrue(getHasClientSupport()); return isTrue(getHasClientSupport());
} }
public boolean showHasDiversity() throws StorageException, FieldException
{
return isTrue(getHasDiversity());
}
@Override @Override
public String getToString() public String getToString()
{ {
......
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
<IMPORT value="performa.orm.types.*"/> <IMPORT value="performa.orm.types.*"/>
<IMPORT value="performa.orm.types.TimeZone"/> <IMPORT value="performa.orm.types.TimeZone"/>
<MULTIPLEREFERENCE name="Users" type="CompanyUserHiringTeamLink" backreferenceName="HiringTeam" /> <MULTIPLEREFERENCE name="Users" type="CompanyUserHiringTeamLink" backreferenceName="HiringTeam" />
<MULTIPLEREFERENCE name="Clients" type="Client" backreferenceName="HiringTeam" /> <MULTIPLEREFERENCE name="Clients" type="Client" backreferenceName="HiringTeam" />
<MULTIPLEREFERENCE name="BillingTeams" type="HiringTeam" backreferenceName="BilledByTeam" /> <MULTIPLEREFERENCE name="BillingTeams" type="HiringTeam" backreferenceName="BilledByTeam" />
<MULTIPLEREFERENCE name="DiversityQuestions" type="HTDiversityQuestion" backreferenceName="HiringTeam" />
<TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="CouponCode" type="String" length="20"/> <TRANSIENT name="CouponCode" type="String" length="20"/>
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
<ATTRIB name="PostCode" type="String" dbcol="post_code" mandatory="false" length="10"/> <ATTRIB name="PostCode" type="String" dbcol="post_code" mandatory="false" length="10"/>
<ATTRIB name="City" type="String" dbcol="city" mandatory="false" length="100"/> <ATTRIB name="City" type="String" dbcol="city" mandatory="false" length="100"/>
<ATTRIB name="HasClientSupport" type="Boolean" dbcol="has_client_support" mandatory="false" defaultValue="Boolean.FALSE"/> <ATTRIB name="HasClientSupport" type="Boolean" dbcol="has_client_support" mandatory="false" defaultValue="Boolean.FALSE"/>
<ATTRIB name="HasDiversity" type="Boolean" dbcol="has_diversity" mandatory="false" defaultValue="Boolean.FALSE"/>
<ATTRIB name="ManageOwnBilling" type="Boolean" dbcol="manage_own_billing" mandatory="false" defaultValue="Boolean.TRUE"/> <ATTRIB name="ManageOwnBilling" type="Boolean" dbcol="manage_own_billing" mandatory="false" defaultValue="Boolean.TRUE"/>
<ATTRIB name="StripeReference" type="String" dbcol="stripe_reference" length="100" /> <ATTRIB name="StripeReference" type="String" dbcol="stripe_reference" length="100" />
<ATTRIB name="StripeSubscription" type="String" dbcol="stripe_subscription" length="100" /> <ATTRIB name="StripeSubscription" type="String" dbcol="stripe_subscription" length="100" />
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
</NODE> </NODE>
<NODE name="dynamic_content_form::ADMIN_PORTAL" factory="Participant"> <NODE name="dynamic_content_form::ADMIN_PORTAL" factory="Participant">
<FORM name="*.changeDiversity" factory="Participant" class="performa.form.ChangeDiversityFP"/>
<FORM name="*.changeAssessmentCriteria" factory="Participant" class="performa.form.ChangeAssessmentCriteriaFP"/> <FORM name="*.changeAssessmentCriteria" factory="Participant" class="performa.form.ChangeAssessmentCriteriaFP"/>
<FORM name="*.changeCultureCriteria" factory="Participant" class="performa.form.ChangeCultureCriteriaFP"/> <FORM name="*.changeCultureCriteria" factory="Participant" class="performa.form.ChangeCultureCriteriaFP"/>
<FORM name="*.saveJob" factory="Participant" class="performa.form.SaveJobFP"/> <FORM name="*.saveJob" factory="Participant" class="performa.form.SaveJobFP"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_candidate_diversity_answer</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="answer_id" type="Long" length="11" nullable="false"/>
<column name="question_id" type="Long" length="11" nullable="false"/>
<column name="candidate_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_candidate_diversity_answer" indexName="idx_tl_candidate_diversity_answer_candidate_id" isUnique="false">
<column name="candidate_id"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_diversity_answer</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="answer" type="CLOB" nullable="false"/>
<column name="question_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_diversity_answer" indexName="idx_tl_diversity_answer_question_id" isUnique="false">
<column name="question_id"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_diversity_question</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="question_text" type="CLOB" nullable="false"/>
<column name="australia_only" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_ht_diversity_question</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="question_text" type="CLOB" nullable="false"/>
<column name="is_applicable" type="Boolean" nullable="true"/>
<column name="question_id" type="Long" length="11" nullable="false"/>
<column name="hiring_team_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_ht_diversity_question" indexName="idx_tl_ht_diversity_question_hiring_team_id" isUnique="false">
<column name="hiring_team_id"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_hiring_team</tableName>
<column name="has_diversity" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
UPDATE tl_hiring_team SET has_diversity = 'N';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment