Commit 50bf9852 by Jay

ILO Job Title Validation.

parent aefb0786
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<column name="occupation_id" type="Long" length="11" nullable="false"/> <column name="occupation_id" type="Long" length="11" nullable="false"/>
<column name="shortened_url_id" type="Long" length="11" nullable="true"/> <column name="shortened_url_id" type="Long" length="11" nullable="true"/>
<column name="template_id" type="Long" length="11" nullable="true"/> <column name="template_id" type="Long" length="11" nullable="true"/>
<column name="job_title_id" type="Long" length="11" nullable="false"/> <column name="job_title_id" type="Long" length="11" nullable="true"/>
</NODE> </NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_job" indexName="idx_tl_job_client_id" isUnique="false"><column name="client_id"/></NODE> <NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_job" indexName="idx_tl_job_client_id" isUnique="false"><column name="client_id"/></NODE>
......
...@@ -41,7 +41,7 @@ CREATE TABLE tl_job ( ...@@ -41,7 +41,7 @@ CREATE TABLE tl_job (
occupation_id numeric(12) NOT NULL, occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL, shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL, template_id numeric(12) NULL,
job_title_id numeric(12) NOT NULL job_title_id numeric(12) NULL
); );
......
...@@ -42,7 +42,7 @@ CREATE TABLE tl_job ( ...@@ -42,7 +42,7 @@ CREATE TABLE tl_job (
occupation_id number(12) NOT NULL, occupation_id number(12) NOT NULL,
shortened_url_id number(12) NULL, shortened_url_id number(12) NULL,
template_id number(12) NULL, template_id number(12) NULL,
job_title_id number(12) NOT NULL job_title_id number(12) NULL
); );
......
...@@ -42,7 +42,7 @@ CREATE TABLE tl_job ( ...@@ -42,7 +42,7 @@ CREATE TABLE tl_job (
occupation_id numeric(12) NOT NULL, occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL, shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL, template_id numeric(12) NULL,
job_title_id numeric(12) NOT NULL job_title_id numeric(12) NULL
); );
......
...@@ -110,6 +110,8 @@ public class SaveJobFP extends SaveFP ...@@ -110,6 +110,8 @@ public class SaveJobFP extends SaveFP
// } // }
// } // }
BusinessObjectParser.assertFieldCondition(job.getILOJobTitle() != null , job, Job.SINGLEREFERENCE_ILOJobTitle, "mandatory", exceptions, true, request);
if(status != null && status == JobStatus.OPEN) if(status != null && status == JobStatus.OPEN)
{ {
BusinessObjectParser.assertFieldCondition(billingTeam.getCardID() != null , billingTeam, HiringTeam.FIELD_CardID, "mandatoryCardDetails", exceptions, true, request); BusinessObjectParser.assertFieldCondition(billingTeam.getCardID() != null , billingTeam, HiringTeam.FIELD_CardID, "mandatoryCardDetails", exceptions, true, request);
......
...@@ -102,6 +102,7 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor ...@@ -102,6 +102,7 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
Job job = (Job) request.getAttribute("Job"); Job job = (Job) request.getAttribute("Job");
BusinessObjectParser.assertFieldCondition(job.getAssessmentTemplateName() != null, job , Job.FIELD_AssessmentTemplateName, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(job.getAssessmentTemplateName() != null, job , Job.FIELD_AssessmentTemplateName, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(job.getILOJobTitle() != null , job, Job.SINGLEREFERENCE_ILOJobTitle, "mandatory", exceptions, true, request);
for(AssessmentCriteria criteria: job.getAssessmentCriteriasSet()) for(AssessmentCriteria criteria: job.getAssessmentCriteriasSet())
{ {
......
...@@ -567,7 +567,6 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -567,7 +567,6 @@ public abstract class BaseJob extends BaseBusinessClass
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "job_title_id"); metaInfo.put ("dbcol", "job_title_id");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "ILOJobTitle"); metaInfo.put ("name", "ILOJobTitle");
metaInfo.put ("type", "ILOJobTitle"); metaInfo.put ("type", "ILOJobTitle");
...@@ -6831,7 +6830,6 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -6831,7 +6830,6 @@ public abstract class BaseJob extends BaseBusinessClass
*/ */
public void setILOJobTitle (ILOJobTitle newILOJobTitle) throws StorageException, FieldException public void setILOJobTitle (ILOJobTitle newILOJobTitle) throws StorageException, FieldException
{ {
BusinessObjectParser.assertFieldCondition (newILOJobTitle != null, this, SINGLEREFERENCE_ILOJobTitle, "mandatory");
if (_ILOJobTitle.wouldReferencedChange (newILOJobTitle)) if (_ILOJobTitle.wouldReferencedChange (newILOJobTitle))
...@@ -7943,8 +7941,6 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -7943,8 +7941,6 @@ public abstract class BaseJob extends BaseBusinessClass
context.check (getOccupationID() != null, this, SINGLEREFERENCE_Occupation, "mandatory"); context.check (getOccupationID() != null, this, SINGLEREFERENCE_Occupation, "mandatory");
context.check (getILOJobTitleID() != null, this, SINGLEREFERENCE_ILOJobTitle, "mandatory");
} }
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/> <SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/>
<SINGLEREFERENCE name="ShortenedURL" type="ShortenedURL" dbcol="shortened_url_id" /> <SINGLEREFERENCE name="ShortenedURL" type="ShortenedURL" dbcol="shortened_url_id" />
<SINGLEREFERENCE name="AssessmentTemplate" type="AssessmentCriteriaTemplate" dbcol="template_id" /> <SINGLEREFERENCE name="AssessmentTemplate" type="AssessmentCriteriaTemplate" dbcol="template_id" />
<SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" mandatory="true"/> <SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" />
</TABLE> </TABLE>
......
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