Commit 30518306 by Harsh Shah

Finish Feature-Phase-3.2

parents 040a5d22 5d463d85
<?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_note</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="comment" type="String" nullable="false" length="1000"/>
<column name="created_user_id" type="Long" length="11" nullable="false"/>
<column name="job_application_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_note" indexName="idx_tl_note_job_application_id" isUnique="false"><column name="job_application_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
<column name="code" type="String" nullable="false" length="4"/> <column name="code" type="String" nullable="false" length="4"/>
<column name="name" type="String" nullable="false" length="250"/> <column name="name" type="String" nullable="false" length="250"/>
<column name="level" type="String" nullable="false" length="200"/> <column name="level" type="String" nullable="false" length="200"/>
<column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="assessment_level_id" type="Long" length="11" nullable="true"/>
<column name="parent_occupation_id" type="Long" length="11" nullable="true"/> <column name="parent_occupation_id" type="Long" length="11" nullable="true"/>
</NODE> </NODE>
......
-- DROP TABLE tl_note;
CREATE TABLE tl_note (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
comment varchar(1000) NOT NULL,
created_user_id numeric(12) NOT NULL,
job_application_id numeric(12) NOT NULL
);
ALTER TABLE tl_note ADD
CONSTRAINT PK_tl_note PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_note_job_application_id
ON tl_note (job_application_id);
...@@ -11,6 +11,8 @@ CREATE TABLE tl_occupation ( ...@@ -11,6 +11,8 @@ CREATE TABLE tl_occupation (
code varchar(4) NOT NULL, code varchar(4) NOT NULL,
name varchar(250) NOT NULL, name varchar(250) NOT NULL,
level varchar(200) NOT NULL, level varchar(200) NOT NULL,
assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL parent_occupation_id numeric(12) NULL
); );
......
-- DROP TABLE tl_note;
CREATE TABLE tl_note (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
comment varchar2(1000) NOT NULL,
created_user_id number(12) NOT NULL,
job_application_id number(12) NOT NULL
);
ALTER TABLE tl_note ADD
CONSTRAINT PK_tl_note PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_note_job_application_id
ON tl_note (job_application_id);
...@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation ( ...@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation (
code varchar2(4) NOT NULL, code varchar2(4) NOT NULL,
name varchar2(250) NOT NULL, name varchar2(250) NOT NULL,
level varchar2(200) NOT NULL, level varchar2(200) NOT NULL,
assessment_type varchar2(200) NULL,
assessment_level_id number(12) NULL,
parent_occupation_id number(12) NULL parent_occupation_id number(12) NULL
); );
......
-- @AutoRun
-- drop table tl_note;
CREATE TABLE tl_note (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
comment varchar(1000) NOT NULL,
created_user_id numeric(12) NOT NULL,
job_application_id numeric(12) NOT NULL
);
ALTER TABLE tl_note ADD
CONSTRAINT pk_tl_note PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_note_job_application_id
ON tl_note (job_application_id);
...@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation ( ...@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation (
code varchar(4) NOT NULL, code varchar(4) NOT NULL,
name varchar(250) NOT NULL, name varchar(250) NOT NULL,
level varchar(200) NOT NULL, level varchar(200) NOT NULL,
assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL parent_occupation_id numeric(12) NULL
); );
......
package performa.form;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.security.SecUser;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.utils.MultiException;
import performa.orm.CompanyUser;
import performa.orm.JobApplication;
import performa.orm.Note;
public class AddNoteFP extends SaveFP
{
private static final LoggingArea LOG = LoggingArea.createLoggingArea("AddNoteFP");
@Override
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
BusinessObjectParser.assertFieldCondition(jobApplication.getNote()!= null, jobApplication, JobApplication.FIELD_Note, "mandatory", exceptions, true, request);
super.validate(process, submission, exceptions, params);
}
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
ObjectTransaction objTran = process.getTransaction();
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
LogMgr.log(LOG, LogLevel.PROCESSING1, "Adding note to job application : ", jobApplication);
Note note = Note.createNote(objTran);
SecUser secUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
note.setComment(jobApplication.getNote());
note.setCreatedUser(companyUser);
note.setJobApplication(jobApplication);
LogMgr.log(LOG, LogLevel.PROCESSING1, "New note added : ", note);
return super.processForm(process, submission, params);
}
}
\ No newline at end of file
...@@ -2,7 +2,6 @@ package performa.form; ...@@ -2,7 +2,6 @@ package performa.form;
import com.stripe.Stripe; import com.stripe.Stripe;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel; import oneit.logging.LogLevel;
import oneit.logging.LogMgr; import oneit.logging.LogMgr;
import oneit.objstore.StorageException; import oneit.objstore.StorageException;
......
package performa.form;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.StorageException;
import oneit.security.SecUser;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.utils.DateDiff;
import oneit.utils.math.NullArith;
import performa.orm.CompanyUser;
import performa.orm.HiringTeam;
import performa.orm.Job;
import performa.utils.StripeUtils;
public class ExtendJobFP extends SaveFP
{
private static final LoggingArea LOG = LoggingArea.createLoggingArea("ExtendJobFP");
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
SecUser secUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Start of Extend job : ", job);
job.setApplyBy(DateDiff.add(job.getApplyBy(), Calendar.DATE, 30));
job.setLastEdited(new Date());
if (billingTeam.canCreateJob())
{
billingTeam.setUsedCredits(NullArith.add(billingTeam.getUsedCredits(), 1).intValue());
if(billingTeam.getUsedCredits() > billingTeam.getAvailableCredits())
{
StripeUtils.recordUsage(billingTeam);
}
}
else if(billingTeam.getIsPPJ())
{
StripeUtils.makePayment(hiringTeam, job);
}
LogMgr.log(LOG, LogLevel.PROCESSING1, "Job Extended. Apply by date : ", job.getApplyBy());
return super.processForm(process, submission, params);
}
}
\ No newline at end of file
...@@ -27,6 +27,11 @@ public class NavigateToCreateJobFP extends ORMProcessFormProcessor ...@@ -27,6 +27,11 @@ public class NavigateToCreateJobFP extends ORMProcessFormProcessor
if(job != null && job.isTrue(job.getFromTemplate())) if(job != null && job.isTrue(job.getFromTemplate()))
{ {
if(job.getHiringTeam().showHasClientSupport())
{
BusinessObjectParser.assertFieldCondition(job.getClient() != null , job, Job.SINGLEREFERENCE_Client, "mandatory", exceptions, true, request);
}
BusinessObjectParser.assertFieldCondition(job.getAssessmentTemplate() != null , job, Job.SINGLEREFERENCE_AssessmentTemplate, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(job.getAssessmentTemplate() != null , job, Job.SINGLEREFERENCE_AssessmentTemplate, "mandatory", exceptions, true, request);
} }
......
...@@ -24,7 +24,11 @@ public class ProcessCultureFP extends SaveFP ...@@ -24,7 +24,11 @@ public class ProcessCultureFP extends SaveFP
if(job.getOccupationId() != null) if(job.getOccupationId() != null)
{ {
job.setOccupation(Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()))); Occupation occupation = Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()));
job.setOccupation(occupation);
job.setLevel(occupation.getAssessmentLevel());
job.setAssessmentType(occupation.getAssessmentType());
} }
return new ProcessRedirectResult((String) submission.getRequest().getAttribute("nextPage"), new String[0]); return new ProcessRedirectResult((String) submission.getRequest().getAttribute("nextPage"), new String[0]);
...@@ -52,12 +56,12 @@ public class ProcessCultureFP extends SaveFP ...@@ -52,12 +56,12 @@ public class ProcessCultureFP extends SaveFP
BusinessObjectParser.assertFieldCondition(job.getOccupation() != null, job , Job.SINGLEREFERENCE_Occupation, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(job.getOccupation() != null, job , Job.SINGLEREFERENCE_Occupation, "mandatory", exceptions, true, request);
} }
BusinessObjectParser.assertFieldCondition(job.getLevel()!= null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request); // BusinessObjectParser.assertFieldCondition(job.getLevel()!= null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
//
if(job.getLevel() != null) // if(job.getLevel() != null)
{ // {
BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request); // BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
} // }
} }
if(fromCulture) if(fromCulture)
......
...@@ -83,7 +83,11 @@ public class SaveJobFP extends SaveFP ...@@ -83,7 +83,11 @@ public class SaveJobFP extends SaveFP
if(job.getOccupationId() != null) if(job.getOccupationId() != null)
{ {
job.setOccupation(Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()))); Occupation occupation = Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()));
job.setOccupation(occupation);
job.setLevel(occupation.getAssessmentLevel());
job.setAssessmentType(occupation.getAssessmentType());
} }
// restarting process as custom attributes needs to be updated to intercom // restarting process as custom attributes needs to be updated to intercom
...@@ -106,20 +110,19 @@ public class SaveJobFP extends SaveFP ...@@ -106,20 +110,19 @@ public class SaveJobFP extends SaveFP
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
Job job = process.getAttribute("Job") != null ? (Job) process.getAttribute("Job") : (Job) request.getAttribute("Job"); Job job = process.getAttribute("Job") != null ? (Job) process.getAttribute("Job") : (Job) request.getAttribute("Job");
Boolean openJob = (Boolean) request.getAttribute("openJob");
JobStatus status = (JobStatus) request.getAttribute("JobStatus"); JobStatus status = (JobStatus) request.getAttribute("JobStatus");
HiringTeam hiringTeam = job.getHiringTeam(); HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam(); HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
if(job.getJobStatus() != JobStatus.DRAFT || openJob == Boolean.TRUE) // if(job.getJobStatus() != JobStatus.DRAFT || openJob == Boolean.TRUE)
{ // {
BusinessObjectParser.assertFieldCondition(job.getLevel() != null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request); // BusinessObjectParser.assertFieldCondition(job.getLevel() != null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
//
if(job.getLevel() != null) // if(job.getLevel() != null)
{ // {
BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request); // BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
} // }
} // }
if(status != null && status == JobStatus.OPEN) if(status != null && status == JobStatus.OPEN)
{ {
......
...@@ -71,6 +71,10 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor ...@@ -71,6 +71,10 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
newTemplate.addToWorkFlows(workflowCopy); newTemplate.addToWorkFlows(workflowCopy);
} }
newTemplate.setIncludeAssessmentCriteria(job.getIncludeAssessmentCriteria());
if(job.getIncludeAssessmentCriteria())
{
for (AssessmentCriteria criteria : job.getAssessmentCriteriasSet()) for (AssessmentCriteria criteria : job.getAssessmentCriteriasSet())
{ {
AssessmentCriteria criteriaCopy = AssessmentCriteria.createAssessmentCriteria(newObjTran); AssessmentCriteria criteriaCopy = AssessmentCriteria.createAssessmentCriteria(newObjTran);
...@@ -79,6 +83,7 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor ...@@ -79,6 +83,7 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
newTemplate.addToAssessmentCriterias(criteriaCopy); newTemplate.addToAssessmentCriterias(criteriaCopy);
} }
}
}); });
job.setAssessmentTemplateName(null); job.setAssessmentTemplateName(null);
......
...@@ -1159,7 +1159,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -1159,7 +1159,7 @@ public abstract class BaseJob extends BaseBusinessClass
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "require_cv"); metaInfo.put ("dbcol", "require_cv");
metaInfo.put ("defaultValue", "Boolean.FALSE"); metaInfo.put ("defaultValue", "Boolean.TRUE");
metaInfo.put ("name", "RequireCV"); metaInfo.put ("name", "RequireCV");
metaInfo.put ("type", "Boolean"); metaInfo.put ("type", "Boolean");
...@@ -1348,7 +1348,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -1348,7 +1348,7 @@ public abstract class BaseJob extends BaseBusinessClass
_ExpectedCandidateRadius = (LocationRadius)(LocationRadius.KM100); _ExpectedCandidateRadius = (LocationRadius)(LocationRadius.KM100);
_State = (State)(State.WA); _State = (State)(State.WA);
_Country = (Countries)(Countries.AU); _Country = (Countries)(Countries.AU);
_RequireCV = (Boolean)(Boolean.FALSE); _RequireCV = (Boolean)(Boolean.TRUE);
_IsManuallyClosed = (Boolean)(Boolean.FALSE); _IsManuallyClosed = (Boolean)(Boolean.FALSE);
_LastEdited = (Date)(HELPER_LastEdited.initialise (_LastEdited)); _LastEdited = (Date)(HELPER_LastEdited.initialise (_LastEdited));
_IsPPJ = (Boolean)(Boolean.FALSE); _IsPPJ = (Boolean)(Boolean.FALSE);
......
...@@ -53,6 +53,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -53,6 +53,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public static final String FIELD_RequirementFit = "RequirementFit"; public static final String FIELD_RequirementFit = "RequirementFit";
public static final String FIELD_CultureFit = "CultureFit"; public static final String FIELD_CultureFit = "CultureFit";
public static final String FIELD_FactorScoreDetails = "FactorScoreDetails"; public static final String FIELD_FactorScoreDetails = "FactorScoreDetails";
public static final String FIELD_Note = "Note";
public static final String SINGLEREFERENCE_WorkFlow = "WorkFlow"; public static final String SINGLEREFERENCE_WorkFlow = "WorkFlow";
public static final String SINGLEREFERENCE_Candidate = "Candidate"; public static final String SINGLEREFERENCE_Candidate = "Candidate";
public static final String BACKREF_Candidate = ""; public static final String BACKREF_Candidate = "";
...@@ -60,6 +61,8 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -60,6 +61,8 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public static final String BACKREF_Job = ""; public static final String BACKREF_Job = "";
public static final String MULTIPLEREFERENCE_AssessmentCriteriaAnswers = "AssessmentCriteriaAnswers"; public static final String MULTIPLEREFERENCE_AssessmentCriteriaAnswers = "AssessmentCriteriaAnswers";
public static final String BACKREF_AssessmentCriteriaAnswers = ""; public static final String BACKREF_AssessmentCriteriaAnswers = "";
public static final String MULTIPLEREFERENCE_Notes = "Notes";
public static final String BACKREF_Notes = "";
// Static constants corresponding to searches // Static constants corresponding to searches
public static final String SEARCH_All = "All"; public static final String SEARCH_All = "All";
...@@ -81,6 +84,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -81,6 +84,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
private static final BLOBAttributeHelper HELPER_RequirementFit = BLOBAttributeHelper.INSTANCE; private static final BLOBAttributeHelper HELPER_RequirementFit = BLOBAttributeHelper.INSTANCE;
private static final BLOBAttributeHelper HELPER_CultureFit = BLOBAttributeHelper.INSTANCE; private static final BLOBAttributeHelper HELPER_CultureFit = BLOBAttributeHelper.INSTANCE;
private static final BLOBAttributeHelper HELPER_FactorScoreDetails = BLOBAttributeHelper.INSTANCE; private static final BLOBAttributeHelper HELPER_FactorScoreDetails = BLOBAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<JobApplication> HELPER_Note = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
...@@ -97,6 +101,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -97,6 +101,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
private Map _RequirementFit; private Map _RequirementFit;
private Map _CultureFit; private Map _CultureFit;
private Map _FactorScoreDetails; private Map _FactorScoreDetails;
private String _Note;
// Private attributes corresponding to single references // Private attributes corresponding to single references
...@@ -107,6 +112,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -107,6 +112,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
// Private attributes corresponding to multiple references // Private attributes corresponding to multiple references
private MultipleAssociation<JobApplication, AssessmentCriteriaAnswer> _AssessmentCriteriaAnswers; private MultipleAssociation<JobApplication, AssessmentCriteriaAnswer> _AssessmentCriteriaAnswers;
private MultipleAssociation<JobApplication, Note> _Notes;
// Map of maps of metadata // Map of maps of metadata
...@@ -119,6 +125,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -119,6 +125,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
private static final AttributeValidator[] FIELD_RequirementFit_Validators; private static final AttributeValidator[] FIELD_RequirementFit_Validators;
private static final AttributeValidator[] FIELD_CultureFit_Validators; private static final AttributeValidator[] FIELD_CultureFit_Validators;
private static final AttributeValidator[] FIELD_FactorScoreDetails_Validators; private static final AttributeValidator[] FIELD_FactorScoreDetails_Validators;
private static final AttributeValidator[] FIELD_Note_Validators;
private static final AttributeValidator[] FIELD_CV_Validators; private static final AttributeValidator[] FIELD_CV_Validators;
private static final AttributeValidator[] FIELD_CoverLetter_Validators; private static final AttributeValidator[] FIELD_CoverLetter_Validators;
private static final AttributeValidator[] FIELD_ApplicationStatus_Validators; private static final AttributeValidator[] FIELD_ApplicationStatus_Validators;
...@@ -137,12 +144,14 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -137,12 +144,14 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
String tmp_AssessmentCriteriaAnswers = AssessmentCriteriaAnswer.BACKREF_JobApplication; String tmp_AssessmentCriteriaAnswers = AssessmentCriteriaAnswer.BACKREF_JobApplication;
String tmp_Notes = Note.BACKREF_JobApplication;
String tmp_Candidate = Candidate.BACKREF_JobApplications; String tmp_Candidate = Candidate.BACKREF_JobApplications;
String tmp_Job = Job.BACKREF_JobApplications; String tmp_Job = Job.BACKREF_JobApplications;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping")); Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_AssessmentCriteriaAnswers(); setupAssocMetaData_AssessmentCriteriaAnswers();
setupAssocMetaData_Notes();
setupAssocMetaData_WorkFlow(); setupAssocMetaData_WorkFlow();
setupAssocMetaData_Candidate(); setupAssocMetaData_Candidate();
setupAssocMetaData_Job(); setupAssocMetaData_Job();
...@@ -152,6 +161,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -152,6 +161,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
FIELD_RequirementFit_Validators = (AttributeValidator[])setupAttribMetaData_RequirementFit(validatorMapping).toArray (new AttributeValidator[0]); FIELD_RequirementFit_Validators = (AttributeValidator[])setupAttribMetaData_RequirementFit(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CultureFit_Validators = (AttributeValidator[])setupAttribMetaData_CultureFit(validatorMapping).toArray (new AttributeValidator[0]); FIELD_CultureFit_Validators = (AttributeValidator[])setupAttribMetaData_CultureFit(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_FactorScoreDetails_Validators = (AttributeValidator[])setupAttribMetaData_FactorScoreDetails(validatorMapping).toArray (new AttributeValidator[0]); FIELD_FactorScoreDetails_Validators = (AttributeValidator[])setupAttribMetaData_FactorScoreDetails(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Note_Validators = (AttributeValidator[])setupAttribMetaData_Note(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CV_Validators = (AttributeValidator[])setupAttribMetaData_CV(validatorMapping).toArray (new AttributeValidator[0]); FIELD_CV_Validators = (AttributeValidator[])setupAttribMetaData_CV(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CoverLetter_Validators = (AttributeValidator[])setupAttribMetaData_CoverLetter(validatorMapping).toArray (new AttributeValidator[0]); FIELD_CoverLetter_Validators = (AttributeValidator[])setupAttribMetaData_CoverLetter(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ApplicationStatus_Validators = (AttributeValidator[])setupAttribMetaData_ApplicationStatus(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ApplicationStatus_Validators = (AttributeValidator[])setupAttribMetaData_ApplicationStatus(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -188,6 +198,20 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -188,6 +198,20 @@ public abstract class BaseJobApplication extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static void setupAssocMetaData_Notes()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "JobApplication");
metaInfo.put ("name", "Notes");
metaInfo.put ("type", "Note");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for JobApplication.Notes:", metaInfo);
ATTRIBUTES_METADATA_JobApplication.put (MULTIPLEREFERENCE_Notes, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_WorkFlow() private static void setupAssocMetaData_WorkFlow()
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -344,6 +368,23 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -344,6 +368,23 @@ public abstract class BaseJobApplication extends BaseBusinessClass
} }
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_Note(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("name", "Note");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for JobApplication.Note:", metaInfo);
ATTRIBUTES_METADATA_JobApplication.put (FIELD_Note, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(JobApplication.class, "Note", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for JobApplication.Note:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_CV(Map validatorMapping) private static List setupAttribMetaData_CV(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -522,6 +563,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -522,6 +563,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_RequirementFit = (Map)(HELPER_RequirementFit.initialise (_RequirementFit)); _RequirementFit = (Map)(HELPER_RequirementFit.initialise (_RequirementFit));
_CultureFit = (Map)(HELPER_CultureFit.initialise (_CultureFit)); _CultureFit = (Map)(HELPER_CultureFit.initialise (_CultureFit));
_FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.initialise (_FactorScoreDetails)); _FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.initialise (_FactorScoreDetails));
_Note = (String)(HELPER_Note.initialise (_Note));
} }
...@@ -534,6 +576,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -534,6 +576,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application"); _Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application");
_Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application"); _Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application");
_AssessmentCriteriaAnswers = new MultipleAssociation<JobApplication, AssessmentCriteriaAnswer> (this, MULTIPLEREFERENCE_AssessmentCriteriaAnswers, AssessmentCriteriaAnswer.SINGLEREFERENCE_JobApplication, AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer); _AssessmentCriteriaAnswers = new MultipleAssociation<JobApplication, AssessmentCriteriaAnswer> (this, MULTIPLEREFERENCE_AssessmentCriteriaAnswers, AssessmentCriteriaAnswer.SINGLEREFERENCE_JobApplication, AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer);
_Notes = new MultipleAssociation<JobApplication, Note> (this, MULTIPLEREFERENCE_Notes, Note.SINGLEREFERENCE_JobApplication, Note.REFERENCE_Note);
} }
...@@ -547,6 +590,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -547,6 +590,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application"); _Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application");
_Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application"); _Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application");
_AssessmentCriteriaAnswers = new MultipleAssociation<JobApplication, AssessmentCriteriaAnswer> (this, MULTIPLEREFERENCE_AssessmentCriteriaAnswers, AssessmentCriteriaAnswer.SINGLEREFERENCE_JobApplication, AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer); _AssessmentCriteriaAnswers = new MultipleAssociation<JobApplication, AssessmentCriteriaAnswer> (this, MULTIPLEREFERENCE_AssessmentCriteriaAnswers, AssessmentCriteriaAnswer.SINGLEREFERENCE_JobApplication, AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer);
_Notes = new MultipleAssociation<JobApplication, Note> (this, MULTIPLEREFERENCE_Notes, Note.SINGLEREFERENCE_JobApplication, Note.REFERENCE_Note);
return this; return this;
...@@ -1829,6 +1873,104 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -1829,6 +1873,104 @@ public abstract class BaseJobApplication extends BaseBusinessClass
} }
} }
/**
* Get the attribute Note
*/
public String getNote ()
{
assertValid();
String valToReturn = _Note;
for (JobApplicationBehaviourDecorator bhd : JobApplication_BehaviourDecorators)
{
valToReturn = bhd.getNote ((JobApplication)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preNoteChange (String newNote) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postNoteChange () throws FieldException
{
}
public FieldWriteability getWriteability_Note ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Note. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setNote (String newNote) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Note.compare (_Note, newNote);
try
{
for (JobApplicationBehaviourDecorator bhd : JobApplication_BehaviourDecorators)
{
newNote = bhd.setNote ((JobApplication)this, newNote);
oldAndNewIdentical = HELPER_Note.compare (_Note, newNote);
}
if (FIELD_Note_Validators.length > 0)
{
Object newNoteObj = HELPER_Note.toObject (newNote);
if (newNoteObj != null)
{
int loopMax = FIELD_Note_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_JobApplication.get (FIELD_Note);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Note_Validators[v].checkAttribute (this, FIELD_Note, metadata, newNoteObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Note () != FieldWriteability.FALSE, "Field Note is not writeable");
preNoteChange (newNote);
markFieldChange (FIELD_Note);
_Note = newNote;
postFieldChange (FIELD_Note);
postNoteChange ();
}
}
/** /**
...@@ -2306,6 +2448,8 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2306,6 +2448,8 @@ public abstract class BaseJobApplication extends BaseBusinessClass
result.add("AssessmentCriteriaAnswers"); result.add("AssessmentCriteriaAnswers");
result.add("Notes");
return result; return result;
} }
...@@ -2322,6 +2466,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2322,6 +2466,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer ; return AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer ;
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
return Note.REFERENCE_Note ;
}
return super.getMultiAssocReferenceInstance(attribName); return super.getMultiAssocReferenceInstance(attribName);
} }
...@@ -2335,6 +2484,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2335,6 +2484,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return AssessmentCriteriaAnswer.SINGLEREFERENCE_JobApplication ; return AssessmentCriteriaAnswer.SINGLEREFERENCE_JobApplication ;
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
return Note.SINGLEREFERENCE_JobApplication ;
}
return super.getMultiAssocBackReference(attribName); return super.getMultiAssocBackReference(attribName);
} }
...@@ -2351,6 +2505,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2351,6 +2505,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return this.getAssessmentCriteriaAnswersCount(); return this.getAssessmentCriteriaAnswersCount();
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
return this.getNotesCount();
}
return super.getMultiAssocCount(attribName); return super.getMultiAssocCount(attribName);
} }
...@@ -2367,6 +2526,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2367,6 +2526,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return this.getAssessmentCriteriaAnswersAt(index); return this.getAssessmentCriteriaAnswersAt(index);
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
return this.getNotesAt(index);
}
return super.getMultiAssocAt(attribName, index); return super.getMultiAssocAt(attribName, index);
} }
...@@ -2385,6 +2549,13 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2385,6 +2549,13 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
addToNotes((Note)newElement);
return;
}
super.addToMultiAssoc(attribName, newElement); super.addToMultiAssoc(attribName, newElement);
} }
...@@ -2402,6 +2573,13 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2402,6 +2573,13 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
removeFromNotes((Note)oldElement);
return;
}
super.removeFromMultiAssoc(attribName, oldElement); super.removeFromMultiAssoc(attribName, oldElement);
} }
...@@ -2416,6 +2594,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2416,6 +2594,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
_Notes.__loadAssociation (elements);
return;
}
super.__loadMultiAssoc(attribName, elements); super.__loadMultiAssoc(attribName, elements);
} }
...@@ -2429,6 +2613,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2429,6 +2613,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return _AssessmentCriteriaAnswers.isLoaded (); return _AssessmentCriteriaAnswers.isLoaded ();
} }
if (MULTIPLEREFERENCE_Notes.equals(attribName))
{
return _Notes.isLoaded ();
}
return super.__isMultiAssocLoaded(attribName); return super.__isMultiAssocLoaded(attribName);
} }
...@@ -2504,6 +2693,75 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2504,6 +2693,75 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return _AssessmentCriteriaAnswers.getSet (); return _AssessmentCriteriaAnswers.getSet ();
} }
public FieldWriteability getWriteability_Notes ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
public int getNotesCount () throws StorageException
{
assertValid();
return _Notes.getReferencedObjectsCount ();
}
public void addToNotes (Note newElement) throws StorageException
{
if (_Notes.wouldAddChange (newElement))
{
assertValid();
Debug.assertion (getWriteability_Notes () != FieldWriteability.FALSE, "MultiAssoc Notes is not writeable (add)");
_Notes.appendElement (newElement);
try
{
if (newElement.getJobApplication () != this)
{
newElement.setJobApplication ((JobApplication)(this));
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public void removeFromNotes (Note elementToRemove) throws StorageException
{
if (_Notes.wouldRemoveChange (elementToRemove))
{
assertValid();
Debug.assertion (getWriteability_Notes () != FieldWriteability.FALSE, "MultiAssoc Notes is not writeable (remove)");
_Notes.removeElement (elementToRemove);
try
{
if (elementToRemove.getJobApplication () != null)
{
elementToRemove.setJobApplication (null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public Note getNotesAt (int index) throws StorageException
{
return (Note)(_Notes.getElementAt (index));
}
public SortedSet<Note> getNotesSet () throws StorageException
{
return _Notes.getSet ();
}
public void onDelete () public void onDelete ()
...@@ -2544,6 +2802,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2544,6 +2802,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass
referenced.setJobApplication(null); referenced.setJobApplication(null);
} }
for(Note referenced : CollectionUtils.reverse(getNotesSet()))
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null JobApplication from ", getObjectID (), " to ", referenced.getObjectID ());
referenced.setJobApplication(null);
}
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -2742,6 +3006,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2742,6 +3006,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_RequirementFit = sourceJobApplication._RequirementFit; _RequirementFit = sourceJobApplication._RequirementFit;
_CultureFit = sourceJobApplication._CultureFit; _CultureFit = sourceJobApplication._CultureFit;
_FactorScoreDetails = sourceJobApplication._FactorScoreDetails; _FactorScoreDetails = sourceJobApplication._FactorScoreDetails;
_Note = sourceJobApplication._Note;
} }
} }
...@@ -2778,6 +3043,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2778,6 +3043,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
BaseJobApplication sourceJobApplication = (BaseJobApplication)(source); BaseJobApplication sourceJobApplication = (BaseJobApplication)(source);
_AssessmentCriteriaAnswers.copyFrom (sourceJobApplication._AssessmentCriteriaAnswers, linkToGhosts); _AssessmentCriteriaAnswers.copyFrom (sourceJobApplication._AssessmentCriteriaAnswers, linkToGhosts);
_Notes.copyFrom (sourceJobApplication._Notes, linkToGhosts);
} }
} }
...@@ -2815,10 +3081,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2815,10 +3081,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_RequirementFit = (Map)(HELPER_RequirementFit.readExternal (_RequirementFit, vals.get(FIELD_RequirementFit))); // _RequirementFit = (Map)(HELPER_RequirementFit.readExternal (_RequirementFit, vals.get(FIELD_RequirementFit))); //
_CultureFit = (Map)(HELPER_CultureFit.readExternal (_CultureFit, vals.get(FIELD_CultureFit))); // _CultureFit = (Map)(HELPER_CultureFit.readExternal (_CultureFit, vals.get(FIELD_CultureFit))); //
_FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.readExternal (_FactorScoreDetails, vals.get(FIELD_FactorScoreDetails))); // _FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.readExternal (_FactorScoreDetails, vals.get(FIELD_FactorScoreDetails))); //
_Note = (String)(HELPER_Note.readExternal (_Note, vals.get(FIELD_Note))); //
_WorkFlow.readExternalData(vals.get(SINGLEREFERENCE_WorkFlow)); _WorkFlow.readExternalData(vals.get(SINGLEREFERENCE_WorkFlow));
_Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate)); _Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate));
_Job.readExternalData(vals.get(SINGLEREFERENCE_Job)); _Job.readExternalData(vals.get(SINGLEREFERENCE_Job));
_AssessmentCriteriaAnswers.readExternalData(vals.get(MULTIPLEREFERENCE_AssessmentCriteriaAnswers)); _AssessmentCriteriaAnswers.readExternalData(vals.get(MULTIPLEREFERENCE_AssessmentCriteriaAnswers));
_Notes.readExternalData(vals.get(MULTIPLEREFERENCE_Notes));
} }
...@@ -2843,10 +3111,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2843,10 +3111,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass
vals.put (FIELD_RequirementFit, HELPER_RequirementFit.writeExternal (_RequirementFit)); vals.put (FIELD_RequirementFit, HELPER_RequirementFit.writeExternal (_RequirementFit));
vals.put (FIELD_CultureFit, HELPER_CultureFit.writeExternal (_CultureFit)); vals.put (FIELD_CultureFit, HELPER_CultureFit.writeExternal (_CultureFit));
vals.put (FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.writeExternal (_FactorScoreDetails)); vals.put (FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.writeExternal (_FactorScoreDetails));
vals.put (FIELD_Note, HELPER_Note.writeExternal (_Note));
vals.put (SINGLEREFERENCE_WorkFlow, _WorkFlow.writeExternalData()); vals.put (SINGLEREFERENCE_WorkFlow, _WorkFlow.writeExternalData());
vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData()); vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData());
vals.put (SINGLEREFERENCE_Job, _Job.writeExternalData()); vals.put (SINGLEREFERENCE_Job, _Job.writeExternalData());
vals.put (MULTIPLEREFERENCE_AssessmentCriteriaAnswers, _AssessmentCriteriaAnswers.writeExternalData()); vals.put (MULTIPLEREFERENCE_AssessmentCriteriaAnswers, _AssessmentCriteriaAnswers.writeExternalData());
vals.put (MULTIPLEREFERENCE_Notes, _Notes.writeExternalData());
} }
...@@ -2897,6 +3167,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2897,6 +3167,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
// Compare multiple assocs // Compare multiple assocs
_AssessmentCriteriaAnswers.compare (otherJobApplication._AssessmentCriteriaAnswers, listener); _AssessmentCriteriaAnswers.compare (otherJobApplication._AssessmentCriteriaAnswers, listener);
_Notes.compare (otherJobApplication._Notes, listener);
} }
} }
...@@ -2912,6 +3183,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2912,6 +3183,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
visitor.visitField(this, FIELD_RequirementFit, HELPER_RequirementFit.toObject(getRequirementFit())); visitor.visitField(this, FIELD_RequirementFit, HELPER_RequirementFit.toObject(getRequirementFit()));
visitor.visitField(this, FIELD_CultureFit, HELPER_CultureFit.toObject(getCultureFit())); visitor.visitField(this, FIELD_CultureFit, HELPER_CultureFit.toObject(getCultureFit()));
visitor.visitField(this, FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.toObject(getFactorScoreDetails())); visitor.visitField(this, FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.toObject(getFactorScoreDetails()));
visitor.visitField(this, FIELD_Note, HELPER_Note.toObject(getNote()));
} }
...@@ -2931,6 +3203,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2931,6 +3203,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
visitor.visitAssociation (_Candidate); visitor.visitAssociation (_Candidate);
visitor.visitAssociation (_Job); visitor.visitAssociation (_Job);
visitor.visitAssociation (_AssessmentCriteriaAnswers); visitor.visitAssociation (_AssessmentCriteriaAnswers);
visitor.visitAssociation (_Notes);
} }
...@@ -2955,6 +3228,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2955,6 +3228,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
visitor.visit (_AssessmentCriteriaAnswers); visitor.visit (_AssessmentCriteriaAnswers);
} }
if (scope.includes (_Notes))
{
visitor.visit (_Notes);
}
} }
...@@ -3443,6 +3720,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3443,6 +3720,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return HELPER_FactorScoreDetails.toObject (getFactorScoreDetails ()); return HELPER_FactorScoreDetails.toObject (getFactorScoreDetails ());
} }
else if (attribName.equals (FIELD_Note))
{
return HELPER_Note.toObject (getNote ());
}
else else
{ {
return super.getAttribute (attribName); return super.getAttribute (attribName);
...@@ -3508,6 +3789,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3508,6 +3789,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return HELPER_FactorScoreDetails; return HELPER_FactorScoreDetails;
} }
else if (attribName.equals (FIELD_Note))
{
return HELPER_Note;
}
else else
{ {
return super.getAttributeHelper (attribName); return super.getAttributeHelper (attribName);
...@@ -3573,6 +3858,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3573,6 +3858,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
setFactorScoreDetails ((Map)(HELPER_FactorScoreDetails.fromObject (_FactorScoreDetails, attribValue))); setFactorScoreDetails ((Map)(HELPER_FactorScoreDetails.fromObject (_FactorScoreDetails, attribValue)));
} }
else if (attribName.equals (FIELD_Note))
{
setNote ((String)(HELPER_Note.fromObject (_Note, attribValue)));
}
else else
{ {
super.setAttribute (attribName, attribValue); super.setAttribute (attribName, attribValue);
...@@ -3625,6 +3914,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3625,6 +3914,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return getWriteability_AssessmentCriteriaAnswers (); return getWriteability_AssessmentCriteriaAnswers ();
} }
else if (fieldName.equals (MULTIPLEREFERENCE_Notes))
{
return getWriteability_Notes ();
}
else if (fieldName.equals (SINGLEREFERENCE_Candidate)) else if (fieldName.equals (SINGLEREFERENCE_Candidate))
{ {
return getWriteability_Candidate (); return getWriteability_Candidate ();
...@@ -3657,6 +3950,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3657,6 +3950,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return getWriteability_FactorScoreDetails (); return getWriteability_FactorScoreDetails ();
} }
else if (fieldName.equals (FIELD_Note))
{
return getWriteability_Note ();
}
else if (fieldName.equals (SINGLEREFERENCE_WorkFlow)) else if (fieldName.equals (SINGLEREFERENCE_WorkFlow))
{ {
return getWriteability_WorkFlow (); return getWriteability_WorkFlow ();
...@@ -3736,6 +4033,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3736,6 +4033,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
fields.add (FIELD_FactorScoreDetails); fields.add (FIELD_FactorScoreDetails);
} }
if (getWriteability_Note () != FieldWriteability.TRUE)
{
fields.add (FIELD_Note);
}
super.putUnwriteable (fields); super.putUnwriteable (fields);
} }
...@@ -3758,6 +4060,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3758,6 +4060,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
result.add(HELPER_RequirementFit.getAttribObject (getClass (), _RequirementFit, false, FIELD_RequirementFit)); result.add(HELPER_RequirementFit.getAttribObject (getClass (), _RequirementFit, false, FIELD_RequirementFit));
result.add(HELPER_CultureFit.getAttribObject (getClass (), _CultureFit, false, FIELD_CultureFit)); result.add(HELPER_CultureFit.getAttribObject (getClass (), _CultureFit, false, FIELD_CultureFit));
result.add(HELPER_FactorScoreDetails.getAttribObject (getClass (), _FactorScoreDetails, false, FIELD_FactorScoreDetails)); result.add(HELPER_FactorScoreDetails.getAttribObject (getClass (), _FactorScoreDetails, false, FIELD_FactorScoreDetails));
result.add(HELPER_Note.getAttribObject (getClass (), _Note, false, FIELD_Note));
return result; return result;
} }
...@@ -4078,6 +4381,24 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -4078,6 +4381,24 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return newFactorScoreDetails; return newFactorScoreDetails;
} }
/**
* Get the attribute Note
*/
public String getNote (JobApplication obj, String original)
{
return original;
}
/**
* Change the value set for attribute Note.
* May modify the field beforehand
* Occurs before validation.
*/
public String setNote (JobApplication obj, String newNote) throws FieldException
{
return newNote;
}
} }
...@@ -4134,6 +4455,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -4134,6 +4455,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return toAssessmentCriteriaAnswers (); return toAssessmentCriteriaAnswers ();
} }
if (name.equals ("Notes"))
{
return toNotes ();
}
if (name.equals ("AppProcessOption")) if (name.equals ("AppProcessOption"))
{ {
return toAppProcessOption (); return toAppProcessOption ();
...@@ -4158,6 +4483,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -4158,6 +4483,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return toFactorScoreDetails (); return toFactorScoreDetails ();
} }
if (name.equals ("Note"))
{
return toNote ();
}
if (name.equals ("WorkFlow")) if (name.equals ("WorkFlow"))
{ {
return toWorkFlow (); return toWorkFlow ();
...@@ -4216,6 +4545,8 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -4216,6 +4545,8 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public PipeLine<From, Map> toFactorScoreDetails () { return pipe(new ORMAttributePipe<Me, Map>(FIELD_FactorScoreDetails)); } public PipeLine<From, Map> toFactorScoreDetails () { return pipe(new ORMAttributePipe<Me, Map>(FIELD_FactorScoreDetails)); }
public PipeLine<From, String> toNote () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Note)); }
public PipeLine<From, BinaryContent> toCV () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_CV)); } public PipeLine<From, BinaryContent> toCV () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_CV)); }
public PipeLine<From, BinaryContent> toCoverLetter () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_CoverLetter)); } public PipeLine<From, BinaryContent> toCoverLetter () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_CoverLetter)); }
...@@ -4253,6 +4584,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -4253,6 +4584,12 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer.new AssessmentCriteriaAnswerPipeLineFactory<From, AssessmentCriteriaAnswer> (this, new ORMMultiAssocPipe<Me, AssessmentCriteriaAnswer>(MULTIPLEREFERENCE_AssessmentCriteriaAnswers, filter)); return AssessmentCriteriaAnswer.REFERENCE_AssessmentCriteriaAnswer.new AssessmentCriteriaAnswerPipeLineFactory<From, AssessmentCriteriaAnswer> (this, new ORMMultiAssocPipe<Me, AssessmentCriteriaAnswer>(MULTIPLEREFERENCE_AssessmentCriteriaAnswers, filter));
} }
public Note.NotePipeLineFactory<From, Note> toNotes () { return toNotes(Filter.ALL); }
public Note.NotePipeLineFactory<From, Note> toNotes (Filter<Note> filter)
{
return Note.REFERENCE_Note.new NotePipeLineFactory<From, Note> (this, new ORMMultiAssocPipe<Me, Note>(MULTIPLEREFERENCE_Notes, filter));
}
} }
...@@ -4289,6 +4626,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -4289,6 +4626,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return true; return true;
} }
if(CollectionUtils.equals(attribName, "Note"))
{
return true;
}
return super.isTransientAttrib(attribName); return super.isTransientAttrib(attribName);
} }
...@@ -4378,6 +4720,23 @@ class DummyJobApplication extends JobApplication ...@@ -4378,6 +4720,23 @@ class DummyJobApplication extends JobApplication
return new TreeSet(); return new TreeSet();
} }
public int getNotesCount () throws StorageException
{
return 0;
}
public Note getNotesAt (int index) throws StorageException
{
throw new RuntimeException ("No elements in a dummy object in association Notes");
}
public SortedSet getNotesSet () throws StorageException
{
return new TreeSet();
}
} }
/*
* IMPORTANT!!!! XSL Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2 rev3 [oneit.objstore.BusinessObjectTemplate.xsl]
*
* Version: 1.0
* Vendor: Apache Software Foundation (Xalan XSLTC)
* Vendor URL: http://xml.apache.org/xalan-j
*/
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.attributes.*;
import oneit.objstore.rdbms.filters.*;
import oneit.objstore.parser.*;
import oneit.objstore.validator.*;
import oneit.objstore.utils.*;
import oneit.utils.*;
import oneit.utils.filter.Filter;
import oneit.utils.transform.*;
import oneit.utils.parsers.FieldException;
import oneit.security.*;
public abstract class BaseNote extends BaseBusinessClass
{
// Reference instance for the object
public static final Note REFERENCE_Note = new Note ();
// Reference instance for the object
public static final Note DUMMY_Note = new DummyNote ();
// Static constants corresponding to field names
public static final String FIELD_Comment = "Comment";
public static final String SINGLEREFERENCE_CreatedUser = "CreatedUser";
public static final String SINGLEREFERENCE_JobApplication = "JobApplication";
public static final String BACKREF_JobApplication = "";
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<Note> HELPER_Comment = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
private String _Comment;
// Private attributes corresponding to single references
private SingleAssociation<Note, CompanyUser> _CreatedUser;
private SingleAssociation<Note, JobApplication> _JobApplication;
// Private attributes corresponding to multiple references
// Map of maps of metadata
private static final Map ATTRIBUTES_METADATA_Note = new HashMap ();
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_Comment_Validators;
// Arrays of behaviour decorators
private static final NoteBehaviourDecorator[] Note_BehaviourDecorators;
static
{
try
{
String tmp_JobApplication = JobApplication.BACKREF_Notes;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_CreatedUser();
setupAssocMetaData_JobApplication();
FIELD_Comment_Validators = (AttributeValidator[])setupAttribMetaData_Comment(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_Note.initialiseReference ();
DUMMY_Note.initialiseReference ();
Note_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(Note.class).toArray(new NoteBehaviourDecorator[0]);
}
catch (RuntimeException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
throw e;
}
}
// Meta Info setup
private static void setupAssocMetaData_CreatedUser()
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "created_user_id");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "CreatedUser");
metaInfo.put ("type", "CompanyUser");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Note.CreatedUser:", metaInfo);
ATTRIBUTES_METADATA_Note.put (SINGLEREFERENCE_CreatedUser, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_JobApplication()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "Notes");
metaInfo.put ("dbcol", "job_application_id");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "JobApplication");
metaInfo.put ("type", "JobApplication");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Note.JobApplication:", metaInfo);
ATTRIBUTES_METADATA_Note.put (SINGLEREFERENCE_JobApplication, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_Comment(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "comment");
metaInfo.put ("length", "1000");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Comment");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Note.Comment:", metaInfo);
ATTRIBUTES_METADATA_Note.put (FIELD_Comment, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Note.class, "Comment", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Note.Comment:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
// This constructor should not be called
protected BaseNote ()
{
}
protected BBCBehaviourDecorator[] getBehaviours()
{
return Note_BehaviourDecorators;
}
// Initialise the attributes
protected void _initialiseNewObjAttributes (ObjectTransaction transaction) throws StorageException
{
super._initialiseNewObjAttributes (transaction);
_Comment = (String)(HELPER_Comment.initialise (_Comment));
}
// Initialise the associations
protected void _initialiseAssociations ()
{
super._initialiseAssociations ();
_CreatedUser = new SingleAssociation<Note, CompanyUser> (this, SINGLEREFERENCE_CreatedUser, null, CompanyUser.REFERENCE_CompanyUser, "tl_note");
_JobApplication = new SingleAssociation<Note, JobApplication> (this, SINGLEREFERENCE_JobApplication, JobApplication.MULTIPLEREFERENCE_Notes, JobApplication.REFERENCE_JobApplication, "tl_note");
}
// Initialise the associations
protected BaseBusinessClass initialiseReference ()
{
super.initialiseReference ();
_CreatedUser = new SingleAssociation<Note, CompanyUser> (this, SINGLEREFERENCE_CreatedUser, null, CompanyUser.REFERENCE_CompanyUser, "tl_note");
_JobApplication = new SingleAssociation<Note, JobApplication> (this, SINGLEREFERENCE_JobApplication, JobApplication.MULTIPLEREFERENCE_Notes, JobApplication.REFERENCE_JobApplication, "tl_note");
return this;
}
/**
* Get the attribute Comment
*/
public String getComment ()
{
assertValid();
String valToReturn = _Comment;
for (NoteBehaviourDecorator bhd : Note_BehaviourDecorators)
{
valToReturn = bhd.getComment ((Note)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preCommentChange (String newComment) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postCommentChange () throws FieldException
{
}
public FieldWriteability getWriteability_Comment ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Comment. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setComment (String newComment) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Comment.compare (_Comment, newComment);
try
{
for (NoteBehaviourDecorator bhd : Note_BehaviourDecorators)
{
newComment = bhd.setComment ((Note)this, newComment);
oldAndNewIdentical = HELPER_Comment.compare (_Comment, newComment);
}
BusinessObjectParser.assertFieldCondition (newComment != null, this, FIELD_Comment, "mandatory");
if (FIELD_Comment_Validators.length > 0)
{
Object newCommentObj = HELPER_Comment.toObject (newComment);
if (newCommentObj != null)
{
int loopMax = FIELD_Comment_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Note.get (FIELD_Comment);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Comment_Validators[v].checkAttribute (this, FIELD_Comment, metadata, newCommentObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Comment () != FieldWriteability.FALSE, "Field Comment is not writeable");
preCommentChange (newComment);
markFieldChange (FIELD_Comment);
_Comment = newComment;
postFieldChange (FIELD_Comment);
postCommentChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getSingleAssocs()
{
List result = super.getSingleAssocs ();
result.add("CreatedUser");
result.add("JobApplication");
return result;
}
public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_CreatedUser))
{
return _CreatedUser.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_JobApplication))
{
return _JobApplication.getReferencedType ();
}
else
{
return super.getSingleAssocReferenceInstance (assocName);
}
}
public String getSingleAssocBackReference(String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_CreatedUser))
{
return null ;
}else if (assocName.equals (SINGLEREFERENCE_JobApplication))
{
return JobApplication.MULTIPLEREFERENCE_Notes ;
}
else
{
return super.getSingleAssocBackReference (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_CreatedUser))
{
return getCreatedUser ();
}else if (assocName.equals (SINGLEREFERENCE_JobApplication))
{
return getJobApplication ();
}
else
{
return super.getSingleAssoc (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName, Get getType) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_CreatedUser))
{
return getCreatedUser (getType);
}else if (assocName.equals (SINGLEREFERENCE_JobApplication))
{
return getJobApplication (getType);
}
else
{
return super.getSingleAssoc (assocName, getType);
}
}
public Long getSingleAssocID (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_CreatedUser))
{
return getCreatedUserID ();
}else if (assocName.equals (SINGLEREFERENCE_JobApplication))
{
return getJobApplicationID ();
}
else
{
return super.getSingleAssocID (assocName);
}
}
public void setSingleAssoc (String assocName, BaseBusinessClass newValue) throws StorageException, FieldException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_CreatedUser))
{
setCreatedUser ((CompanyUser)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_JobApplication))
{
setJobApplication ((JobApplication)(newValue));
}
else
{
super.setSingleAssoc (assocName, newValue);
}
}
/**
* Get the reference CreatedUser
*/
public CompanyUser getCreatedUser () throws StorageException
{
assertValid();
try
{
return (CompanyUser)(_CreatedUser.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Note:", this.getObjectID (), ", was trying to get CompanyUser:", getCreatedUserID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _CreatedUser.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public CompanyUser getCreatedUser (Get getType) throws StorageException
{
assertValid();
return _CreatedUser.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getCreatedUserID ()
{
assertValid();
if (_CreatedUser == null)
{
return null;
}
else
{
return _CreatedUser.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preCreatedUserChange (CompanyUser newCreatedUser) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postCreatedUserChange () throws FieldException
{
}
public FieldWriteability getWriteability_CreatedUser ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference CreatedUser. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setCreatedUser (CompanyUser newCreatedUser) throws StorageException, FieldException
{
BusinessObjectParser.assertFieldCondition (newCreatedUser != null, this, SINGLEREFERENCE_CreatedUser, "mandatory");
if (_CreatedUser.wouldReferencedChange (newCreatedUser))
{
assertValid();
Debug.assertion (getWriteability_CreatedUser () != FieldWriteability.FALSE, "Assoc CreatedUser is not writeable");
preCreatedUserChange (newCreatedUser);
_CreatedUser.set (newCreatedUser);
postCreatedUserChange ();
}
}
/**
* Get the reference JobApplication
*/
public JobApplication getJobApplication () throws StorageException
{
assertValid();
try
{
return (JobApplication)(_JobApplication.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Note:", this.getObjectID (), ", was trying to get JobApplication:", getJobApplicationID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _JobApplication.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public JobApplication getJobApplication (Get getType) throws StorageException
{
assertValid();
return _JobApplication.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getJobApplicationID ()
{
assertValid();
if (_JobApplication == null)
{
return null;
}
else
{
return _JobApplication.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preJobApplicationChange (JobApplication newJobApplication) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postJobApplicationChange () throws FieldException
{
}
public FieldWriteability getWriteability_JobApplication ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference JobApplication. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setJobApplication (JobApplication newJobApplication) throws StorageException, FieldException
{
BusinessObjectParser.assertFieldCondition (newJobApplication != null, this, SINGLEREFERENCE_JobApplication, "mandatory");
if (_JobApplication.wouldReferencedChange (newJobApplication))
{
assertValid();
Debug.assertion (getWriteability_JobApplication () != FieldWriteability.FALSE, "Assoc JobApplication is not writeable");
preJobApplicationChange (newJobApplication);
JobApplication oldJobApplication = getJobApplication ();
if (oldJobApplication != null)
{
// This is to stop validation from triggering when we are removed
_JobApplication.set (null);
oldJobApplication.removeFromNotes ((Note)(this));
}
_JobApplication.set (newJobApplication);
if (newJobApplication != null)
{
newJobApplication.addToNotes ((Note)(this));
}
postJobApplicationChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getMultiAssocs()
{
List result = super.getMultiAssocs ();
return result;
}
/**
* Get the reference instance for the multi assoc name.
*/
public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
{
return super.getMultiAssocReferenceInstance(attribName);
}
public String getMultiAssocBackReference(String attribName)
{
return super.getMultiAssocBackReference(attribName);
}
/**
* Get the assoc count for the multi assoc name.
*/
public int getMultiAssocCount(String attribName) throws StorageException
{
return super.getMultiAssocCount(attribName);
}
/**
* Get the assoc at a particular index
*/
public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
{
return super.getMultiAssocAt(attribName, index);
}
/**
* Add to a multi assoc by attribute name
*/
public void addToMultiAssoc(String attribName, BaseBusinessClass newElement) throws StorageException
{
super.addToMultiAssoc(attribName, newElement);
}
/**
* Remove from a multi assoc by attribute name
*/
public void removeFromMultiAssoc(String attribName, BaseBusinessClass oldElement) throws StorageException
{
super.removeFromMultiAssoc(attribName, oldElement);
}
protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
{
super.__loadMultiAssoc(attribName, elements);
}
protected boolean __isMultiAssocLoaded (String attribName)
{
return super.__isMultiAssocLoaded(attribName);
}
public void onDelete ()
{
try
{
// Ensure we are removed from any loaded multi-associations that aren't mandatory
if (_JobApplication.isLoaded () || getTransaction ().isObjectLoaded (_JobApplication.getReferencedType (), getJobApplicationID ()))
{
JobApplication referenced = getJobApplication ();
if (referenced != null)
{
// Stop the callback
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Notes from ", getObjectID (), " to ", referenced.getObjectID ());
_JobApplication.set (null);
referenced.removeFromNotes ((Note)this);
}
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
super.onDelete ();
}
public Note newInstance ()
{
return new Note ();
}
public Note referenceInstance ()
{
return REFERENCE_Note;
}
public Note getInTransaction (ObjectTransaction t) throws StorageException
{
return getNoteByID (t, getObjectID());
}
public BaseBusinessClass dummyInstance ()
{
return DUMMY_Note;
}
public String getBaseSetName ()
{
return "tl_note";
}
/**
* This is where an object returns the Persistent sets that will
* store it into the database.
* The should be entered into allSets
*/
public void getPersistentSets (PersistentSetCollection allSets)
{
ObjectStatus myStatus = getStatus ();
PersistentSetStatus myPSetStatus = myStatus.getPSetStatus();
ObjectID myID = getID();
super.getPersistentSets (allSets);
PersistentSet tl_notePSet = allSets.getPersistentSet (myID, "tl_note", myPSetStatus);
tl_notePSet.setAttrib (FIELD_ObjectID, myID);
tl_notePSet.setAttrib (FIELD_Comment, HELPER_Comment.toObject (_Comment)); //
_CreatedUser.getPersistentSets (allSets);
_JobApplication.getPersistentSets (allSets);
}
/**
* Sets the objects state based on Persistent sets.
*/
public void setFromPersistentSets (ObjectID objectID, PersistentSetCollection allSets)
{
super.setFromPersistentSets (objectID, allSets);
PersistentSet tl_notePSet = allSets.getPersistentSet (objectID, "tl_note");
_Comment = (String)(HELPER_Comment.fromObject (_Comment, tl_notePSet.getAttrib (FIELD_Comment))); //
_CreatedUser.setFromPersistentSets (objectID, allSets);
_JobApplication.setFromPersistentSets (objectID, allSets);
}
public void setAttributesFrom (BaseBusinessClass other, MultiException e)
{
super.setAttributesFrom (other, e);
if (other instanceof Note)
{
Note otherNote = (Note)other;
try
{
setComment (otherNote.getComment ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
/**
* Set the attributes in this to copies of the attributes in source.
*/
public void copyAttributesFrom (BaseBusinessClass source)
{
super.copyAttributesFrom (source);
if (source instanceof BaseNote)
{
BaseNote sourceNote = (BaseNote)(source);
_Comment = sourceNote._Comment;
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copySingleAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copySingleAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseNote)
{
BaseNote sourceNote = (BaseNote)(source);
_CreatedUser.copyFrom (sourceNote._CreatedUser, linkToGhosts);
_JobApplication.copyFrom (sourceNote._JobApplication, linkToGhosts);
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copyAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copyAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseNote)
{
BaseNote sourceNote = (BaseNote)(source);
}
}
public void validate (ValidationContext context)
{
super.validate (context);
context.check (getCreatedUserID() != null, this, SINGLEREFERENCE_CreatedUser, "mandatory");
context.check (getJobApplicationID() != null, this, SINGLEREFERENCE_JobApplication, "mandatory");
}
/**
* Subclasses must override this to read in their attributes
*/
protected void readExternalData(Map<String, Object> vals) throws IOException, ClassNotFoundException
{
super.readExternalData(vals);
_Comment = (String)(HELPER_Comment.readExternal (_Comment, vals.get(FIELD_Comment))); //
_CreatedUser.readExternalData(vals.get(SINGLEREFERENCE_CreatedUser));
_JobApplication.readExternalData(vals.get(SINGLEREFERENCE_JobApplication));
}
/**
* Subclasses must override this to write out their attributes
*/
protected void writeExternalData(Map<String, Object> vals) throws IOException
{
super.writeExternalData(vals);
vals.put (FIELD_Comment, HELPER_Comment.writeExternal (_Comment));
vals.put (SINGLEREFERENCE_CreatedUser, _CreatedUser.writeExternalData());
vals.put (SINGLEREFERENCE_JobApplication, _JobApplication.writeExternalData());
}
public void compare (BaseBusinessClass other, AttributeChangeListener listener) throws StorageException
{
super.compare (other, listener);
if (other instanceof BaseNote)
{
BaseNote otherNote = (BaseNote)(other);
if (!HELPER_Comment.compare(this._Comment, otherNote._Comment))
{
listener.notifyFieldChange(this, other, FIELD_Comment, HELPER_Comment.toObject(this._Comment), HELPER_Comment.toObject(otherNote._Comment));
}
// Compare single assocs
_CreatedUser.compare (otherNote._CreatedUser, listener);
_JobApplication.compare (otherNote._JobApplication, listener);
// Compare multiple assocs
}
}
public void visitTransients (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
}
public void visitAttributes (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_Comment, HELPER_Comment.toObject(getComment()));
visitor.visitAssociation (_CreatedUser);
visitor.visitAssociation (_JobApplication);
}
public void visitAssociations (AssociationVisitor visitor, AssociatedScope scope) throws StorageException
{
super.visitAssociations (visitor, scope);
if (scope.includes (_CreatedUser))
{
visitor.visit (_CreatedUser);
}
if (scope.includes (_JobApplication))
{
visitor.visit (_JobApplication);
}
}
public static Note createNote (ObjectTransaction transaction) throws StorageException
{
Note result = new Note ();
result.initialiseNewObject (transaction);
return result;
}
public static Note getNoteByID (ObjectTransaction transaction, Long objectID) throws StorageException
{
return (Note)(transaction.getObjectByID (REFERENCE_Note, objectID));
}
public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Comment))
{
return filter.matches (getComment ());
}
else if (attribName.equals (SINGLEREFERENCE_CreatedUser))
{
return filter.matches (getCreatedUser ());
}
else if (attribName.equals (SINGLEREFERENCE_JobApplication))
{
return filter.matches (getJobApplication ());
}
else
{
return super.testFilter (attribName, filter);
}
}
public static SearchAll SearchByAll () { return new SearchAll (); }
public static class SearchAll extends SearchObject<Note>
{
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_note.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_note.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_note.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andComment (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_note.comment", "Comment");
return this;
}
public SearchAll andCreatedUser (QueryFilter<CompanyUser> filter)
{
filter.addFilter (context, "tl_note.created_user_id", "CreatedUser");
return this;
}
public SearchAll andJobApplication (QueryFilter<JobApplication> filter)
{
filter.addFilter (context, "tl_note.job_application_id", "JobApplication");
return this;
}
public Note[]
search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_Note, SEARCH_All, criteria);
Set<Note> typedResults = new LinkedHashSet <Note> ();
for (BaseBusinessClass bbcResult : results)
{
Note aResult = (Note)bbcResult;
typedResults.add (aResult);
}
return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new Note[0]);
}
}
public static Note[]
searchAll (ObjectTransaction transaction) throws StorageException
{
return SearchByAll ()
.search (transaction);
}
public Object getAttribute (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Comment))
{
return HELPER_Comment.toObject (getComment ());
}
else
{
return super.getAttribute (attribName);
}
}
public AttributeHelper getAttributeHelper (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Comment))
{
return HELPER_Comment;
}
else
{
return super.getAttributeHelper (attribName);
}
}
public void setAttribute (String attribName, Object attribValue) throws FieldException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Comment))
{
setComment ((String)(HELPER_Comment.fromObject (_Comment, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
}
}
public boolean isWriteable (String fieldName)
{
return getWriteable (fieldName) == FieldWriteability.TRUE;
}
public FieldWriteability getWriteable (String fieldName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (fieldName.equals (FIELD_Comment))
{
return getWriteability_Comment ();
}
else if (fieldName.equals (SINGLEREFERENCE_CreatedUser))
{
return getWriteability_CreatedUser ();
}
else if (fieldName.equals (SINGLEREFERENCE_JobApplication))
{
return getWriteability_JobApplication ();
}
else
{
return super.getWriteable (fieldName);
}
}
public void putUnwriteable (Set<String> fields)
{
if (getWriteability_Comment () != FieldWriteability.TRUE)
{
fields.add (FIELD_Comment);
}
super.putUnwriteable (fields);
}
public List<AbstractAttribute> getAttributes ()
{
List result = super.getAttributes ();
result.add(HELPER_Comment.getAttribObject (getClass (), _Comment, true, FIELD_Comment));
return result;
}
public Map getAttributeMetadata (String attribute)
{
if (ATTRIBUTES_METADATA_Note.containsKey (attribute))
{
return (Map)ATTRIBUTES_METADATA_Note.get (attribute);
}
else
{
return super.getAttributeMetadata (attribute);
}
}
public Object getAttributeMetadata (String attribute, String metadata)
{
if (ATTRIBUTES_METADATA_Note.containsKey (attribute))
{
return ((Map)ATTRIBUTES_METADATA_Note.get (attribute)).get(metadata);
}
else
{
return super.getAttributeMetadata (attribute, metadata);
}
}
public void preCommit (boolean willBeStored) throws Exception
{
super.preCommit(willBeStored);
if(willBeStored)
{
}
}
public oneit.servlets.objstore.binary.BinaryContentHandler getBinaryContentHandler(String attribName)
{
return super.getBinaryContentHandler(attribName);
}
public static class NoteBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<Note>
{
/**
* Get the attribute Comment
*/
public String getComment (Note obj, String original)
{
return original;
}
/**
* Change the value set for attribute Comment.
* May modify the field beforehand
* Occurs before validation.
*/
public String setComment (Note obj, String newComment) throws FieldException
{
return newComment;
}
}
public ORMPipeLine pipes()
{
return new NotePipeLineFactory<Note, Note> ((Note)this);
}
/**
* Use this instead of pipes() to get rid of type casting.
*/
public NotePipeLineFactory<Note, Note> pipelineNote()
{
return (NotePipeLineFactory<Note, Note>) pipes();
}
public static NotePipeLineFactory<Note, Note> pipesNote(Collection<Note> items)
{
return REFERENCE_Note.new NotePipeLineFactory<Note, Note> (items);
}
public static NotePipeLineFactory<Note, Note> pipesNote(Note[] _items)
{
return pipesNote(Arrays.asList (_items));
}
public static NotePipeLineFactory<Note, Note> pipesNote()
{
return pipesNote((Collection)null);
}
public class NotePipeLineFactory<From extends BaseBusinessClass, Me extends Note> extends BaseBusinessClass.ORMPipeLine<From, Me>
{
public <Prev> NotePipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
{
super (pipeLine, nextPipe);
}
public NotePipeLineFactory (From seed)
{
super(seed);
}
public NotePipeLineFactory (Collection<From> seed)
{
super(seed);
}
public PipeLine<From, ? extends Object> to(String name)
{
if (name.equals ("Comment"))
{
return toComment ();
}
if (name.equals ("CreatedUser"))
{
return toCreatedUser ();
}
if (name.equals ("JobApplication"))
{
return toJobApplication ();
}
return super.to(name);
}
public PipeLine<From, String> toComment () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Comment)); }
public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toCreatedUser () { return toCreatedUser (Filter.ALL); }
public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toCreatedUser (Filter<CompanyUser> filter)
{
return CompanyUser.REFERENCE_CompanyUser.new CompanyUserPipeLineFactory<From, CompanyUser> (this, new ORMSingleAssocPipe<Me, CompanyUser>(SINGLEREFERENCE_CreatedUser, filter));
}
public JobApplication.JobApplicationPipeLineFactory<From, JobApplication> toJobApplication () { return toJobApplication (Filter.ALL); }
public JobApplication.JobApplicationPipeLineFactory<From, JobApplication> toJobApplication (Filter<JobApplication> filter)
{
return JobApplication.REFERENCE_JobApplication.new JobApplicationPipeLineFactory<From, JobApplication> (this, new ORMSingleAssocPipe<Me, JobApplication>(SINGLEREFERENCE_JobApplication, filter));
}
}
public boolean isTransientAttrib(String attribName)
{
return super.isTransientAttrib(attribName);
}
public boolean isTransientSingleReference(String assocName)
{
return super.isTransientSingleReference(assocName);
}
}
class DummyNote extends Note
{
// Default constructor primarily to support Externalisable
public DummyNote()
{
super();
}
public void assertValid ()
{
}
public CompanyUser getCreatedUser () throws StorageException
{
return (CompanyUser)(CompanyUser.DUMMY_CompanyUser);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getCreatedUserID ()
{
return CompanyUser.DUMMY_CompanyUser.getObjectID();
}
public JobApplication getJobApplication () throws StorageException
{
return (JobApplication)(JobApplication.DUMMY_JobApplication);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getJobApplicationID ()
{
return JobApplication.DUMMY_JobApplication.getObjectID();
}
}
...@@ -43,6 +43,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -43,6 +43,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
public static final String FIELD_Code = "Code"; public static final String FIELD_Code = "Code";
public static final String FIELD_Name = "Name"; public static final String FIELD_Name = "Name";
public static final String FIELD_Level = "Level"; public static final String FIELD_Level = "Level";
public static final String FIELD_AssessmentType = "AssessmentType";
public static final String SINGLEREFERENCE_AssessmentLevel = "AssessmentLevel";
public static final String SINGLEREFERENCE_ParentOccupation = "ParentOccupation"; public static final String SINGLEREFERENCE_ParentOccupation = "ParentOccupation";
public static final String BACKREF_ParentOccupation = ""; public static final String BACKREF_ParentOccupation = "";
public static final String MULTIPLEREFERENCE_ChildOccupations = "ChildOccupations"; public static final String MULTIPLEREFERENCE_ChildOccupations = "ChildOccupations";
...@@ -56,15 +58,18 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -56,15 +58,18 @@ public abstract class BaseOccupation extends BaseBusinessClass
private static final DefaultAttributeHelper<Occupation> HELPER_Code = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Occupation> HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Occupation> HELPER_Name = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Occupation> HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<Occupation, OccupationLevel> HELPER_Level = new EnumeratedAttributeHelper<Occupation, OccupationLevel> (OccupationLevel.FACTORY_OccupationLevel); private static final EnumeratedAttributeHelper<Occupation, OccupationLevel> HELPER_Level = new EnumeratedAttributeHelper<Occupation, OccupationLevel> (OccupationLevel.FACTORY_OccupationLevel);
private static final EnumeratedAttributeHelper<Occupation, AssessmentType> HELPER_AssessmentType = new EnumeratedAttributeHelper<Occupation, AssessmentType> (AssessmentType.FACTORY_AssessmentType);
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String _Code; private String _Code;
private String _Name; private String _Name;
private OccupationLevel _Level; private OccupationLevel _Level;
private AssessmentType _AssessmentType;
// Private attributes corresponding to single references // Private attributes corresponding to single references
private SingleAssociation<Occupation, Level> _AssessmentLevel;
private SingleAssociation<Occupation, Occupation> _ParentOccupation; private SingleAssociation<Occupation, Occupation> _ParentOccupation;
...@@ -79,6 +84,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -79,6 +84,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
private static final AttributeValidator[] FIELD_Code_Validators; private static final AttributeValidator[] FIELD_Code_Validators;
private static final AttributeValidator[] FIELD_Name_Validators; private static final AttributeValidator[] FIELD_Name_Validators;
private static final AttributeValidator[] FIELD_Level_Validators; private static final AttributeValidator[] FIELD_Level_Validators;
private static final AttributeValidator[] FIELD_AssessmentType_Validators;
// Arrays of behaviour decorators // Arrays of behaviour decorators
...@@ -95,10 +101,12 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -95,10 +101,12 @@ public abstract class BaseOccupation extends BaseBusinessClass
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping")); Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_ChildOccupations(); setupAssocMetaData_ChildOccupations();
setupAssocMetaData_AssessmentLevel();
setupAssocMetaData_ParentOccupation(); setupAssocMetaData_ParentOccupation();
FIELD_Code_Validators = (AttributeValidator[])setupAttribMetaData_Code(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Code_Validators = (AttributeValidator[])setupAttribMetaData_Code(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Name_Validators = (AttributeValidator[])setupAttribMetaData_Name(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Name_Validators = (AttributeValidator[])setupAttribMetaData_Name(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Level_Validators = (AttributeValidator[])setupAttribMetaData_Level(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Level_Validators = (AttributeValidator[])setupAttribMetaData_Level(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_AssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_AssessmentType(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_Occupation.initialiseReference (); REFERENCE_Occupation.initialiseReference ();
...@@ -128,6 +136,20 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -128,6 +136,20 @@ public abstract class BaseOccupation extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static void setupAssocMetaData_AssessmentLevel()
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "assessment_level_id");
metaInfo.put ("name", "AssessmentLevel");
metaInfo.put ("type", "Level");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.AssessmentLevel:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (SINGLEREFERENCE_AssessmentLevel, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_ParentOccupation() private static void setupAssocMetaData_ParentOccupation()
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -203,6 +225,25 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -203,6 +225,25 @@ public abstract class BaseOccupation extends BaseBusinessClass
return validators; return validators;
} }
// Meta Info setup
private static List setupAttribMetaData_AssessmentType(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "assessment_type");
metaInfo.put ("name", "AssessmentType");
metaInfo.put ("type", "AssessmentType");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.AssessmentType:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (FIELD_AssessmentType, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Occupation.class, "AssessmentType", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Occupation.AssessmentType:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION // END OF STATIC METADATA DEFINITION
...@@ -233,6 +274,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -233,6 +274,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Code = (String)(HELPER_Code.initialise (_Code)); _Code = (String)(HELPER_Code.initialise (_Code));
_Name = (String)(HELPER_Name.initialise (_Name)); _Name = (String)(HELPER_Name.initialise (_Name));
_Level = (OccupationLevel)(HELPER_Level.initialise (_Level)); _Level = (OccupationLevel)(HELPER_Level.initialise (_Level));
_AssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (_AssessmentType));
} }
...@@ -241,6 +283,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -241,6 +283,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
super._initialiseAssociations (); super._initialiseAssociations ();
_AssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_AssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation");
_ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation"); _ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation");
_ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation); _ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation);
...@@ -252,6 +295,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -252,6 +295,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
super.initialiseReference (); super.initialiseReference ();
_AssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_AssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation");
_ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation"); _ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation");
_ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation); _ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation);
...@@ -558,6 +602,104 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -558,6 +602,104 @@ public abstract class BaseOccupation extends BaseBusinessClass
} }
} }
/**
* Get the attribute AssessmentType
*/
public AssessmentType getAssessmentType ()
{
assertValid();
AssessmentType valToReturn = _AssessmentType;
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
valToReturn = bhd.getAssessmentType ((Occupation)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preAssessmentTypeChange (AssessmentType newAssessmentType) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postAssessmentTypeChange () throws FieldException
{
}
public FieldWriteability getWriteability_AssessmentType ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute AssessmentType. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setAssessmentType (AssessmentType newAssessmentType) throws FieldException
{
boolean oldAndNewIdentical = HELPER_AssessmentType.compare (_AssessmentType, newAssessmentType);
try
{
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
newAssessmentType = bhd.setAssessmentType ((Occupation)this, newAssessmentType);
oldAndNewIdentical = HELPER_AssessmentType.compare (_AssessmentType, newAssessmentType);
}
if (FIELD_AssessmentType_Validators.length > 0)
{
Object newAssessmentTypeObj = HELPER_AssessmentType.toObject (newAssessmentType);
if (newAssessmentTypeObj != null)
{
int loopMax = FIELD_AssessmentType_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Occupation.get (FIELD_AssessmentType);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_AssessmentType_Validators[v].checkAttribute (this, FIELD_AssessmentType, metadata, newAssessmentTypeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_AssessmentType () != FieldWriteability.FALSE, "Field AssessmentType is not writeable");
preAssessmentTypeChange (newAssessmentType);
markFieldChange (FIELD_AssessmentType);
_AssessmentType = newAssessmentType;
postFieldChange (FIELD_AssessmentType);
postAssessmentTypeChange ();
}
}
/** /**
...@@ -568,6 +710,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -568,6 +710,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
List result = super.getSingleAssocs (); List result = super.getSingleAssocs ();
result.add("AssessmentLevel");
result.add("ParentOccupation"); result.add("ParentOccupation");
...@@ -581,7 +725,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -581,7 +725,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{
return _AssessmentLevel.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return _ParentOccupation.getReferencedType (); return _ParentOccupation.getReferencedType ();
} }
...@@ -598,7 +745,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -598,7 +745,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{
return null ;
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return Occupation.MULTIPLEREFERENCE_ChildOccupations ; return Occupation.MULTIPLEREFERENCE_ChildOccupations ;
} }
...@@ -615,7 +765,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -615,7 +765,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{
return getAssessmentLevel ();
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getParentOccupation (); return getParentOccupation ();
} }
...@@ -632,7 +785,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -632,7 +785,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{
return getAssessmentLevel (getType);
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getParentOccupation (getType); return getParentOccupation (getType);
} }
...@@ -649,7 +805,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -649,7 +805,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{
return getAssessmentLevelID ();
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getParentOccupationID (); return getParentOccupationID ();
} }
...@@ -666,7 +825,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -666,7 +825,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{
setAssessmentLevel ((Level)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
setParentOccupation ((Occupation)(newValue)); setParentOccupation ((Occupation)(newValue));
} }
...@@ -679,6 +841,100 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -679,6 +841,100 @@ public abstract class BaseOccupation extends BaseBusinessClass
/** /**
* Get the reference AssessmentLevel
*/
public Level getAssessmentLevel () throws StorageException
{
assertValid();
try
{
return (Level)(_AssessmentLevel.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Occupation:", this.getObjectID (), ", was trying to get Level:", getAssessmentLevelID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _AssessmentLevel.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Level getAssessmentLevel (Get getType) throws StorageException
{
assertValid();
return _AssessmentLevel.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getAssessmentLevelID ()
{
assertValid();
if (_AssessmentLevel == null)
{
return null;
}
else
{
return _AssessmentLevel.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preAssessmentLevelChange (Level newAssessmentLevel) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postAssessmentLevelChange () throws FieldException
{
}
public FieldWriteability getWriteability_AssessmentLevel ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference AssessmentLevel. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setAssessmentLevel (Level newAssessmentLevel) throws StorageException, FieldException
{
if (_AssessmentLevel.wouldReferencedChange (newAssessmentLevel))
{
assertValid();
Debug.assertion (getWriteability_AssessmentLevel () != FieldWriteability.FALSE, "Assoc AssessmentLevel is not writeable");
preAssessmentLevelChange (newAssessmentLevel);
_AssessmentLevel.set (newAssessmentLevel);
postAssessmentLevelChange ();
}
}
/**
* Get the reference ParentOccupation * Get the reference ParentOccupation
*/ */
public Occupation getParentOccupation () throws StorageException public Occupation getParentOccupation () throws StorageException
...@@ -1082,6 +1338,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1082,6 +1338,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
tl_occupationPSet.setAttrib (FIELD_Code, HELPER_Code.toObject (_Code)); // tl_occupationPSet.setAttrib (FIELD_Code, HELPER_Code.toObject (_Code)); //
tl_occupationPSet.setAttrib (FIELD_Name, HELPER_Name.toObject (_Name)); // tl_occupationPSet.setAttrib (FIELD_Name, HELPER_Name.toObject (_Name)); //
tl_occupationPSet.setAttrib (FIELD_Level, HELPER_Level.toObject (_Level)); // tl_occupationPSet.setAttrib (FIELD_Level, HELPER_Level.toObject (_Level)); //
tl_occupationPSet.setAttrib (FIELD_AssessmentType, HELPER_AssessmentType.toObject (_AssessmentType)); //
_AssessmentLevel.getPersistentSets (allSets);
_ParentOccupation.getPersistentSets (allSets); _ParentOccupation.getPersistentSets (allSets);
} }
...@@ -1100,6 +1358,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1100,6 +1358,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Code = (String)(HELPER_Code.fromObject (_Code, tl_occupationPSet.getAttrib (FIELD_Code))); // _Code = (String)(HELPER_Code.fromObject (_Code, tl_occupationPSet.getAttrib (FIELD_Code))); //
_Name = (String)(HELPER_Name.fromObject (_Name, tl_occupationPSet.getAttrib (FIELD_Name))); // _Name = (String)(HELPER_Name.fromObject (_Name, tl_occupationPSet.getAttrib (FIELD_Name))); //
_Level = (OccupationLevel)(HELPER_Level.fromObject (_Level, tl_occupationPSet.getAttrib (FIELD_Level))); // _Level = (OccupationLevel)(HELPER_Level.fromObject (_Level, tl_occupationPSet.getAttrib (FIELD_Level))); //
_AssessmentType = (AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, tl_occupationPSet.getAttrib (FIELD_AssessmentType))); //
_AssessmentLevel.setFromPersistentSets (objectID, allSets);
_ParentOccupation.setFromPersistentSets (objectID, allSets); _ParentOccupation.setFromPersistentSets (objectID, allSets);
} }
...@@ -1143,6 +1403,15 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1143,6 +1403,15 @@ public abstract class BaseOccupation extends BaseBusinessClass
e.addException (ex); e.addException (ex);
} }
try
{
setAssessmentType (otherOccupation.getAssessmentType ());
}
catch (FieldException ex)
{
e.addException (ex);
}
} }
} }
...@@ -1161,6 +1430,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1161,6 +1430,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Code = sourceOccupation._Code; _Code = sourceOccupation._Code;
_Name = sourceOccupation._Name; _Name = sourceOccupation._Name;
_Level = sourceOccupation._Level; _Level = sourceOccupation._Level;
_AssessmentType = sourceOccupation._AssessmentType;
} }
} }
...@@ -1177,6 +1447,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1177,6 +1447,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
BaseOccupation sourceOccupation = (BaseOccupation)(source); BaseOccupation sourceOccupation = (BaseOccupation)(source);
_AssessmentLevel.copyFrom (sourceOccupation._AssessmentLevel, linkToGhosts);
_ParentOccupation.copyFrom (sourceOccupation._ParentOccupation, linkToGhosts); _ParentOccupation.copyFrom (sourceOccupation._ParentOccupation, linkToGhosts);
} }
...@@ -1218,6 +1489,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1218,6 +1489,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Code = (String)(HELPER_Code.readExternal (_Code, vals.get(FIELD_Code))); // _Code = (String)(HELPER_Code.readExternal (_Code, vals.get(FIELD_Code))); //
_Name = (String)(HELPER_Name.readExternal (_Name, vals.get(FIELD_Name))); // _Name = (String)(HELPER_Name.readExternal (_Name, vals.get(FIELD_Name))); //
_Level = (OccupationLevel)(HELPER_Level.readExternal (_Level, vals.get(FIELD_Level))); // _Level = (OccupationLevel)(HELPER_Level.readExternal (_Level, vals.get(FIELD_Level))); //
_AssessmentType = (AssessmentType)(HELPER_AssessmentType.readExternal (_AssessmentType, vals.get(FIELD_AssessmentType))); //
_AssessmentLevel.readExternalData(vals.get(SINGLEREFERENCE_AssessmentLevel));
_ParentOccupation.readExternalData(vals.get(SINGLEREFERENCE_ParentOccupation)); _ParentOccupation.readExternalData(vals.get(SINGLEREFERENCE_ParentOccupation));
_ChildOccupations.readExternalData(vals.get(MULTIPLEREFERENCE_ChildOccupations)); _ChildOccupations.readExternalData(vals.get(MULTIPLEREFERENCE_ChildOccupations));
...@@ -1234,6 +1507,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1234,6 +1507,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
vals.put (FIELD_Code, HELPER_Code.writeExternal (_Code)); vals.put (FIELD_Code, HELPER_Code.writeExternal (_Code));
vals.put (FIELD_Name, HELPER_Name.writeExternal (_Name)); vals.put (FIELD_Name, HELPER_Name.writeExternal (_Name));
vals.put (FIELD_Level, HELPER_Level.writeExternal (_Level)); vals.put (FIELD_Level, HELPER_Level.writeExternal (_Level));
vals.put (FIELD_AssessmentType, HELPER_AssessmentType.writeExternal (_AssessmentType));
vals.put (SINGLEREFERENCE_AssessmentLevel, _AssessmentLevel.writeExternalData());
vals.put (SINGLEREFERENCE_ParentOccupation, _ParentOccupation.writeExternalData()); vals.put (SINGLEREFERENCE_ParentOccupation, _ParentOccupation.writeExternalData());
vals.put (MULTIPLEREFERENCE_ChildOccupations, _ChildOccupations.writeExternalData()); vals.put (MULTIPLEREFERENCE_ChildOccupations, _ChildOccupations.writeExternalData());
...@@ -1261,8 +1536,13 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1261,8 +1536,13 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
listener.notifyFieldChange(this, other, FIELD_Level, HELPER_Level.toObject(this._Level), HELPER_Level.toObject(otherOccupation._Level)); listener.notifyFieldChange(this, other, FIELD_Level, HELPER_Level.toObject(this._Level), HELPER_Level.toObject(otherOccupation._Level));
} }
if (!HELPER_AssessmentType.compare(this._AssessmentType, otherOccupation._AssessmentType))
{
listener.notifyFieldChange(this, other, FIELD_AssessmentType, HELPER_AssessmentType.toObject(this._AssessmentType), HELPER_AssessmentType.toObject(otherOccupation._AssessmentType));
}
// Compare single assocs // Compare single assocs
_AssessmentLevel.compare (otherOccupation._AssessmentLevel, listener);
_ParentOccupation.compare (otherOccupation._ParentOccupation, listener); _ParentOccupation.compare (otherOccupation._ParentOccupation, listener);
...@@ -1288,6 +1568,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1288,6 +1568,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
visitor.visitField(this, FIELD_Code, HELPER_Code.toObject(getCode())); visitor.visitField(this, FIELD_Code, HELPER_Code.toObject(getCode()));
visitor.visitField(this, FIELD_Name, HELPER_Name.toObject(getName())); visitor.visitField(this, FIELD_Name, HELPER_Name.toObject(getName()));
visitor.visitField(this, FIELD_Level, HELPER_Level.toObject(getLevel())); visitor.visitField(this, FIELD_Level, HELPER_Level.toObject(getLevel()));
visitor.visitField(this, FIELD_AssessmentType, HELPER_AssessmentType.toObject(getAssessmentType()));
visitor.visitAssociation (_AssessmentLevel);
visitor.visitAssociation (_ParentOccupation); visitor.visitAssociation (_ParentOccupation);
visitor.visitAssociation (_ChildOccupations); visitor.visitAssociation (_ChildOccupations);
...@@ -1298,6 +1580,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1298,6 +1580,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
super.visitAssociations (visitor, scope); super.visitAssociations (visitor, scope);
if (scope.includes (_AssessmentLevel))
{
visitor.visit (_AssessmentLevel);
}
if (scope.includes (_ParentOccupation)) if (scope.includes (_ParentOccupation))
{ {
visitor.visit (_ParentOccupation); visitor.visit (_ParentOccupation);
...@@ -1343,6 +1629,14 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1343,6 +1629,14 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return filter.matches (getLevel ()); return filter.matches (getLevel ());
} }
else if (attribName.equals (FIELD_AssessmentType))
{
return filter.matches (getAssessmentType ());
}
else if (attribName.equals (SINGLEREFERENCE_AssessmentLevel))
{
return filter.matches (getAssessmentLevel ());
}
else if (attribName.equals (SINGLEREFERENCE_ParentOccupation)) else if (attribName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return filter.matches (getParentOccupation ()); return filter.matches (getParentOccupation ());
...@@ -1396,6 +1690,18 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1396,6 +1690,18 @@ public abstract class BaseOccupation extends BaseBusinessClass
return this; return this;
} }
public SearchAll andAssessmentType (QueryFilter<AssessmentType> filter)
{
filter.addFilter (context, "tl_occupation.assessment_type", "AssessmentType");
return this;
}
public SearchAll andAssessmentLevel (QueryFilter<Level> filter)
{
filter.addFilter (context, "tl_occupation.assessment_level_id", "AssessmentLevel");
return this;
}
public SearchAll andParentOccupation (QueryFilter<Occupation> filter) public SearchAll andParentOccupation (QueryFilter<Occupation> filter)
{ {
filter.addFilter (context, "tl_occupation.parent_occupation_id", "ParentOccupation"); filter.addFilter (context, "tl_occupation.parent_occupation_id", "ParentOccupation");
...@@ -1449,6 +1755,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1449,6 +1755,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return HELPER_Level.toObject (getLevel ()); return HELPER_Level.toObject (getLevel ());
} }
else if (attribName.equals (FIELD_AssessmentType))
{
return HELPER_AssessmentType.toObject (getAssessmentType ());
}
else else
{ {
return super.getAttribute (attribName); return super.getAttribute (attribName);
...@@ -1474,6 +1784,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1474,6 +1784,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return HELPER_Level; return HELPER_Level;
} }
else if (attribName.equals (FIELD_AssessmentType))
{
return HELPER_AssessmentType;
}
else else
{ {
return super.getAttributeHelper (attribName); return super.getAttributeHelper (attribName);
...@@ -1499,6 +1813,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1499,6 +1813,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
setLevel ((OccupationLevel)(HELPER_Level.fromObject (_Level, attribValue))); setLevel ((OccupationLevel)(HELPER_Level.fromObject (_Level, attribValue)));
} }
else if (attribName.equals (FIELD_AssessmentType))
{
setAssessmentType ((AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, attribValue)));
}
else else
{ {
super.setAttribute (attribName, attribValue); super.setAttribute (attribName, attribValue);
...@@ -1531,10 +1849,18 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1531,10 +1849,18 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return getWriteability_Level (); return getWriteability_Level ();
} }
else if (fieldName.equals (FIELD_AssessmentType))
{
return getWriteability_AssessmentType ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_ChildOccupations)) else if (fieldName.equals (MULTIPLEREFERENCE_ChildOccupations))
{ {
return getWriteability_ChildOccupations (); return getWriteability_ChildOccupations ();
} }
else if (fieldName.equals (SINGLEREFERENCE_AssessmentLevel))
{
return getWriteability_AssessmentLevel ();
}
else if (fieldName.equals (SINGLEREFERENCE_ParentOccupation)) else if (fieldName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getWriteability_ParentOccupation (); return getWriteability_ParentOccupation ();
...@@ -1564,6 +1890,11 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1564,6 +1890,11 @@ public abstract class BaseOccupation extends BaseBusinessClass
fields.add (FIELD_Level); fields.add (FIELD_Level);
} }
if (getWriteability_AssessmentType () != FieldWriteability.TRUE)
{
fields.add (FIELD_AssessmentType);
}
super.putUnwriteable (fields); super.putUnwriteable (fields);
} }
...@@ -1576,6 +1907,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1576,6 +1907,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
result.add(HELPER_Code.getAttribObject (getClass (), _Code, true, FIELD_Code)); result.add(HELPER_Code.getAttribObject (getClass (), _Code, true, FIELD_Code));
result.add(HELPER_Name.getAttribObject (getClass (), _Name, true, FIELD_Name)); result.add(HELPER_Name.getAttribObject (getClass (), _Name, true, FIELD_Name));
result.add(HELPER_Level.getAttribObject (getClass (), _Level, true, FIELD_Level)); result.add(HELPER_Level.getAttribObject (getClass (), _Level, true, FIELD_Level));
result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, false, FIELD_AssessmentType));
return result; return result;
} }
...@@ -1680,6 +2012,24 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1680,6 +2012,24 @@ public abstract class BaseOccupation extends BaseBusinessClass
return newLevel; return newLevel;
} }
/**
* Get the attribute AssessmentType
*/
public AssessmentType getAssessmentType (Occupation obj, AssessmentType original)
{
return original;
}
/**
* Change the value set for attribute AssessmentType.
* May modify the field beforehand
* Occurs before validation.
*/
public AssessmentType setAssessmentType (Occupation obj, AssessmentType newAssessmentType) throws FieldException
{
return newAssessmentType;
}
} }
...@@ -1748,6 +2098,14 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1748,6 +2098,14 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return toLevel (); return toLevel ();
} }
if (name.equals ("AssessmentType"))
{
return toAssessmentType ();
}
if (name.equals ("AssessmentLevel"))
{
return toAssessmentLevel ();
}
if (name.equals ("ParentOccupation")) if (name.equals ("ParentOccupation"))
{ {
return toParentOccupation (); return toParentOccupation ();
...@@ -1763,6 +2121,14 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1763,6 +2121,14 @@ public abstract class BaseOccupation extends BaseBusinessClass
public PipeLine<From, String> toName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Name)); } public PipeLine<From, String> toName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Name)); }
public PipeLine<From, OccupationLevel> toLevel () { return pipe(new ORMAttributePipe<Me, OccupationLevel>(FIELD_Level)); } public PipeLine<From, OccupationLevel> toLevel () { return pipe(new ORMAttributePipe<Me, OccupationLevel>(FIELD_Level)); }
public PipeLine<From, AssessmentType> toAssessmentType () { return pipe(new ORMAttributePipe<Me, AssessmentType>(FIELD_AssessmentType)); }
public Level.LevelPipeLineFactory<From, Level> toAssessmentLevel () { return toAssessmentLevel (Filter.ALL); }
public Level.LevelPipeLineFactory<From, Level> toAssessmentLevel (Filter<Level> filter)
{
return Level.REFERENCE_Level.new LevelPipeLineFactory<From, Level> (this, new ORMSingleAssocPipe<Me, Level>(SINGLEREFERENCE_AssessmentLevel, filter));
}
public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation () { return toParentOccupation (Filter.ALL); } public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation () { return toParentOccupation (Filter.ALL); }
public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation (Filter<Occupation> filter) public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation (Filter<Occupation> filter)
...@@ -1806,6 +2172,20 @@ class DummyOccupation extends Occupation ...@@ -1806,6 +2172,20 @@ class DummyOccupation extends Occupation
} }
public Level getAssessmentLevel () throws StorageException
{
return (Level)(Level.DUMMY_Level);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getAssessmentLevelID ()
{
return Level.DUMMY_Level.getObjectID();
}
public Occupation getParentOccupation () throws StorageException public Occupation getParentOccupation () throws StorageException
{ {
return (Occupation)(Occupation.DUMMY_Occupation); return (Occupation)(Occupation.DUMMY_Occupation);
......
...@@ -313,10 +313,19 @@ public class Job extends BaseJob ...@@ -313,10 +313,19 @@ public class Job extends BaseJob
{ {
CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser); CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser);
return AssessmentCriteriaTemplate.SearchByAll() AssessmentCriteriaTemplate.SearchAll search = AssessmentCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(getHiringTeam())) .andHiringTeam(new EqualsFilter<>(getHiringTeam()))
.andCompanyUser(new EqualsFilter<>(companyUser)) .andCompanyUser(new EqualsFilter<>(companyUser));
.search(getTransaction()); if(getHiringTeam().showHasClientSupport() && getClient() != null)
{
search = search.andClient(new EqualsFilter<>(getClient()));
}
else
{
search = search.andClient(new IsNullFilter<>());
}
return search.search(getTransaction());
} }
...@@ -324,10 +333,20 @@ public class Job extends BaseJob ...@@ -324,10 +333,20 @@ public class Job extends BaseJob
{ {
CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser); CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser);
return CultureCriteriaTemplate.SearchByAll() CultureCriteriaTemplate.SearchAll search = CultureCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(getHiringTeam())) .andHiringTeam(new EqualsFilter<>(getHiringTeam()))
.andCompanyUser(new EqualsFilter<>(companyUser)) .andCompanyUser(new EqualsFilter<>(companyUser));
.search(getTransaction());
if(getHiringTeam().showHasClientSupport() && getClient() != null)
{
search = search.andClient(new EqualsFilter<>(getClient()));
}
else
{
search = search.andClient(new IsNullFilter<>());
}
return search.search(getTransaction());
} }
...@@ -686,10 +705,13 @@ public class Job extends BaseJob ...@@ -686,10 +705,13 @@ public class Job extends BaseJob
return filteredList; return filteredList;
} }
// templates disabled for sprint 1 public String getTemplateClass(boolean isTeamplate)
@Override
public FieldWriteability getWriteability_JobTemplate()
{ {
return FieldWriteability.NOT_IN_GUI; StringBuilder sb = new StringBuilder("create-job-selector rectangle-4");
sb.append(getHiringTeam().showHasClientSupport() ? " special" : "");
sb.append((isTeamplate && isTrue(getFromTemplate())) || (!isTeamplate && isFalse(getFromTemplate())) ? " checked" : "");
return sb.toString();
} }
} }
\ No newline at end of file
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<ATTRIB name="ExpectedCandidateRadius" type="LocationRadius" dbcol="location_radius" defaultValue="LocationRadius.KM100" attribHelper="EnumeratedAttributeHelper" mandatory="true"/> <ATTRIB name="ExpectedCandidateRadius" type="LocationRadius" dbcol="location_radius" defaultValue="LocationRadius.KM100" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="State" type="State" dbcol="state" defaultValue="State.WA" attribHelper="EnumeratedAttributeHelper"/> <ATTRIB name="State" type="State" dbcol="state" defaultValue="State.WA" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Country" type="Countries" dbcol="country" defaultValue="Countries.AU" attribHelper="EnumeratedAttributeHelper"/> <ATTRIB name="Country" type="Countries" dbcol="country" defaultValue="Countries.AU" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="RequireCV" type="Boolean" dbcol="require_cv" defaultValue="Boolean.FALSE"/> <ATTRIB name="RequireCV" type="Boolean" dbcol="require_cv" defaultValue="Boolean.TRUE"/>
<ATTRIB name="IsManuallyClosed" type="Boolean" dbcol="manually_closed" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsManuallyClosed" type="Boolean" dbcol="manually_closed" defaultValue="Boolean.FALSE"/>
<ATTRIB name="LastEdited" type="Date" dbcol="last_edited" /> <ATTRIB name="LastEdited" type="Date" dbcol="last_edited" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.FALSE"/>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<IMPORT value="performa.orm.types.*"/> <IMPORT value="performa.orm.types.*"/>
<MULTIPLEREFERENCE name="AssessmentCriteriaAnswers" type="AssessmentCriteriaAnswer" backreferenceName="JobApplication" /> <MULTIPLEREFERENCE name="AssessmentCriteriaAnswers" type="AssessmentCriteriaAnswer" backreferenceName="JobApplication" />
<MULTIPLEREFERENCE name="Notes" type="Note" backreferenceName="JobApplication" />
<TRANSIENT name="AppProcessOption" type="AppProcessOption" attribHelper="EnumeratedAttributeHelper"/> <TRANSIENT name="AppProcessOption" type="AppProcessOption" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="OverallRank" type="Integer" /> <TRANSIENT name="OverallRank" type="Integer" />
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
<TRANSIENT name="RequirementFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/> <TRANSIENT name="RequirementFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="CultureFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/> <TRANSIENT name="CultureFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="FactorScoreDetails" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/> <TRANSIENT name="FactorScoreDetails" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="Note" type="String" />
<TRANSIENTSINGLE name="WorkFlow" type="WorkFlow" /> <TRANSIENTSINGLE name="WorkFlow" type="WorkFlow" />
......
package performa.orm;
public class Note extends BaseNote
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public Note ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
\ No newline at end of file
<?xml version="1.0"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="Note" package="performa.orm">
<IMPORT value="oneit.security.*"/>
<TABLE name="tl_note" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Comment" type="String" dbcol="comment" length="1000" mandatory="true"/>
<SINGLEREFERENCE name="CreatedUser" type="CompanyUser" dbcol="created_user_id" mandatory="true" />
<SINGLEREFERENCE name="JobApplication" type="JobApplication" dbcol="job_application_id" mandatory="true" backreferenceName="Notes"/>
</TABLE>
<SEARCH type="All" paramFilter="object_id is not null"/>
</BUSINESSCLASS>
</ROOT>
package performa.orm;
import java.io.*;
import java.util.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.rdbms.*;
import oneit.objstore.utils.*;
import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import oneit.security.*;
/**
* IMPORTANT!!!! Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2[oneit.objstore.PersistenceMgrTemplate.xsl]
*/
public class NotePersistenceMgr extends ObjectPersistenceMgr
{
private static final LoggingArea NotePersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "Note");
// Private attributes corresponding to business object data
private String dummyComment;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Comment = DefaultAttributeHelper.INSTANCE;
public NotePersistenceMgr ()
{
dummyComment = (String)(HELPER_Comment.initialise (dummyComment));
}
private String SELECT_COLUMNS = "{PREFIX}tl_note.object_id as id, {PREFIX}tl_note.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_note.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_note.comment, {PREFIX}tl_note.created_user_id, {PREFIX}tl_note.job_application_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> resultByIDs = fetchByIDs(Collections.singleton (id), allPSets, context, sqlMgr);
if (resultByIDs.isEmpty ())
{
return null;
}
else if (resultByIDs.size () > 1)
{
throw new StorageException ("Multiple results for id:" + id);
}
else
{
return resultByIDs.iterator ().next ();
}
}
public Set<BaseBusinessClass> fetchByIDs(Set<ObjectID> ids, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> results = new HashSet ();
Set<Long> idsToFetch = new HashSet ();
for (ObjectID id : ids)
{
if (context.containsObject(id)) // Check for cached version
{
BaseBusinessClass objectToReturn = context.getObjectToReplace(id, Note.REFERENCE_Note);
if (objectToReturn instanceof Note)
{
LogMgr.log (NotePersistence, LogLevel.TRACE, "Cache hit for id:", id);
results.add (objectToReturn);
}
else
{
throw new StorageException ("Cache collision for id:" + id + " with object " + objectToReturn + "while fetching a Note");
}
}
PersistentSet tl_notePSet = allPSets.getPersistentSet(id, "tl_note", PersistentSetStatus.FETCHED);
// Check for persistent sets already prefetched
if (false || !tl_notePSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_notePSet.containsAttrib(Note.FIELD_Comment)||
!tl_notePSet.containsAttrib(Note.SINGLEREFERENCE_CreatedUser)||
!tl_notePSet.containsAttrib(Note.SINGLEREFERENCE_JobApplication))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
}
else
{
LogMgr.log (NotePersistence, LogLevel.DEBUG2, "Persistent set preloaded id:", id);
/* Non Polymorphic */
Note result = new Note ();
result.setFromPersistentSets(id, allPSets);
context.addRetrievedObject(result);
results.add (result);
}
}
if (idsToFetch.size () > 0)
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_note " +
"WHERE " + SELECT_JOINS + "{PREFIX}tl_note.object_id IN ?";
BaseBusinessClass[] resultsFetched = loadQuery (allPSets, sqlMgr, context, query, new Object[] { idsToFetch }, null, false);
for (BaseBusinessClass objFetched : resultsFetched)
{
results.add (objFetched);
}
}
return results;
}
public BaseBusinessClass[] getReferencedObjects(ObjectID _objectID, String refName, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
if (false)
{
throw new RuntimeException ();
}
else if (refName.equals (Note.SINGLEREFERENCE_JobApplication))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_note " +
"WHERE " + SELECT_JOINS + "job_application_id = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
}
}
public void update(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
EqualityResult test = EqualityResult.compare (obj, obj.getBackup ());
ObjectID objectID = obj.getID ();
if (!test.areAttributesEqual () || !test.areSingleAssocsEqual () || obj.getForcedSave())
{
PersistentSet tl_notePSet = allPSets.getPersistentSet(objectID, "tl_note");
if (tl_notePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_notePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_note " +
"SET comment = ?, created_user_id = ? , job_application_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_note.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Comment.getForSQL(dummyComment, tl_notePSet.getAttrib (Note.FIELD_Comment))).listEntry (SQLManager.CheckNull((Long)(tl_notePSet.getAttrib (Note.SINGLEREFERENCE_CreatedUser)))).listEntry (SQLManager.CheckNull((Long)(tl_notePSet.getAttrib (Note.SINGLEREFERENCE_JobApplication)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id, object_LAST_UPDATED_DATE FROM {PREFIX}tl_note WHERE object_id = ?",
new Object[] { objectID.longID () });
if (r.next ())
{
Date d = new java.util.Date (r.getTimestamp (2).getTime());
String errorMsg = QueryBuilder.buildQueryString ("Concurrent update error:[?] for row:[?] objDate:[?] dbDate:[?]",
new Object[] { "tl_note", objectID.longID (), obj.getObjectLastModified (), d },
sqlMgr.getPortabilityServices ());
LogMgr.log (NotePersistence, LogLevel.BUSINESS1, errorMsg);
throw new ConcurrentUpdateConflictException (obj, "tl_note");
}
else
{
String errorMsg = "Attempt to update nonexistent row in table:tl_note for row:" + objectID + " objDate:" + obj.getObjectLastModified ();
LogMgr.log (NotePersistence, LogLevel.BUSINESS1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_notePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
else
{
LogMgr.log (NotePersistence, LogLevel.DEBUG1, "Skipping update since no attribs or simple assocs changed on ", objectID);
}
}
public void delete(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_notePSet = allPSets.getPersistentSet(objectID, "tl_note");
LogMgr.log (NotePersistence, LogLevel.DEBUG2, "Deleting:", objectID);
if (tl_notePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_notePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsDeleted = executeStatement (sqlMgr,
"DELETE " +
"FROM {PREFIX}tl_note " +
"WHERE tl_note.object_id = ? AND " + sqlMgr.getPortabilityServices ().getTruncatedTimestampColumn ("object_LAST_UPDATED_DATE") + " = " + sqlMgr.getPortabilityServices ().getTruncatedTimestampParam("?") + " ",
new Object[] { objectID.longID(), obj.getObjectLastModified () });
if (rowsDeleted != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id FROM {PREFIX}tl_note WHERE object_id = ?",
new Object[] { objectID.longID() });
if (r.next ())
{
throw new ConcurrentUpdateConflictException (obj, "tl_note");
}
else
{
String errorMsg = "Attempt to delete nonexistent row in table:tl_note for row:" + objectID;
LogMgr.log (NotePersistence, LogLevel.SYSTEMERROR1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_notePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
public ResultSet executeSearchQueryAll (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public BaseBusinessClass[] loadQuery (PersistentSetCollection allPSets, SQLManager sqlMgr, RDBMSPersistenceContext context, String query, Object[] params, Integer maxRows, boolean truncateExtra) throws SQLException, StorageException
{
LinkedHashMap<ObjectID, Note> results = new LinkedHashMap ();
ResultSet r = executeQuery (sqlMgr, query, params);
while (r.next())
{
ThreadUtils.checkInterrupted ();
ObjectID objectID = new ObjectID (Note.REFERENCE_Note.getObjectIDSpace (), r.getLong ("id"));
Note resultElement;
if (maxRows != null && !results.containsKey (objectID) && results.size () >= maxRows)
{
if (truncateExtra)
{
break;
}
else
{
throw new SearchRowsExceededException ("Maximum rows exceeded:" + maxRows);
}
}
if (context.containsObject(objectID))
{
BaseBusinessClass cachedElement = context.getObjectToReplace(objectID, Note.REFERENCE_Note);
if (cachedElement instanceof Note)
{
LogMgr.log (NotePersistence, LogLevel.TRACE, "Cache hit for id:", objectID);
resultElement = (Note)cachedElement;
}
else
{
throw new StorageException ("Cache collision for id:" + objectID + " with object " + cachedElement + "while fetching a Note");
}
}
else
{
PersistentSet tl_notePSet = allPSets.getPersistentSet(objectID, "tl_note", PersistentSetStatus.FETCHED);
createPersistentSetFromRS(allPSets, r, objectID);
resultElement = new Note ();
resultElement.setFromPersistentSets(objectID, allPSets);
context.addRetrievedObject(resultElement);
}
results.put (objectID, resultElement);
}
BaseBusinessClass[] resultsArr = new BaseBusinessClass[results.size ()];
return results.values ().toArray (resultsArr);
}
public BaseBusinessClass[] find(String searchType, PersistentSetCollection allPSets, Hashtable criteria, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
LogMgr.log (NotePersistence, LogLevel.DEBUG2, "Search executing:", searchType, " criteria:", criteria);
String customParamFilter = (String)criteria.get (SEARCH_CustomFilter);
String customOrderBy = (String)criteria.get (SEARCH_OrderBy);
String customTables = (String)criteria.get (SEARCH_CustomExtraTables);
Boolean noCommaBeforeCustomExtraTables = (Boolean)criteria.get (SEARCH_CustomExtraTablesNoComma);
if (searchType.equals (SEARCH_CustomSQL))
{
Set<ObjectID> processedIDs = new HashSet();
SearchParamTransform tx = new SearchParamTransform (criteria);
Object[] searchParams;
customParamFilter = StringUtils.replaceParams (customParamFilter, tx);
searchParams = tx.getParamsArray();
if (customOrderBy != null)
{
customOrderBy = " ORDER BY " + customOrderBy;
}
else
{
customOrderBy = "";
}
ResultSet r;
String concatCustomTableWith = CollectionUtils.equals(noCommaBeforeCustomExtraTables, true) ? " " : ", ";
String tables = StringUtils.subBlanks(customTables) == null ? " " : concatCustomTableWith + customTables + " ";
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_note " + tables +
"WHERE " + SELECT_JOINS + " " + customParamFilter + customOrderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, null, false);
return results;
}
else if (searchType.equals (Note.SEARCH_All))
{
// Local scope for transformed variables
{
}
String orderBy = " ";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: object_id is not null
String preFilter = "(object_id is not null)"
+ " ";
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_note " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal search type:" + searchType);
}
}
private void createPersistentSetFromRS(PersistentSetCollection allPSets, ResultSet r, ObjectID objectID) throws SQLException
{
PersistentSet tl_notePSet = allPSets.getPersistentSet(objectID, "tl_note", PersistentSetStatus.FETCHED);
// Object Modified
tl_notePSet.setAttrib(BaseBusinessClass.FIELD_ObjectLastModified, r.getTimestamp ("LAST_UPDATED_DATE"));
// Object Created
tl_notePSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_notePSet.setAttrib(Note.FIELD_Comment, HELPER_Comment.getFromRS(dummyComment, r, "comment"));
tl_notePSet.setAttrib(Note.SINGLEREFERENCE_CreatedUser, r.getObject ("created_user_id"));
tl_notePSet.setAttrib(Note.SINGLEREFERENCE_JobApplication, r.getObject ("job_application_id"));
}
public void create(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_notePSet = allPSets.getPersistentSet(objectID, "tl_note");
if (tl_notePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_notePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_note " +
" (comment, created_user_id, job_application_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Comment.getForSQL(dummyComment, tl_notePSet.getAttrib (Note.FIELD_Comment))) .listEntry (SQLManager.CheckNull((Long)(tl_notePSet.getAttrib (Note.SINGLEREFERENCE_CreatedUser)))).listEntry (SQLManager.CheckNull((Long)(tl_notePSet.getAttrib (Note.SINGLEREFERENCE_JobApplication)))) .listEntry (objectID.longID ()).toList().toArray());
tl_notePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
}
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
<ATTRIB name="Code" type="String" dbcol="code" length="4" mandatory="true" isUnique="true"/> <ATTRIB name="Code" type="String" dbcol="code" length="4" mandatory="true" isUnique="true"/>
<ATTRIB name="Name" type="String" dbcol="name" length="250" mandatory="true"/> <ATTRIB name="Name" type="String" dbcol="name" length="250" mandatory="true"/>
<ATTRIB name="Level" type="OccupationLevel" dbcol="level" attribHelper="EnumeratedAttributeHelper" mandatory="true"/> <ATTRIB name="Level" type="OccupationLevel" dbcol="level" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" />
<SINGLEREFERENCE name="AssessmentLevel" type="Level" dbcol="assessment_level_id" />
<SINGLEREFERENCE name="ParentOccupation" type="Occupation" dbcol="parent_occupation_id" backreferenceName="ChildOccupations"/> <SINGLEREFERENCE name="ParentOccupation" type="Occupation" dbcol="parent_occupation_id" backreferenceName="ChildOccupations"/>
</TABLE> </TABLE>
......
...@@ -30,12 +30,14 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -30,12 +30,14 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
private String dummyCode; private String dummyCode;
private String dummyName; private String dummyName;
private OccupationLevel dummyLevel; private OccupationLevel dummyLevel;
private AssessmentType dummyAssessmentType;
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Code = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_Name = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_Level = new EnumeratedAttributeHelper (OccupationLevel.FACTORY_OccupationLevel); private static final EnumeratedAttributeHelper HELPER_Level = new EnumeratedAttributeHelper (OccupationLevel.FACTORY_OccupationLevel);
private static final EnumeratedAttributeHelper HELPER_AssessmentType = new EnumeratedAttributeHelper (AssessmentType.FACTORY_AssessmentType);
...@@ -45,10 +47,11 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -45,10 +47,11 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
dummyCode = (String)(HELPER_Code.initialise (dummyCode)); dummyCode = (String)(HELPER_Code.initialise (dummyCode));
dummyName = (String)(HELPER_Name.initialise (dummyName)); dummyName = (String)(HELPER_Name.initialise (dummyName));
dummyLevel = (OccupationLevel)(HELPER_Level.initialise (dummyLevel)); dummyLevel = (OccupationLevel)(HELPER_Level.initialise (dummyLevel));
dummyAssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (dummyAssessmentType));
} }
private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.assessment_type, {PREFIX}tl_occupation.assessment_level_id, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -102,6 +105,8 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -102,6 +105,8 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Code)|| !tl_occupationPSet.containsAttrib(Occupation.FIELD_Code)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Name)|| !tl_occupationPSet.containsAttrib(Occupation.FIELD_Name)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Level)|| !tl_occupationPSet.containsAttrib(Occupation.FIELD_Level)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_AssessmentType)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ParentOccupation)) !tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ParentOccupation))
{ {
// We will need to retrieve it // We will need to retrieve it
...@@ -182,10 +187,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -182,10 +187,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_occupation " + "UPDATE {PREFIX}tl_occupation " +
"SET code = ?, name = ?, level = ?, parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET code = ?, name = ?, level = ?, assessment_type = ?, assessment_level_id = ? , parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_occupation.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_occupation.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -444,7 +449,9 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -444,7 +449,9 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
tl_occupationPSet.setAttrib(Occupation.FIELD_Code, HELPER_Code.getFromRS(dummyCode, r, "code")); tl_occupationPSet.setAttrib(Occupation.FIELD_Code, HELPER_Code.getFromRS(dummyCode, r, "code"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Name, HELPER_Name.getFromRS(dummyName, r, "name")); tl_occupationPSet.setAttrib(Occupation.FIELD_Name, HELPER_Name.getFromRS(dummyName, r, "name"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Level, HELPER_Level.getFromRS(dummyLevel, r, "level")); tl_occupationPSet.setAttrib(Occupation.FIELD_Level, HELPER_Level.getFromRS(dummyLevel, r, "level"));
tl_occupationPSet.setAttrib(Occupation.FIELD_AssessmentType, HELPER_AssessmentType.getFromRS(dummyAssessmentType, r, "assessment_type"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel, r.getObject ("assessment_level_id"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ParentOccupation, r.getObject ("parent_occupation_id")); tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ParentOccupation, r.getObject ("parent_occupation_id"));
} }
...@@ -462,10 +469,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -462,10 +469,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_occupation " + "INSERT INTO {PREFIX}tl_occupation " +
" (code, name, level, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (code, name, level, assessment_type, assessment_level_id, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray());
tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED); tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -3695,7 +3695,7 @@ span.appli-progress-bar { ...@@ -3695,7 +3695,7 @@ span.appli-progress-bar {
margin-bottom: 10px; margin-bottom: 10px;
text-align: left; text-align: left;
} }
input.add-note-btn { button.add-note-btn {
display: inline-block; display: inline-block;
height: 30px; height: 30px;
border-radius: 100px; border-radius: 100px;
...@@ -3710,7 +3710,7 @@ input.add-note-btn { ...@@ -3710,7 +3710,7 @@ input.add-note-btn {
padding: 0; padding: 0;
width: 100px; width: 100px;
} }
input.add-note-btn:hover{ button.add-note-btn:hover{
background-color: #434c58; background-color: #434c58;
} }
.note-txt-box { .note-txt-box {
...@@ -6073,9 +6073,12 @@ label, label .label-title span { ...@@ -6073,9 +6073,12 @@ label, label .label-title span {
.job-template-left.job-template-cl4 { .job-template-left.job-template-cl4 {
width: 25%; width: 25%;
} }
.job-template-left.job-template-cl1.culture { .job-template-left.job-template-cl1.culture, .job-template-left.job-template-cl1.no-client {
width: 49%; width: 49%;
} }
.job-template-left.job-template-cl1.culture.no-client{
width: 75%;
}
.job-template-left.job-template-cl4 .m-user-right-padlock { .job-template-left.job-template-cl4 .m-user-right-padlock {
float: right; float: right;
padding: 17px 0; padding: 17px 0;
...@@ -7642,3 +7645,83 @@ input{ ...@@ -7642,3 +7645,83 @@ input{
margin-bottom: 40px; margin-bottom: 40px;
padding-left: 10px; padding-left: 10px;
} }
/*
Start of CV Cover Letter Popup
*/
.cv-cover-letter{
border: 1px solid #E5E8EB;
border-radius: 2px;
background-color: #FFFFFF;
padding: 14px 18px;
color: #4E5258;
font-size: 12px;
}
.cv-cover-letter img{
height: 18px;
padding-right: 18px;
}
.cv-popup{
border-radius: 4px;
background-color: #ffffff;
box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.2);
/*border: 1px solid #e8e8eb;*/
width: 65%;
height:1000px;
margin: 0 auto;
text-align: center;
padding: 0;
margin-top: 150px;
}
.cv-popup .nav-tabs{
background: #4E5258;
}
.cv-popup .nav-tabs>li.active>a{
color: #4A4A4A;
opacity: 1;
}
.cv-popup .nav-tabs>li>a{
color: #FFFFFF;
opacity: 0.5;
font-size: 20px;
line-height: 30px;
text-align: center;
}
.cv-popup .nav-tabs>li>a:focus, .cv-popup .nav-tabs>li>a:hover{
color: #4A4A4A;
}
.cv-popup .nav-tabs>li.active>a, .cv-popup .nav-tabs>li.active>a:focus, .cv-popup .nav-tabs>li.active>a:hover{
background: #F5F7F8;
}
.cv-popup .tab-pane{
background: #F5F7F8;
}
.cv-popup button.close{
color: #F5F7F8;
padding: 10px 20px;
opacity: 1;
}
.cv-popup .no-preview{
padding-top: 100px;
}
.cv-popup .download-btn{
border: 1px solid #E5E8EB;
border-radius: 2px;
background-color: #4E5258;
padding: 14px 18px;
color: #FFFFFF;
font-size: 18px;
margin-top: 20px;
}
.cv-popup .download-btn img{
height: 30px;
padding-right: 18px;
}
.modal-dialog.cv{
width:100%;
}
/*
End of CV Cover Letter Popup
*/
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
<FORM name="*.loadRequirementsFromTemplate" factory="Participant" class="performa.form.LoadRequirementsFromTemplateFP"/> <FORM name="*.loadRequirementsFromTemplate" factory="Participant" class="performa.form.LoadRequirementsFromTemplateFP"/>
<FORM name="*.loadCultureFromTemplate" factory="Participant" class="performa.form.LoadCultureFromTemplateFP"/> <FORM name="*.loadCultureFromTemplate" factory="Participant" class="performa.form.LoadCultureFromTemplateFP"/>
<FORM name="*.changeApplicationStatus" factory="Participant" class="performa.form.ChangeApplicationStatusFP"/> <FORM name="*.changeApplicationStatus" factory="Participant" class="performa.form.ChangeApplicationStatusFP"/>
<FORM name="*.addNote" factory="Participant" class="performa.form.AddNoteFP"/>
<FORM name="*.extendJob" factory="Participant" class="performa.form.ExtendJobFP"/>
<FORM name="*.bulkupdate" factory="Participant" class="performa.form.BulkUpdateFP"/> <FORM name="*.bulkupdate" factory="Participant" class="performa.form.BulkUpdateFP"/>
<FORM name="*.navigateBetweenStatus" factory="Participant" class="performa.form.NavigateBetweenStatusFP"/> <FORM name="*.navigateBetweenStatus" factory="Participant" class="performa.form.NavigateBetweenStatusFP"/>
<FORM name="*.sendCompanyUserInvites" factory="Participant" class="performa.form.SendCompanyUserInvitesFP"> <FORM name="*.sendCompanyUserInvites" factory="Participant" class="performa.form.SendCompanyUserInvitesFP">
......
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
<% <%
} }
%> %>
</oneit:recalcClass>
<div class="form-group"> <div class="form-group">
<div class="styled_checkboxes"> <div class="styled_checkboxes">
...@@ -184,7 +185,6 @@ ...@@ -184,7 +185,6 @@
</span> </span>
</div> </div>
</oneit:recalcClass> </oneit:recalcClass>
</oneit:recalcClass>
<div class="text-center"> <div class="text-center">
<oneit:button value="Save as draft" name="saveJob" cssClass="btn btn-primary top-margin-25 largeBtn greyBtn" <oneit:button value="Save as draft" name="saveJob" cssClass="btn btn-primary top-margin-25 largeBtn greyBtn"
......
...@@ -21,18 +21,11 @@ ...@@ -21,18 +21,11 @@
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request)); response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
} }
CultureCriteriaTemplate[] templates = (CultureCriteriaTemplate[]) process.getAttribute("CultureCriteriaTemplates"); CultureCriteriaTemplate[] templates = CultureCriteriaTemplate.SearchByAll()
if(templates == null)
{
templates = CultureCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(hiringTeam)) .andHiringTeam(new EqualsFilter<>(hiringTeam))
.andCompanyUser(new EqualsFilter<>(companyUser)) .andCompanyUser(new EqualsFilter<>(companyUser))
.search(transaction); .search(transaction);
process.setAttribute("CultureCriteriaTemplates", templates);
}
// handle client // handle client
if( parameterMap.containsKey("Client")) if( parameterMap.containsKey("Client"))
{ {
...@@ -94,17 +87,24 @@ ...@@ -94,17 +87,24 @@
%> %>
<div class="template-list" id="<%= template.getID() %>"> <div class="template-list" id="<%= template.getID() %>">
<div class="template-row"> <div class="template-row">
<div class="job-template-left job-template-cl1 culture"> <div class="job-template-left job-template-cl1 culture <%= hiringTeam.showHasClientSupport() ? "" : "no-client"%>">
<div class="template-name heading"> <div class="template-name heading">
<oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" /> <oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" />
</div> </div>
</div> </div>
<%
if(hiringTeam.showHasClientSupport())
{
%>
<div class="job-template-left job-template-cl2"> <div class="job-template-left job-template-cl2">
<span class="grey-span">CLIENT</span> <span class="grey-span">CLIENT</span>
<div class="template-name"> <div class="template-name">
<oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" /> <oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" />
</div> </div>
</div> </div>
<%
}
%>
<div class="job-template-left job-template-cl4"> <div class="job-template-left job-template-cl4">
<span class="grey-span">LAST UPDATED</span> <span class="grey-span">LAST UPDATED</span>
<div class="template-name"> <div class="template-name">
......
...@@ -12,6 +12,15 @@ ...@@ -12,6 +12,15 @@
Debug.assertion(template != null && !toRedirect, "Invalid template in culture templates"); Debug.assertion(template != null && !toRedirect, "Invalid template in culture templates");
SecUser secUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
if(hiringTeam != template.getHiringTeam())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
template.pipelineCultureCriteriaTemplate().toCultureCriterias().toCultureElement().toRatings().uniqueVals(); //preloading data template.pipelineCultureCriteriaTemplate().toCultureCriterias().toCultureElement().toRatings().uniqueVals(); //preloading data
%> %>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -13,9 +13,23 @@ ...@@ -13,9 +13,23 @@
Debug.assertion(template != null && !toRedirect, "Invalid template in job templates"); Debug.assertion(template != null && !toRedirect, "Invalid template in job templates");
SecUser secUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
if(hiringTeam != template.getHiringTeam())
{
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
}
%> %>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<script type="text/javascript"> <script type="text/javascript">
var lastclickedOccid = 0 , lastclickedOcc = "" ; var lastclickedOccid = 0 , lastclickedOcc = "" , levelClicked = "";
var occPopup; var occPopup;
var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null }; var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null };
var scrolldiv = null ; var scrolldiv = null ;
...@@ -152,9 +166,17 @@ ...@@ -152,9 +166,17 @@
lastclickedOccid = thisEle.data('id'); lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ'); lastclickedOcc = thisEle.data('occ');
levelClicked = thisEle.data('level');
if(levelClicked === "fourth"){
$('.btn-save-occ').removeAttr('disabled');
$(".select-occupation").val(lastclickedOcc); $(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid); $("#select-occupation-id").val(lastclickedOccid);
} else {
$(".select-occupation").val("");
$("#select-occupation-id").val(0);
$('.btn-save-occ').attr('disabled', 'disabled');
}
thisEle.siblings('li').removeClass("clicked"); thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked"); thisEle.addClass("clicked");
...@@ -369,64 +391,6 @@ ...@@ -369,64 +391,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Select your assessment type</label>
</div>
</div>
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String assessmentTypeKey = WebUtils.getInputKey(request, template, AssessmentCriteriaTemplate.FIELD_AssessmentType);
String assessmentTypeValue = formBuilder.fieldValue (assessmentTypeKey, template.getAssessmentType() == null ? "" : template.getAssessmentType().getName());
for(AssessmentType assessmentType : AssessmentType.getAssessmentTypeArray())
{
String assessmentTypeId = assessmentType.getName();
String selectedStr = CollectionUtils.equals(assessmentTypeValue, assessmentTypeId) ? "checked" : "";
String levelKey = WebUtils.getRadioSingleAssocKey(request, template, AssessmentCriteriaTemplate.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, template.getLevel() == null ? "" : String.valueOf(template.getLevelID()));
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" class="type_radio" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<span class="label-title"><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></span>
<oneit:toString value="<%= assessmentType.getQuestionDetails() %>" mode="EscapeHTML"/><br />
</label>
</div>
<oneit:recalcClass htmlTag="div" classScript="template.getAssessmentType() == assessmentType ? 'main-pack-type' : '' " template="<%= template %>" assessmentType="<%= assessmentType %>">
<ul>
<%
for(Level level : Level.getAllLevelsforAssessmentType(transaction, assessmentType))
{
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
%>
<oneit:recalcClass htmlTag="li" classScript="template.getLevelClass(level)" template="<%= template %>" level="<%= level %>">
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= level %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= level.getCSSClass() %>"></span>
</label>
</a>
</oneit:recalcClass>
<%
}
%>
</ul>
</oneit:recalcClass>
<div class="clearfix"></div>
<%
}
String levelKey = WebUtils.getRadioSingleAssocKey(request, template, AssessmentCriteriaTemplate.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, template.getLevel() == null ? "" : String.valueOf(template.getLevelID()));
%>
</div> </div>
<div class="form-page-section darkbg"> <div class="form-page-section darkbg">
<div class="form-group row"> <div class="form-group row">
...@@ -521,28 +485,28 @@ ...@@ -521,28 +485,28 @@
for (Occupation firstLevel : firstLevelOccupations) for (Occupation firstLevel : firstLevelOccupations)
{ {
%> %>
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>"> <li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>" data-level="first">
<span> <%= firstLevel%> </span> <span> <%= firstLevel%> </span>
<ul class="level1"> <ul class="level1">
<% <%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet()) for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{ {
%> %>
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>"> <li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>" data-level="second">
<span> <%= secondLevel%></span> <span> <%= secondLevel%></span>
<ul class="level2"> <ul class="level2">
<% <%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet()) for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{ {
%> %>
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>"> <li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>" data-level="third">
<span> <%= thirdLevel%></span> <span> <%= thirdLevel%></span>
<ul class="level3"> <ul class="level3">
<% <%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet()) for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{ {
%> %>
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>"> <li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>" data-level="fourth">
<span> <%= fourthLevel%></span> <span> <%= fourthLevel%></span>
</li> </li>
<% <%
...@@ -575,7 +539,7 @@ ...@@ -575,7 +539,7 @@
Select the most appropriate Category to help narrow down your Occupation Select the most appropriate Category to help narrow down your Occupation
</div> </div>
<div class="occupation_select_button"> <div class="occupation_select_button">
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button> <button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn btn-save-occ" style="" disabled>Save Job Occupation</button>
</div> </div>
</div> </div>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
CompanyUser companyUser = clientUser.getExtension(CompanyUser.REFERENCE_CompanyUser); CompanyUser companyUser = clientUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
User intercomUser = (User)session.getAttribute("IntercomUser"); User intercomUser = (User)session.getAttribute("IntercomUser");
HiringTeam selectedTeam = (HiringTeam) session.getAttribute("SelectedHiringTeam"); HiringTeam selectedTeam = (HiringTeam) session.getAttribute("SelectedHiringTeam");
String gtmKey = oneit.appservices.config.ConfigMgr.getKeyfileString("gtm.key","GTM-M6M4SW6");
if(selectedTeam != null && companyUser != null) if(selectedTeam != null && companyUser != null)
{ {
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
}]; }];
</script> </script>
<script> <script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-WFZ4NVT'); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','<%= gtmKey %>');
</script> </script>
<!-- End Google Tag Manager --> <!-- End Google Tag Manager -->
</head> </head>
...@@ -85,7 +86,7 @@ ...@@ -85,7 +86,7 @@
</script> </script>
<body> <body>
<!-- Google Tag Manager (noscript) --> <!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WFZ4NVT" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<%= gtmKey %>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) --> <!-- End Google Tag Manager (noscript) -->
<% <%
boolean isMobile = BrowserServices.isMobile(request); boolean isMobile = BrowserServices.isMobile(request);
......
...@@ -8,16 +8,19 @@ ...@@ -8,16 +8,19 @@
<%@include file="/inc/std_imports.jsp" %> <%@include file="/inc/std_imports.jsp" %>
<%@include file="/heapAnalysis.jsp" %> <%@include file="/heapAnalysis.jsp" %>
<%
String gtmKey = oneit.appservices.config.ConfigMgr.getKeyfileString("gtm.key","GTM-M6M4SW6");
%>
<!-- Google Tag Manager --> <!-- Google Tag Manager -->
<script> <script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-WFZ4NVT'); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','<%= gtmKey %>');
</script> </script>
<!-- End Google Tag Manager --> <!-- End Google Tag Manager -->
</head> </head>
<body class="bg-color"> <body class="bg-color">
<!-- Google Tag Manager (noscript) --> <!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WFZ4NVT" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<%= gtmKey %>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) --> <!-- End Google Tag Manager (noscript) -->
<div class="container"> <div class="container">
<div class="row"> <div class="row">
......
...@@ -11,11 +11,16 @@ ...@@ -11,11 +11,16 @@
String nextPage = (String) getData(request, "NextPage"); String nextPage = (String) getData(request, "NextPage");
String homePage = (String) getData(request, "HomePage"); String homePage = (String) getData(request, "HomePage");
String shortlistPage = (String) getData(request, "ShortlistPage"); String shortlistPage = (String) getData(request, "ShortlistPage");
boolean canCreateJob = (boolean) getData(request, "CanCreateJob");
CompanyUser compUser = (CompanyUser) getData(request, "CompanyUser");
%> %>
<oneit:dynIncluded> <oneit:dynIncluded>
<script type="text/javascript"> <script type="text/javascript">
var ExtendPopup = null;
var StatusPopup = null;
var ConfirmPopup = null;
$(document).ready(function() $(document).ready(function()
{ {
...@@ -29,15 +34,96 @@ ...@@ -29,15 +34,96 @@
fontWeight: 'normal' fontWeight: 'normal'
}); });
ExtendPopup = new jBox('Modal', {
id : "extend-job",
overlay : true,
width : 500, height : 380
});
StatusPopup = new jBox('Modal', {
id : "status-change",
overlay : true,
width : 500, height : 280
});
ConfirmPopup = new jBox('Modal', {
id : "status-change-confirm",
overlay : true,
width : 500, height : 350
});
$(".job-status").change(function() $(".job-status").change(function()
{ {
var id = $(this).closest('.job-list').attr('id'); var id = $(this).closest('.job-list').attr('id');
$('.save-job' + id).click(); $('.save-job' + id).click();
}); });
$(".change-plan-no-button").on("click",function(){
ExtendPopup.close();
});
}); });
function showExtendPopup(elem)
{
ExtendPopup.setContent($("#" + $(elem).data('popupid') ));
ExtendPopup.open();
}
function showStatusPopup(elemid)
{
StatusPopup.setContent($("#status-change-" + elemid ));
StatusPopup.open();
}
function showStatusConfirmPopup(elemid)
{
StatusPopup.close();
ConfirmPopup.setContent($("#status-change-confirm-" + elemid ));
ConfirmPopup.open();
}
</script> </script>
<style>
.calendar .extend-icon{
margin: 0 5px 0 10px;
}
.calendar .extend-btn{
color: #03A0E7;
}
.calendar .extend-span{
cursor: pointer;
}
.extend-job-content{
padding: 10px 40px;
}
.extend-job-content h3{
color: #4A4A4A;
font-size: 22px;
font-weight: 500;
line-height: 29px;
font-family: "Usual-Medium";
}
.extend-job-content .extend-job-info{
color: #4A4A4A;
font-family: "Usual-Light";
font-size: 16px;
font-weight: 300;
line-height: 25px;
padding-top: 10px;
}
.extend-job-content .password-text{
padding: 10px 0 10px;
font-size: 16px;
font-weight: 300;
line-height: 25px;
}
.extend-job-button {
padding-bottom: 0px;
}
</style>
<div class="main-job-list"> <div class="main-job-list">
<oneit:button skin="link" value=" " name="extendJob" cssClass="hide"
requestAttribs="<%= CollectionUtils.EMPTY_MAP %>" />
<% <%
ObjectTransaction objTran = process.getTransaction (); ObjectTransaction objTran = process.getTransaction ();
CompanyUser companyUser = SecUser.getTXUser(objTran).getExtension(CompanyUser.REFERENCE_CompanyUser); CompanyUser companyUser = SecUser.getTXUser(objTran).getExtension(CompanyUser.REFERENCE_CompanyUser);
...@@ -114,10 +200,34 @@ ...@@ -114,10 +200,34 @@
{ {
int daysToClose = job.getNoOfDaystoClosed(); int daysToClose = job.getNoOfDaystoClosed();
%> %>
<span class="extend-span" data-popupid ="extend-job-<%=job.getID()%>" onclick="<%= canCreateJob ? "showExtendPopup(this)" : "showReachedCap()" %>">
<span class="number"> <span class="number">
<oneit:toString value="<%= daysToClose %>" mode="Integer"/> <oneit:toString value="<%= daysToClose %>" mode="Integer"/>
</span> </span>
<oneit:toString value="<%= (daysToClose == 1 ? "day" : "days") + " until closed" %>" mode="EscapeHTML"/> <oneit:toString value="<%= (daysToClose == 1 ? "day" : "days") + " until closed" %>" mode="EscapeHTML"/>
<img class="extend-icon" src="images/icon-extend.svg"/> <a class="extend-btn">Extend</a>
</span>
<div id="extend-job-<%= job.getID() %>" style="display:none" >
<div class="extend-job-content">
<h3>
Are you sure you want to extend this job?
</h3>
<div class="extend-job-info">
Extending this Job will add an additional 30 days for applicants to apply. By confirming the new close date for this job will be
<oneit:toString value="<%= DateDiff.add(job.getApplyBy(), Calendar.DATE, 30) %>" mode="LongDate" />.
Would you like to continue?
</div>
</div>
<div class="change-plan-button extend-job-button">
<a class="change-plan-no-button popup-no-button">No</a>
<oneit:button skin="link" value="Yes" name="extendJob" cssClass="change-plan-yes-button"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", homePage)
.mapEntry("Job", job)
.mapEntry("CompanyUser", compUser)
.toMap() %>" />
</div>
</div>
<% <%
} }
else else
...@@ -184,12 +294,55 @@ ...@@ -184,12 +294,55 @@
for (JobStatus jStatus : job.getAvailableStatus(roleType)) for (JobStatus jStatus : job.getAvailableStatus(roleType))
{ {
%> %>
<oneit:button name="saveJob" value="<%= jStatus.getDescription() %>" skin="link" cssClass="<%="dropdown-item icontype_" + jStatus.getDescription().toLowerCase() %>" <a class="<%="dropdown-item icontype_" + jStatus.getDescription().toLowerCase() %>" onClick="showStatusPopup('<%= job.getID().toString() + jStatus %>')">
<%= jStatus.getDescription() %>
</a>
<div id="status-change-<%= job.getID().toString() + jStatus %>" style="display:none" >
<div class="extend-job-content">
<h3>
Are you sure you want to change the status of this job?
</h3>
</div>
<div class="change-plan-button extend-job-button">
<a class="change-plan-no-button popup-no-button">No</a>
<%
if(jStatus == JobStatus.OPEN)
{
%>
<oneit:button skin="link" value="Yes" name="saveJob" cssClass="change-plan-yes-button"
requestAttribs="<%= CollectionUtils.mapEntry("Job", job) requestAttribs="<%= CollectionUtils.mapEntry("Job", job)
.mapEntry("nextPage", homePage + "&JobStatus=" + (jobStatus != null ? jobStatus : "") + "&JobSortOption=" + jobSortOption) .mapEntry("nextPage", homePage + "&JobStatus=" + (jobStatus != null ? jobStatus : "") + "&JobSortOption=" + jobSortOption)
.mapEntry("JobStatus", jStatus) .mapEntry("JobStatus", jStatus)
.toMap() %>" /> .toMap() %>" />
<%
}
else
{
%>
<a class=" change-plan-yes-button" onclick="showStatusConfirmPopup('<%= job.getID().toString() + jStatus %>')">Yes</a>
<%
}
%>
</div>
</div>
<div id="status-change-confirm-<%= job.getID().toString() + jStatus %>" style="display:none" >
<div class="extend-job-content">
<h3>
Are you sure you want to change the status of this job?
</h3>
<div class="extend-job-info">
By changing this job to Closed or Filled no further applicants can be accepted and the Job can not be reopened. Do you with to continue?
</div>
</div>
<div class="change-plan-button extend-job-button">
<a class="change-plan-no-button popup-no-button">No</a>
<oneit:button skin="link" value="Yes" name="saveJob" cssClass="change-plan-yes-button"
requestAttribs="<%= CollectionUtils.mapEntry("Job", job)
.mapEntry("nextPage", homePage + "&JobStatus=" + (jobStatus != null ? jobStatus : "") + "&JobSortOption=" + jobSortOption)
.mapEntry("JobStatus", jStatus)
.toMap() %>" />
</div>
</div>
<% <%
} }
%> %>
......
...@@ -88,6 +88,10 @@ ...@@ -88,6 +88,10 @@
$('.save-application').click(); $('.save-application').click();
}); });
}); });
function previewCV(){
$('#pdfPreview').modal('show');
}
</script> </script>
<div class="main-applicant-content dashboard-content-area v-applicant-area "> <div class="main-applicant-content dashboard-content-area v-applicant-area ">
<div class="applicant-header"> <div class="applicant-header">
...@@ -103,6 +107,16 @@ ...@@ -103,6 +107,16 @@
</div> </div>
</div> </div>
<div class="main-export"> <div class="main-export">
<%
if(jobApplication.getCV() != null && jobApplication.getCoverLetter() != null)
{
%>
<a href="#" class="btn cv-cover-letter" onclick="previewCV()">
<img src="images/icon-paper-clip.png" />CV & Cover Letter
</a>
<%
}
%>
<span class="export-candidate" style="display: none;"> <span class="export-candidate" style="display: none;">
<select class="form-control"> <select class="form-control">
<option>Export Candidate Report</option> <option>Export Candidate Report</option>
...@@ -648,27 +662,88 @@ ...@@ -648,27 +662,88 @@
} }
%> %>
</div> </div>
<%--
<div class="applicant-note" > <div class="applicant-note" >
<div class="applicant-note-title">Notes</div> <div class="applicant-note-title">Notes</div>
<div class="note-txt-box"> <div class="note-txt-box">
<textarea class="form-control"></textarea> <oneit:ormtextarea obj="<%= jobApplication %>" attributeName="Note" cssClass="form-control"/>
<input type="button" class="add-note-btn" value="ADD NOTE" /> <oneit:button name="addNote" value="ADD NOTE" cssClass="add-note-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).mapEntry("Job", job).toMap())
.mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "JobApplication", "Applications"})))
.mapEntry("JobApplication", jobApplication)
.toMap() %>" />
</div> </div>
</div> </div>
<div class="admin-notes"> <div class="admin-notes">
<div class="admin-name">Admin name</div> <%
<div class="date-value">TODAY</div> for (Note note : jobApplication.getNotesSet())
<div class="admin-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent accumsan interdum nisi, sed laoreet dui rhoncus.</div> {
%>
<div class="admin-name"><oneit:toString value="<%= note.getCreatedUser() %>" mode="EscapeHTML"/></div>
<div class="date-value"><oneit:toString value="<%= note.getObjectCreated() %>" mode="MidDate"/></div>
<div class="admin-text"><oneit:toString value="<%= note.getComment() %>" mode="EscapeHTML"/></div>
<div class="admin-br-line"></div> <div class="admin-br-line"></div>
<div class="admin-name">Admin name</div> <%
<div class="date-value">2 days ago</div> }
<div class="admin-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> %>
</div> </div>
--%>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" id="pdfPreview" role="dialog">
<div class="modal-dialog cv">
<div class="modal-body cv-popup">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<ul class="nav nav-tabs">
<li class="tab-heading active"><a data-toggle="tab" href="#cl">Cover Letter</a></li>
<li class="tab-heading"><a data-toggle="tab" href="#cv">Curriculum Vitae</a></li>
</ul>
<div class="tab-content">
<div id="cl" class="tab-pane fade in active" style="height:1200px; padding-top:40px;">
<%
if(jobApplication.getCoverLetter() != null && jobApplication.getCoverLetter().getContentType().contains("pdf"))
{
%>
<embed height="100%" width="80%" scrolling="yes" src="<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>#zoom=100"/>
<%
}
else
{
%>
<div class="no-preview">No preview available</div>
<a class="btn download-btn" href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>'>
<img src="images/icon-download-large.png" />Download
</a>
<%
}
%>
</div>
<div id="cv" class="tab-pane fade in" style="height:1200px; padding-top:40px;">
<%
if(jobApplication.getCV() != null && jobApplication.getCV().getContentType().contains("pdf"))
{
%>
<embed height="100%" width="80%" scrolling="yes" src="<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>#zoom=100"/>
<%
}
else
{
%>
<div class="no-preview">No preview available</div>
<a class="btn download-btn" href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>'>
<img src="images/icon-download-large.png" />Download
</a>
<%
}
%>
</div>
</div>
</div>
</div>
</div>
</oneit:dynIncluded> </oneit:dynIncluded>
\ No newline at end of file
...@@ -17,8 +17,14 @@ ...@@ -17,8 +17,14 @@
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA); String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
%> %>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<script type="text/javascript"> <script type="text/javascript">
var lastclickedOccid = 0 , lastclickedOcc = "" ; var lastclickedOccid = 0 , lastclickedOcc = "" , levelClicked = "";
var occPopup; var occPopup;
var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null }; var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null };
var scrolldiv = null ; var scrolldiv = null ;
...@@ -155,9 +161,17 @@ ...@@ -155,9 +161,17 @@
lastclickedOccid = thisEle.data('id'); lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ'); lastclickedOcc = thisEle.data('occ');
levelClicked = thisEle.data('level');
if(levelClicked === "fourth"){
$('.btn-save-occ').removeAttr('disabled');
$(".select-occupation").val(lastclickedOcc); $(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid); $("#select-occupation-id").val(lastclickedOccid);
} else {
$(".select-occupation").val("");
$("#select-occupation-id").val(0);
$('.btn-save-occ').attr('disabled', 'disabled');
}
thisEle.siblings('li').removeClass("clicked"); thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked"); thisEle.addClass("clicked");
...@@ -385,65 +399,6 @@ ...@@ -385,65 +399,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Select your assessment type</label>
</div>
</div>
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String assessmentTypeKey = WebUtils.getInputKey(request, job, Job.FIELD_AssessmentType);
String assessmentTypeValue = formBuilder.fieldValue (assessmentTypeKey, job.getAssessmentType() == null ? "" : job.getAssessmentType().getName());
for(AssessmentType assessmentType : AssessmentType.getAssessmentTypeArray())
{
String assessmentTypeId = assessmentType.getName();
String selectedStr = CollectionUtils.equals(assessmentTypeValue, assessmentTypeId) ? "checked" : "";
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" class="type_radio" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<span class="label-title"><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></span>
<oneit:toString value="<%= assessmentType.getQuestionDetails() %>" mode="EscapeHTML"/><br />
</label>
</div>
<oneit:recalcClass htmlTag="div" classScript="job.getAssessmentType() == assessmentType ? 'main-pack-type' : '' " job="<%= job %>" assessmentType="<%= assessmentType %>">
<ul>
<%
for(Level level : Level.getAllLevelsforAssessmentType(transaction, assessmentType))
{
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
%>
<oneit:recalcClass htmlTag="li" classScript="job.getLevelClass(level)" job="<%= job %>" level="<%= level %>">
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= level %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= level.getCSSClass() %>"></span>
</label>
</a>
</oneit:recalcClass>
<%
}
%>
</ul>
</oneit:recalcClass>
<div class="clearfix"></div>
<%
}
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
</div> </div>
<div class="form-page-section darkbg"> <div class="form-page-section darkbg">
<div class="form-group row"> <div class="form-group row">
...@@ -567,28 +522,28 @@ ...@@ -567,28 +522,28 @@
for (Occupation firstLevel : firstLevelOccupations) for (Occupation firstLevel : firstLevelOccupations)
{ {
%> %>
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>"> <li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>" data-level="first">
<span> <%= firstLevel%> </span> <span> <%= firstLevel%> </span>
<ul class="level1"> <ul class="level1">
<% <%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet()) for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{ {
%> %>
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>"> <li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>" data-level="second">
<span> <%= secondLevel%></span> <span> <%= secondLevel%></span>
<ul class="level2"> <ul class="level2">
<% <%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet()) for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{ {
%> %>
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>"> <li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>" data-level="third">
<span> <%= thirdLevel%></span> <span> <%= thirdLevel%></span>
<ul class="level3"> <ul class="level3">
<% <%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet()) for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{ {
%> %>
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>"> <li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>" data-level="fourth">
<span> <%= fourthLevel%></span> <span> <%= fourthLevel%></span>
</li> </li>
<% <%
...@@ -621,7 +576,7 @@ ...@@ -621,7 +576,7 @@
Select the most appropriate Category to help narrow down your Occupation Select the most appropriate Category to help narrow down your Occupation
</div> </div>
<div class="occupation_select_button"> <div class="occupation_select_button">
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button> <button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn btn-save-occ" style="" disabled>Save Job Occupation</button>
</div> </div>
</div> </div>
<script> <script>
......
...@@ -30,7 +30,11 @@ ...@@ -30,7 +30,11 @@
job.setIndustry(hiringTeam.getIndustry()); job.setIndustry(hiringTeam.getIndustry());
job.setGoogleAddressText(hiringTeam.getGoogleAddressText()); job.setGoogleAddressText(hiringTeam.getGoogleAddressText());
%> %>
<style>
.rectangle-4.special{
height: 260px;
}
</style>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() $(document).ready(function()
{ {
...@@ -81,21 +85,25 @@ ...@@ -81,21 +85,25 @@
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
<div class="oneit-radio"> <div class="oneit-radio">
<label class="create-job-selector rectangle-4"> <oneit:recalcClass htmlTag="label" classScript="job.getTemplateClass(isTeamplate)" job="<%= job %>" isTeamplate="<%= true %>">
<span class="create-job-icon from-template"></span> <span class="create-job-icon from-template"></span>
<!--<img src="images/create_from_template.png">--> <!--<img src="images/create_from_template.png">-->
<h3>Create from template</h3> <h3>Create from template</h3>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/> <oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/>
<div> <oneit:recalcClass htmlTag="div" classScript="hiringTeam.showHasClientSupport() ? 'show': 'hide'" hiringTeam="<%= hiringTeam %>">
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AssessmentTemplate" options="<%= job.getAssessmentTemplates() %>" <tagfile:ormsingleasso_select obj="<%= job %>" assocName="Client" options="<%= Utils.getClientsByHiringTeam(transaction) %>"
blankValue="Select your template" disabled='true'/> blankValue="No Client"/>
</oneit:recalcClass>
<div style="padding-top:10px;">
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AssessmentTemplate" optionsScript="job.getAssessmentTemplates()" job="<%= job%>"
blankValue="Select your template"/>
</div> </div>
</label> </oneit:recalcClass>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="oneit-radio" > <div class="oneit-radio">
<label class="create-job-selector rectangle-4"> <oneit:recalcClass htmlTag="label" classScript="job.getTemplateClass(isTeamplate)" job="<%= job %>" isTeamplate="<%= false %>">
<span class="create-job-icon new-job"></span> <span class="create-job-icon new-job"></span>
<!--<img src="images/create_new_job.png">--> <!--<img src="images/create_new_job.png">-->
<h3>Create a new job</h3> <h3>Create a new job</h3>
...@@ -103,7 +111,7 @@ ...@@ -103,7 +111,7 @@
<div> <div>
New jobs can be saved as a template to be used in future. New jobs can be saved as a template to be used in future.
</div> </div>
</label> </oneit:recalcClass>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -21,18 +21,11 @@ ...@@ -21,18 +21,11 @@
response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request)); response.sendRedirect(WebUtils.getArticleByShortCut(transaction, WebUtils.ADMIN_HOME).getLink(request));
} }
AssessmentCriteriaTemplate[] templates = (AssessmentCriteriaTemplate[]) process.getAttribute("AssessmentCriteriaTemplates"); AssessmentCriteriaTemplate[] templates = AssessmentCriteriaTemplate.SearchByAll()
if(templates == null)
{
templates = AssessmentCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(hiringTeam)) .andHiringTeam(new EqualsFilter<>(hiringTeam))
.andCompanyUser(new EqualsFilter<>(companyUser)) .andCompanyUser(new EqualsFilter<>(companyUser))
.search(transaction); .search(transaction);
process.setAttribute("AssessmentCriteriaTemplates", templates);
}
// handle client // handle client
if( parameterMap.containsKey("Client")) if( parameterMap.containsKey("Client"))
{ {
...@@ -94,7 +87,7 @@ ...@@ -94,7 +87,7 @@
%> %>
<div class="template-list" id="<%= template.getID() %>"> <div class="template-list" id="<%= template.getID() %>">
<div class="template-row"> <div class="template-row">
<div class="job-template-left job-template-cl1"> <div class="job-template-left job-template-cl1 <%= hiringTeam.showHasClientSupport() ? "" : "no-client"%>">
<div class="template-name heading"> <div class="template-name heading">
<oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" /> <oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" />
</div> </div>
...@@ -105,12 +98,19 @@ ...@@ -105,12 +98,19 @@
<oneit:toString value="<%= template.getJobTitle() %>" mode="EscapeHTML" /> <oneit:toString value="<%= template.getJobTitle() %>" mode="EscapeHTML" />
</div> </div>
</div> </div>
<%
if(hiringTeam.showHasClientSupport())
{
%>
<div class="job-template-left job-template-cl3"> <div class="job-template-left job-template-cl3">
<span class="grey-span">CLIENT</span> <span class="grey-span">CLIENT</span>
<div class="template-name"> <div class="template-name">
<oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" /> <oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" />
</div> </div>
</div> </div>
<%
}
%>
<div class="job-template-left job-template-cl4"> <div class="job-template-left job-template-cl4">
<span class="grey-span">LAST UPDATED</span> <span class="grey-span">LAST UPDATED</span>
<div class="template-name"> <div class="template-name">
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page"); String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption"); ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
Client[] clients = (Client[]) process.getAttribute("Clients"); Client[] clients = Utils.getClientsByHiringTeam(transaction);;
if( request.getParameter("ClientSortOption") != null) if( request.getParameter("ClientSortOption") != null)
{ {
...@@ -30,13 +30,6 @@ ...@@ -30,13 +30,6 @@
clientSortOpt = ClientSortOption.ALPHA_A_Z; clientSortOpt = ClientSortOption.ALPHA_A_Z;
} }
if(clients == null)
{
clients = Utils.getClientsByHiringTeam(transaction);
process.setAttribute("Clients", clients);
}
List<Client> sortedClients = Utils.getClientsSorted(clients, clientSortOpt); List<Client> sortedClients = Utils.getClientsSorted(clients, clientSortOpt);
process.setAttribute("ClientSortOption", clientSortOpt); process.setAttribute("ClientSortOption", clientSortOpt);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
Map<String, String[]> parameterMap = request.getParameterMap(); Map<String, String[]> parameterMap = request.getParameterMap();
SearchJob searchJob = (SearchJob) RunSearchExecutorFP.setupExecutor(request, SearchJob.REFERENCE_SearchJob, true); SearchJob searchJob = (SearchJob) RunSearchExecutorFP.setupExecutor(request, SearchJob.REFERENCE_SearchJob, true);
Job[] jobs = (Job[])process.getAttribute("jobs"); Job[] jobs = (Job[])process.getAttribute("jobs");
boolean canCreateJob = hiringTeam.allowJobCreation();
if(!hiringTeam.hasBillingSetup()) if(!hiringTeam.hasBillingSetup())
{ {
...@@ -237,7 +238,7 @@ ...@@ -237,7 +238,7 @@
%> %>
<oneit:dynInclude page="/extensions/adminportal/inc/job_list.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" ShortlistPage="<%= shortlistPage %>" <oneit:dynInclude page="/extensions/adminportal/inc/job_list.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" ShortlistPage="<%= shortlistPage %>"
NextPage="<%= nextPage%>" HomePage="<%= homePage%>" Jobs="<%= sortedJobs.toArray(new Job[0]) %>" JobStatus="<%= jobStatus %>" NextPage="<%= nextPage%>" HomePage="<%= homePage%>" Jobs="<%= sortedJobs.toArray(new Job[0]) %>" JobStatus="<%= jobStatus %>"
JobSortOption="<%= jobSortOpt %>" /> JobSortOption="<%= jobSortOpt %>" CanCreateJob="<%= canCreateJob %>" CompanyUser="<%= companyUser %>"/>
<% <%
} }
%> %>
......
...@@ -12,6 +12,7 @@ Job.State = State or Province ...@@ -12,6 +12,7 @@ Job.State = State or Province
Job.JobTemplate = Job Template Job.JobTemplate = Job Template
Job.Occupation = Job Occupation Classification Job.Occupation = Job Occupation Classification
Job.ExpectedCandidateRadius = Expected Candidate Radius Job.ExpectedCandidateRadius = Expected Candidate Radius
Job.AssessmentTemplate = Template
CultureCriteria.Importance = Rate Importance CultureCriteria.Importance = Rate Importance
CultureCriteria.CultureElementRating = Rating CultureCriteria.CultureElementRating = Rating
......
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
{ {
%> %>
<oneit:dynInclude page="/extensions/adminportal/inc/job_list.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" ShortlistPage="<%= shortlistPage %>" <oneit:dynInclude page="/extensions/adminportal/inc/job_list.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" ShortlistPage="<%= shortlistPage %>"
NextPage="<%= nextPage%>" HomePage="<%= homePage%>" NextPage="<%= nextPage%>" HomePage="<%= homePage%>" CanCreateJob="<%= canCreateJob %>" CompanyUser="<%= companyUser %>"
Jobs="<%= CollectionUtils.batch(recentJobs, 10).get(0).toArray(new Job[0]) %>"/> Jobs="<%= CollectionUtils.batch(recentJobs, 10).get(0).toArray(new Job[0]) %>"/>
<% <%
} }
......
<?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_note</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="comment" type="String" nullable="false" length="1000"/>
<column name="created_user_id" type="Long" length="11" nullable="false"/>
<column name="job_application_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_note" indexName="idx_tl_note_job_application_id" isUnique="false">
<column name="job_application_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_occupation</tableName>
<column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="assessment_level_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='3512';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4221';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4222';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4223';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4224';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4225';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4226';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4227';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='4229';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5111';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5112';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5113';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5131';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5132';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5141';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5142';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5230';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5245';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5246';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Customer Service' AND applied_to_express='Y') WHERE code='5249';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Executive' AND applied_to_express='N') WHERE code='1111';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Executive' AND applied_to_express='N') WHERE code='1112';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Executive' AND applied_to_express='N') WHERE code='1113';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Executive' AND applied_to_express='N') WHERE code='1114';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Executive' AND applied_to_express='N') WHERE code='1120';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2111';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2112';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2113';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2114';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2120';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2131';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2132';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2133';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2141';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2142';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2143';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2144';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2145';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2146';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2149';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2151';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2152';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2153';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2161';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2162';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2163';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2164';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2165';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2166';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2211';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2212';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2221';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2222';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2230';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2240';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2250';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2261';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2262';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2263';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2264';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2265';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2266';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2267';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2269';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2310';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2320';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2330';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2341';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2342';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2351';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2352';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2353';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2354';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2355';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2356';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2359';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2411';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2412';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2413';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2421';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2422';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2423';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2424';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2431';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2432';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2511';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2512';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2513';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2514';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2519';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2521';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2522';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2523';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2529';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2611';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2612';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2619';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2621';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2622';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2631';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2632';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2633';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2634';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2635';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2636';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2641';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2642';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2643';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2651';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2652';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2653';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2654';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2655';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2656';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='2659';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3111';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3112';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3113';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3114';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3115';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3116';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3117';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3118';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3119';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3151';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3152';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3153';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3154';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3155';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3211';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3212';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3213';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3214';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3221';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3222';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3230';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3240';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3251';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3252';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3253';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3254';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3255';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3256';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3257';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3258';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3259';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3311';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3312';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3313';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3314';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3315';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3331';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3332';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3333';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3342';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3343';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3344';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3351';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3352';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3353';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3354';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3355';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3359';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3411';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3412';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3413';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3421';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3422';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='General Purpose' AND applied_to_express='N') WHERE code='3423';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1211';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1212';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1213';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1219';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1221';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1222';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1223';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1311';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1312';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1321';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1322';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1323';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1324';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='1330';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='3121';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='3122';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='3123';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='3341';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='N') WHERE code='0110';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1341';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1342';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1343';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1344';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1345';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1346';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1349';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1411';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1412';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1420';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1431';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='1439';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Management' AND applied_to_express='Y') WHERE code='0210';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3131';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3132';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3133';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3134';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3135';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3139';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3141';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3142';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3143';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3431';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3432';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3433';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3434';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3435';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3511';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3513';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3514';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3521';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='3522';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4110';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4120';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4131';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4132';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4211';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4212';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4213';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4214';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4311';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4312';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4313';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4321';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4322';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4323';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4411';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4412';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4413';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4414';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4415';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4416';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='4419';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5120';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5151';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5152';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5153';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5161';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5162';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5163';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5164';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5165';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5169';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5311';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5312';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5321';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5322';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5329';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5411';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5412';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5413';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5414';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='5419';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6111';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6112';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6113';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6114';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6121';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6122';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6123';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6129';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6130';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6210';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6221';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6222';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6223';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6224';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6310';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6320';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6330';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='6340';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7111';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7112';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7113';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7114';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7115';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7119';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7121';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7122';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7123';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7124';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7125';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7126';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7127';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7131';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7132';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7133';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7211';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7212';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7213';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7214';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7215';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7221';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7222';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7223';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7224';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7231';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7232';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7233';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7234';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7311';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7312';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7313';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7314';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7315';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7316';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7317';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7318';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7319';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7321';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7322';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7323';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7411';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7412';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7413';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7421';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7422';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7511';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7512';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7513';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7514';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7515';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7516';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7521';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7522';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7523';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7531';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7532';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7533';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7534';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7535';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7536';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7541';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7542';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7543';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7544';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='7549';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8111';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8112';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8113';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8114';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8121';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8122';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8131';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8132';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8141';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8142';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8143';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8151';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8152';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8153';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8154';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8155';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8156';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8157';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8159';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8160';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8171';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8172';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8181';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8182';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8183';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8189';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8211';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8212';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8219';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8311';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8312';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8321';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8322';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8331';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8332';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8341';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8342';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8343';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8344';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='8350';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9111';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9112';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9121';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9122';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9123';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9129';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9211';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9212';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9213';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9214';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9215';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9216';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9311';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9312';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9313';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9321';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9329';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9331';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9332';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9333';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9334';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9411';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9412';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9510';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9520';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9611';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9612';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9613';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9621';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9622';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9623';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9624';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='9629';
UPDATE tl_occupation SET assessment_type='EXPRESS', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Non-Managers' AND applied_to_express='Y') WHERE code='0310';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='2433';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='2434';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='3321';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='3322';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='3323';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='3324';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='3334';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='3339';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5211';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5212';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5221';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5222';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5223';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5241';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5242';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5243';
UPDATE tl_occupation SET assessment_type='COMPREHENSIVE', assessment_level_id = (SELECT object_id FROM tl_level WHERE level_desc='Sales' AND applied_to_express='N') WHERE code='5244';
...@@ -108,9 +108,7 @@ ...@@ -108,9 +108,7 @@
<div class="client-row" > <div class="client-row" >
<div class="client-name-cell jl-c" style="width:50%;"> <div class="client-name-cell jl-c" style="width:50%;">
<div class="client-name"> <div class="client-name">
<a href="<%= "&ClientID="+hiringTeam.getObjectID() %>">
<oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML" /> <oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML" />
</a>
</div> </div>
</div> </div>
</div> </div>
......
Add GTM key to keyfile properties in production as follows
gtm.key=GTM-WFZ4NVT
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="17px" viewBox="0 0 20 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>AF0E9984-0C6C-4A1E-ADAB-1379B1E82F72</title>
<desc>Created with sketchtool.</desc>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="Job-Card---Active" transform="translate(-297.000000, -63.000000)" stroke="#03A0E7" stroke-width="0.5">
<g id="Job-Card">
<g id="Meta" transform="translate(39.000000, 26.000000)">
<g id="icon-extend" transform="translate(258.000000, 37.000000)">
<path d="M4.68181818,13.8501818 C1.75202485,11.1121736 1.38603787,6.59474971 3.83686531,3.42082111 C5.93222546,0.707238192 9.49847354,-0.26271468 12.6074471,0.851621824" id="Shape"></path>
<polyline id="Shape" points="15.3181818 7.13472727 15.3181818 2.45290909 20 2.45290909"></polyline>
<polyline id="Shape" points="4.68181818 9.22563636 4.68181818 13.9074545 0 13.9074545"></polyline>
<path d="M15.3181818,2.51263636 C18.2524379,5.25843462 18.6098632,9.78822684 16.1425546,12.960238 C13.9801154,15.7403043 10.2728343,16.6739556 7.11186564,15.4024604" id="Shape"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ 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