Commit 9ec2a80e by Nilu

adding job templates and culture templates

parent 30c3c027
......@@ -9,10 +9,29 @@
<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="template_name" type="String" nullable="true" length="100"/>
<column name="user_id" type="Long" length="11" nullable="true"/>
<column name="job_title" type="String" nullable="false" length="30"/>
<column name="job_description" type="CLOB" nullable="false"/>
<column name="ref_number" type="String" nullable="true" length="10"/>
<column name="google_address_text" type="String" nullable="true" length="300"/>
<column name="location_radius" type="String" nullable="false" length="200"/>
<column name="remote" type="Boolean" nullable="true"/>
<column name="job_type" type="String" nullable="false" length="200"/>
<column name="industry" type="String" nullable="true" length="200"/>
<column name="require_cv" type="Boolean" nullable="true"/>
<column name="assessment_type" type="String" nullable="false" length="200"/>
<column name="include_assessment_criteria" type="Boolean" nullable="false"/>
<column name="level_id" type="Long" length="11" nullable="true"/>
<column name="occupation_id" type="Long" length="11" nullable="false"/>
<column name="job_owner_id" type="Long" length="11" nullable="true"/>
<column name="job_id" type="Long" length="11" nullable="true"/>
<column name="client_id" type="Long" length="11" nullable="true"/>
<column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_assessment_template" indexName="idx_tl_assessment_template_TemplateName" isUnique="true"><column name="template_name"/><column name="user_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_assessment_template" indexName="idx_tl_assessment_template_TemplateID" isUnique="true"><column name="template_name"/><column name="hiring_team_id"/><column name="company_user_id"/></NODE>
......
......@@ -9,10 +9,15 @@
<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="template_name" type="String" nullable="true" length="100"/>
<column name="user_id" type="Long" length="11" nullable="true"/>
<column name="culture_statement" type="String" nullable="true" length="2000"/>
<column name="client_id" type="Long" length="11" nullable="true"/>
<column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_culture_template" indexName="idx_tl_culture_template_TemplateName" isUnique="true"><column name="template_name"/><column name="user_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_culture_template" indexName="idx_tl_culture_template_TemplateID" isUnique="true"><column name="template_name"/><column name="hiring_team_id"/><column name="company_user_id"/></NODE>
......
......@@ -40,6 +40,7 @@
<column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="occupation_id" type="Long" length="11" nullable="false"/>
<column name="shortened_url_id" type="Long" length="11" nullable="true"/>
<column name="template_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_job" indexName="idx_tl_job_client_id" isUnique="false"><column name="client_id"/></NODE>
......
......@@ -11,9 +11,12 @@
<column name="name" type="String" nullable="false" length="20"/>
<column name="sort_order" type="Long" nullable="false"/>
<column name="application_status" type="String" nullable="false" length="200"/>
<column name="job_id" type="Long" length="11" nullable="false"/>
<column name="job_id" type="Long" length="11" nullable="true"/>
<column name="template_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_work_flow" indexName="idx_tl_work_flow_job_id" isUnique="false"><column name="job_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_work_flow" indexName="idx_tl_work_flow_template_id" isUnique="false"><column name="template_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -9,7 +9,24 @@ CREATE TABLE tl_assessment_template (
object_created_date datetime DEFAULT getdate() NOT NULL
,
template_name varchar(100) NULL,
user_id numeric(12) NULL
job_title varchar(30) NOT NULL,
job_description text NOT NULL,
ref_number varchar(10) NULL,
google_address_text varchar(300) NULL,
location_radius varchar(200) NOT NULL,
remote char(1) NULL,
job_type varchar(200) NOT NULL,
industry varchar(200) NULL,
require_cv char(1) NULL,
assessment_type varchar(200) NOT NULL,
include_assessment_criteria char(1) NOT NULL,
level_id numeric(12) NULL,
occupation_id numeric(12) NOT NULL,
job_owner_id numeric(12) NULL,
job_id numeric(12) NULL,
client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
);
......@@ -22,6 +39,6 @@ ALTER TABLE tl_assessment_template ADD
CREATE UNIQUE INDEX idx_tl_assessment_template_TemplateName ON
tl_assessment_template (template_name, user_id);
CREATE UNIQUE INDEX idx_tl_assessment_template_TemplateID ON
tl_assessment_template (template_name, hiring_team_id, company_user_id);
\ No newline at end of file
......@@ -9,7 +9,10 @@ CREATE TABLE tl_culture_template (
object_created_date datetime DEFAULT getdate() NOT NULL
,
template_name varchar(100) NULL,
user_id numeric(12) NULL
culture_statement varchar(2000) NULL,
client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
);
......@@ -22,6 +25,6 @@ ALTER TABLE tl_culture_template ADD
CREATE UNIQUE INDEX idx_tl_culture_template_TemplateName ON
tl_culture_template (template_name, user_id);
CREATE UNIQUE INDEX idx_tl_culture_template_TemplateID ON
tl_culture_template (template_name, hiring_team_id, company_user_id);
\ No newline at end of file
......@@ -39,7 +39,8 @@ CREATE TABLE tl_job (
company_user_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL
shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL
);
......
......@@ -11,7 +11,8 @@ CREATE TABLE tl_work_flow (
name varchar(20) NOT NULL,
sort_order numeric(12) NOT NULL,
application_status varchar(200) NOT NULL,
job_id numeric(12) NOT NULL
job_id numeric(12) NULL,
template_id numeric(12) NULL
);
......@@ -26,3 +27,6 @@ ALTER TABLE tl_work_flow ADD
CREATE INDEX idx_tl_work_flow_job_id
ON tl_work_flow (job_id);
CREATE INDEX idx_tl_work_flow_template_id
ON tl_work_flow (template_id);
......@@ -10,7 +10,24 @@ CREATE TABLE tl_assessment_template (
object_created_date date DEFAULT SYSDATE NOT NULL
,
template_name varchar2(100) NULL,
user_id number(12) NULL
job_title varchar2(30) NOT NULL,
job_description clob NOT NULL,
ref_number varchar2(10) NULL,
google_address_text varchar2(300) NULL,
location_radius varchar2(200) NOT NULL,
remote char(1) NULL,
job_type varchar2(200) NOT NULL,
industry varchar2(200) NULL,
require_cv char(1) NULL,
assessment_type varchar2(200) NOT NULL,
include_assessment_criteria char(1) NOT NULL,
level_id number(12) NULL,
occupation_id number(12) NOT NULL,
job_owner_id number(12) NULL,
job_id number(12) NULL,
client_id number(12) NULL,
hiring_team_id number(12) NULL,
company_user_id number(12) NULL
);
......@@ -23,6 +40,6 @@ ALTER TABLE tl_assessment_template ADD
CREATE UNIQUE INDEX idx_tl_assessment_template_TemplateName ON
tl_assessment_template (template_name, user_id);
CREATE UNIQUE INDEX idx_tl_assessment_template_TemplateID ON
tl_assessment_template (template_name, hiring_team_id, company_user_id);
\ No newline at end of file
......@@ -10,7 +10,10 @@ CREATE TABLE tl_culture_template (
object_created_date date DEFAULT SYSDATE NOT NULL
,
template_name varchar2(100) NULL,
user_id number(12) NULL
culture_statement varchar2(2000) NULL,
client_id number(12) NULL,
hiring_team_id number(12) NULL,
company_user_id number(12) NULL
);
......@@ -23,6 +26,6 @@ ALTER TABLE tl_culture_template ADD
CREATE UNIQUE INDEX idx_tl_culture_template_TemplateName ON
tl_culture_template (template_name, user_id);
CREATE UNIQUE INDEX idx_tl_culture_template_TemplateID ON
tl_culture_template (template_name, hiring_team_id, company_user_id);
\ No newline at end of file
......@@ -40,7 +40,8 @@ CREATE TABLE tl_job (
company_user_id number(12) NULL,
hiring_team_id number(12) NULL,
occupation_id number(12) NOT NULL,
shortened_url_id number(12) NULL
shortened_url_id number(12) NULL,
template_id number(12) NULL
);
......
......@@ -12,7 +12,8 @@ CREATE TABLE tl_work_flow (
name varchar2(20) NOT NULL,
sort_order number(12) NOT NULL,
application_status varchar2(200) NOT NULL,
job_id number(12) NOT NULL
job_id number(12) NULL,
template_id number(12) NULL
);
......@@ -27,3 +28,6 @@ ALTER TABLE tl_work_flow ADD
CREATE INDEX idx_tl_work_flow_job_id
ON tl_work_flow (job_id);
CREATE INDEX idx_tl_work_flow_template_id
ON tl_work_flow (template_id);
......@@ -10,7 +10,24 @@ CREATE TABLE tl_assessment_template (
object_created_date timestamp DEFAULT NOW() NOT NULL
,
template_name varchar(100) NULL,
user_id numeric(12) NULL
job_title varchar(30) NOT NULL,
job_description text NOT NULL,
ref_number varchar(10) NULL,
google_address_text varchar(300) NULL,
location_radius varchar(200) NOT NULL,
remote char(1) NULL,
job_type varchar(200) NOT NULL,
industry varchar(200) NULL,
require_cv char(1) NULL,
assessment_type varchar(200) NOT NULL,
include_assessment_criteria char(1) NOT NULL,
level_id numeric(12) NULL,
occupation_id numeric(12) NOT NULL,
job_owner_id numeric(12) NULL,
job_id numeric(12) NULL,
client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
);
......@@ -23,6 +40,6 @@ ALTER TABLE tl_assessment_template ADD
CREATE UNIQUE INDEX idx_tl_assessment_template_TemplateName ON
tl_assessment_template (template_name, user_id);
CREATE UNIQUE INDEX idx_tl_assessment_template_TemplateID ON
tl_assessment_template (template_name, hiring_team_id, company_user_id);
\ No newline at end of file
......@@ -10,7 +10,10 @@ CREATE TABLE tl_culture_template (
object_created_date timestamp DEFAULT NOW() NOT NULL
,
template_name varchar(100) NULL,
user_id numeric(12) NULL
culture_statement varchar(2000) NULL,
client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
);
......@@ -23,6 +26,6 @@ ALTER TABLE tl_culture_template ADD
CREATE UNIQUE INDEX idx_tl_culture_template_TemplateName ON
tl_culture_template (template_name, user_id);
CREATE UNIQUE INDEX idx_tl_culture_template_TemplateID ON
tl_culture_template (template_name, hiring_team_id, company_user_id);
\ No newline at end of file
......@@ -40,7 +40,8 @@ CREATE TABLE tl_job (
company_user_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL
shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL
);
......
......@@ -12,7 +12,8 @@ CREATE TABLE tl_work_flow (
name varchar(20) NOT NULL,
sort_order numeric(12) NOT NULL,
application_status varchar(200) NOT NULL,
job_id numeric(12) NOT NULL
job_id numeric(12) NULL,
template_id numeric(12) NULL
);
......@@ -27,3 +28,6 @@ ALTER TABLE tl_work_flow ADD
CREATE INDEX idx_tl_work_flow_job_id
ON tl_work_flow (job_id);
CREATE INDEX idx_tl_work_flow_template_id
ON tl_work_flow (template_id);
......@@ -18,20 +18,21 @@ public class ChangeAssessmentCriteriaFP extends ORMProcessFormProcessor
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute("Job");
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute("Job");
AssessmentCriteriaTemplate template = (AssessmentCriteriaTemplate) request.getAttribute("AssessmentCriteriaTemplate");
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Inside ChangeAssessmentCriteriaFP for ", job, " Include Assessment:", job.getIncludeAssessmentCriteria());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Inside ChangeAssessmentCriteriaFP for ", job != null ? job : template , " Include Assessment:", job != null ? job.getIncludeAssessmentCriteria() : template.getIncludeAssessmentCriteria());
if(!job.isTrue(job.getIncludeAssessmentCriteria()))
if(job != null ? !job.isTrue(job.getIncludeAssessmentCriteria()) : !template.isTrue(template.getIncludeAssessmentCriteria()))
{
for(AssessmentCriteria assessmentCriteria : job.getAssessmentCriteriasSet())
for(AssessmentCriteria assessmentCriteria : job != null ? job.getAssessmentCriteriasSet() : template.getAssessmentCriteriasSet())
{
assessmentCriteria.delete();
}
}
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "ChangeAssessmentCriteriaFP completed for ", job);
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "ChangeAssessmentCriteriaFP completed for ", job != null ? job : template);
return RedisplayResult.getInstance();
}
......
......@@ -23,15 +23,18 @@ public class LoadJobFromTemplateFP extends ORMProcessFormProcessor
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute("Job");
Job jobTemplate = job.getJobTemplate();
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute("Job");
AssessmentCriteriaTemplate jobTemplate = job.getAssessmentTemplate();
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Inside LoadJobFromTemplateFP for ", job, " load from template:", jobTemplate);
if(jobTemplate != null)
{
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Inside LoadJobFromTemplateFP for ", job, " load from template:", jobTemplate);
Utils.setupJobFromTemplate(job, jobTemplate);
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "LoadJobFromTemplateFP completed for ", job);
Utils.setupJobFromTemplate(job, jobTemplate, process.getTransaction());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "LoadJobFromTemplateFP completed for ", job);
}
return RedisplayResult.getInstance();
}
......
......@@ -4,58 +4,58 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.servlets.forms.NavigationFP;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessFormProcessor;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.ProcessRedirectResult;
import oneit.utils.BusinessException;
import oneit.utils.MultiException;
import performa.orm.Job;
import performa.utils.Utils;
public class NavigateToCreateJobFP extends NavigationFP
public class NavigateToCreateJobFP extends ORMProcessFormProcessor
{
@Override
public SuccessfulResult processForm(SubmissionDetails submission) throws BusinessException
protected Map validate(SubmissionDetails submission, MultiException exceptions)
{
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute ("Job");
LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"In NavigateToCreateJobFP navigating to create job with from template : ", job.getFromTemplate());
if(job.isTrue(job.getFromTemplate()))
if(job != null && job.isTrue(job.getFromTemplate()))
{
BusinessObjectParser.assertFieldCondition(job.getAssessmentTemplate() != null , job, Job.SINGLEREFERENCE_AssessmentTemplate, "mandatory", exceptions, true, request);
}
return super.validate(submission, exceptions);
}
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map map) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute ("Job");
String nextPage = (String) request.getAttribute("nextPage");
LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"In NavigateToCreateJobFP navigating to create job with from template : ", job.getFromTemplate());
if(job.isTrue(job.getFromTemplate()))
{
if(job.getJobTemplate() == null)
if(job.getAssessmentTemplate() == null)
{
throw new BusinessException("Please select a template before starting the job");
}
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Inside NavigateToCreateJobFP for ", job, " load from template:", job.getJobTemplate());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Inside NavigateToCreateJobFP for ", job, " load from template:", job.getAssessmentTemplate());
Utils.setupJobFromTemplate(job, job.getJobTemplate());
Utils.setupJobFromTemplate(job, job.getAssessmentTemplate(), process.getTransaction());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "NavigateToCreateJobFP completed for ", job);
}
return super.processForm(submission);
}
@Override
protected Map validate(SubmissionDetails submission, MultiException exceptions)
{
HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute ("Job");
if(job != null && job.isTrue(job.getFromTemplate()))
{
BusinessObjectParser.assertFieldCondition(job.getJobTemplate() != null , job, Job.SINGLEREFERENCE_JobTemplate, "mandatory", exceptions, true, request);
}
return super.validate(submission, exceptions);
return new ProcessRedirectResult (nextPage, new String[]{});
}
}
......@@ -15,6 +15,7 @@ import oneit.servlets.process.ORMProcessFormProcessor;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.utils.NotificationUtils;
import oneit.utils.*;
import performa.orm.CompanyUser;
import performa.orm.CultureCriteria;
import performa.orm.CultureCriteriaTemplate;
import performa.orm.Job;
......@@ -39,8 +40,12 @@ public class SaveCultureTemplateFP extends ORMProcessFormProcessor
objTran.runInNewTX((ObjectTransaction newObjTran) -> {
CultureCriteriaTemplate newTemplate = CultureCriteriaTemplate.createCultureCriteriaTemplate(newObjTran);
SecUser secUser = SecUser.getTXUser(newObjTran);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
newTemplate.setUser(SecUser.getTXUser(newObjTran));
newTemplate.setCompanyUser(companyUser);
newTemplate.setClient(job.getClient().getInTransaction(newObjTran));
newTemplate.setHiringTeam(job.getHiringTeam().getInTransaction(newObjTran));
newTemplate.setTemplateName(job.getCultureTemplateName());
for(CultureCriteria criteria : job.getCultureCriteriasSet())
......@@ -77,9 +82,10 @@ public class SaveCultureTemplateFP extends ORMProcessFormProcessor
for(CultureCriteria criteria: job.getCultureCriteriasSet())
{
if(criteria.isRatingRequired())
if(criteria.getIsApplicable())
{
BusinessObjectParser.assertFieldCondition(criteria.getCultureElementRating() != null, criteria , CultureCriteria.SINGLEREFERENCE_CultureElementRating, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(criteria.getImportance() != null, criteria , CultureCriteria.FIELD_Importance, "mandatory", exceptions, true, request);
}
}
......
......@@ -16,7 +16,9 @@ import oneit.servlets.process.ORMProcessState;
import oneit.utils.*;
import performa.orm.AssessmentCriteria;
import performa.orm.AssessmentCriteriaTemplate;
import performa.orm.CompanyUser;
import performa.orm.Job;
import performa.orm.WorkFlow;
/**
*
......@@ -36,9 +38,38 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
objTran.runInNewTX((ObjectTransaction newObjTran) -> {
AssessmentCriteriaTemplate newTemplate = AssessmentCriteriaTemplate.createAssessmentCriteriaTemplate(newObjTran);
SecUser secUser = SecUser.getTXUser(newObjTran);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
newTemplate.setUser(SecUser.getTXUser(newObjTran));
newTemplate.setCompanyUser(companyUser);
newTemplate.setTemplateName(job.getAssessmentTemplateName());
newTemplate.setHiringTeam(job.getHiringTeam().getInTransaction(newObjTran));
newTemplate.setJobTitle(job.getJobTitle());
newTemplate.setReferenceNumber(job.getReferenceNumber());
newTemplate.setJobDescription(job.getJobDescription());
newTemplate.setJobOwner(job.getJobOwner().getInTransaction(newObjTran));
newTemplate.setClient(job.getClient().getInTransaction(newObjTran));
newTemplate.setGoogleAddressText(job.getGoogleAddressText());
newTemplate.setExpectedCandidateRadius(job.getExpectedCandidateRadius());
newTemplate.setRemote(job.getRemote());
newTemplate.setJobType(job.getJobType());
newTemplate.setIndustry(job.getIndustry());
newTemplate.setOccupation(job.getOccupation().getInTransaction(newObjTran));
newTemplate.setRequireCV(job.getRequireCV());
newTemplate.setAssessmentType(job.getAssessmentType());
newTemplate.setLevel(job.getLevel().getInTransaction(newObjTran));
for (WorkFlow workflow : job.getWorkFlowsSet())
{
WorkFlow workflowCopy = WorkFlow.createWorkFlow(newObjTran);
workflowCopy.copyAttributesFrom(workflow);
newTemplate.addToWorkFlows(workflowCopy);
}
for (AssessmentCriteria criteria : job.getAssessmentCriteriasSet())
{
......
package performa.orm;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.objstore.rdbms.filters.GreaterThanFilter;
import oneit.objstore.rdbms.filters.LessThanFilter;
import oneit.objstore.utils.ObjstoreUtils;
import oneit.utils.CollectionUtils;
import oneit.utils.ObjectTransform;
import oneit.utils.filter.CollectionFilter;
import oneit.utils.filter.Filter;
import performa.orm.types.AssessmentType;
import performa.orm.types.CriteriaType;
public class AssessmentCriteriaTemplate extends BaseAssessmentCriteriaTemplate
{
......@@ -17,4 +31,65 @@ public class AssessmentCriteriaTemplate extends BaseAssessmentCriteriaTemplate
{
return getTemplateName();
}
public List<WorkFlow> getSortedMiddleWorkFlows()
{
Filter<WorkFlow> filter = WorkFlow.SearchByAll().andSortOrder(new LessThanFilter<>(9)).andSortOrder(new GreaterThanFilter<>(1));
return ObjstoreUtils.sort(pipelineAssessmentCriteriaTemplate().toWorkFlows(filter).uniqueVals(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
}
public WorkFlow getWorkFlowBySortOrder(int sortOrder)
{
Filter<WorkFlow> filter = WorkFlow.SearchByAll().andSortOrder(new EqualsFilter<>(sortOrder));
return pipelineAssessmentCriteriaTemplate().toWorkFlows(filter).val();
}
public String getLevelClass(Level level)
{
if(!showLevelOption(level))
{
return "hide";
}
if(CollectionUtils.equals(level, getLevel()))
{
return "active";
}
return "";
}
public boolean showLevelOption(Level level)
{
if(isExpressJob())
{
return isTrue(level.getAppliedToExpress());
}
return !isTrue(level.getAppliedToExpress());
}
public boolean isExpressJob()
{
return getAssessmentType() == AssessmentType.EXPRESS;
}
public boolean showAssessmentCriteriaSection()
{
return isTrue(getIncludeAssessmentCriteria());
}
public Collection<AssessmentCriteria> getAssessmentCriteraByType(CriteriaType criteria)
{
Filter filter = AssessmentCriteria.SearchByAll().andCriteriaType(new EqualsFilter<>(criteria));
return CollectionFilter.filter(getAssessmentCriteriasSet(), filter);
}
public int getAssessmentCriteraCountByType(CriteriaType criteria)
{
return getAssessmentCriteraByType(criteria).size();
}
}
\ No newline at end of file
......@@ -4,25 +4,40 @@
<BUSINESSCLASS name="AssessmentCriteriaTemplate" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<IMPORT value="oneit.security.*"/>
<TRANSIENT name="OccupationId" type="String" />
<MULTIPLEREFERENCE name="AssessmentCriterias" type="AssessmentCriteria" backreferenceName="Template" />
<MULTIPLEREFERENCE name="WorkFlows" type="WorkFlow" backreferenceName="Template" />
<TABLE name="tl_assessment_template" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="TemplateName" type="String" dbcol="template_name" length="100" uniqueGroup="TemplateName"/>
<SINGLEREFERENCE name="User" type="SecUser" dbcol="user_id" uniqueGroup="TemplateName"/>
<ATTRIB name="TemplateName" type="String" dbcol="template_name" length="100" uniqueGroup="TemplateID"/>
<ATTRIB name="JobTitle" type="String" dbcol="job_title" length="30" mandatory="true"/>
<ATTRIB name="JobDescription" type="String" dbcol="job_description" mandatory="true"/>
<ATTRIB name="ReferenceNumber" type="String" dbcol="ref_number" length="10"/>
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" />
<ATTRIB name="ExpectedCandidateRadius" type="LocationRadius" dbcol="location_radius" defaultValue="LocationRadius.KM100" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="Remote" type="Boolean" dbcol="remote" defaultValue="Boolean.FALSE"/>
<ATTRIB name="JobType" type="JobType" dbcol="job_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="JobType.FULL_TIME"/>
<ATTRIB name="Industry" type="Industry" dbcol="industry" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="RequireCV" type="Boolean" dbcol="require_cv" defaultValue="Boolean.FALSE"/>
<ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" mandatory="true" defaultValue="AssessmentType.COMPREHENSIVE"/>
<ATTRIB name="IncludeAssessmentCriteria" type="Boolean" dbcol="include_assessment_criteria" mandatory="true" defaultValue="Boolean.TRUE"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="false"/>
<SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/>
<SINGLEREFERENCE name="JobOwner" type="CompanyUser" dbcol="job_owner_id" />
<SINGLEREFERENCE name="Job" type="Job" dbcol="job_id" />
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" />
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" uniqueGroup="TemplateID"/>
<SINGLEREFERENCE name="CompanyUser" type="CompanyUser" dbcol="company_user_id" uniqueGroup="TemplateID"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_assessment_template.object_id is not null" orderBy="tl_assessment_template.object_id" />
<SEARCH type="Company" paramFilter="tl_assessment_template.object_id is not null" orderBy="tl_assessment_template.object_id">
<TABLE name="oneit_sec_user_extension" join="oneit_sec_user_extension.user_id = tl_assessment_template.user_id"/>
<TABLE name="tl_company" join="tl_company.object_id = oneit_sec_user_extension.company_id"/>
<PARAM name="Company" type="Company" transform="Company.getObjectID ()" paramFilter="tl_company.object_id = ${Company}"/>
</SEARCH>
</BUSINESSCLASS>
......
......@@ -14,6 +14,7 @@ import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import performa.orm.types.*;
import oneit.security.*;
......@@ -28,10 +29,32 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
// Private attributes corresponding to business object data
private String dummyTemplateName;
private String dummyJobTitle;
private String dummyJobDescription;
private String dummyReferenceNumber;
private String dummyGoogleAddressText;
private LocationRadius dummyExpectedCandidateRadius;
private Boolean dummyRemote;
private JobType dummyJobType;
private Industry dummyIndustry;
private Boolean dummyRequireCV;
private AssessmentType dummyAssessmentType;
private Boolean dummyIncludeAssessmentCriteria;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_TemplateName = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_JobTitle = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_JobDescription = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_ReferenceNumber = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_ExpectedCandidateRadius = new EnumeratedAttributeHelper (LocationRadius.FACTORY_LocationRadius);
private static final DefaultAttributeHelper HELPER_Remote = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_JobType = new EnumeratedAttributeHelper (JobType.FACTORY_JobType);
private static final EnumeratedAttributeHelper HELPER_Industry = new EnumeratedAttributeHelper (Industry.FACTORY_Industry);
private static final DefaultAttributeHelper HELPER_RequireCV = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_AssessmentType = new EnumeratedAttributeHelper (AssessmentType.FACTORY_AssessmentType);
private static final DefaultAttributeHelper HELPER_IncludeAssessmentCriteria = DefaultAttributeHelper.INSTANCE;
......@@ -39,10 +62,21 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
public AssessmentCriteriaTemplatePersistenceMgr ()
{
dummyTemplateName = (String)(HELPER_TemplateName.initialise (dummyTemplateName));
dummyJobTitle = (String)(HELPER_JobTitle.initialise (dummyJobTitle));
dummyJobDescription = (String)(HELPER_JobDescription.initialise (dummyJobDescription));
dummyReferenceNumber = (String)(HELPER_ReferenceNumber.initialise (dummyReferenceNumber));
dummyGoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (dummyGoogleAddressText));
dummyExpectedCandidateRadius = (LocationRadius)(HELPER_ExpectedCandidateRadius.initialise (dummyExpectedCandidateRadius));
dummyRemote = (Boolean)(HELPER_Remote.initialise (dummyRemote));
dummyJobType = (JobType)(HELPER_JobType.initialise (dummyJobType));
dummyIndustry = (Industry)(HELPER_Industry.initialise (dummyIndustry));
dummyRequireCV = (Boolean)(HELPER_RequireCV.initialise (dummyRequireCV));
dummyAssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (dummyAssessmentType));
dummyIncludeAssessmentCriteria = (Boolean)(HELPER_IncludeAssessmentCriteria.initialise (dummyIncludeAssessmentCriteria));
}
private String SELECT_COLUMNS = "{PREFIX}tl_assessment_template.object_id as id, {PREFIX}tl_assessment_template.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_assessment_template.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_assessment_template.template_name, {PREFIX}tl_assessment_template.user_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_assessment_template.object_id as id, {PREFIX}tl_assessment_template.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_assessment_template.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_assessment_template.template_name, {PREFIX}tl_assessment_template.job_title, {PREFIX}tl_assessment_template.job_description, {PREFIX}tl_assessment_template.ref_number, {PREFIX}tl_assessment_template.google_address_text, {PREFIX}tl_assessment_template.location_radius, {PREFIX}tl_assessment_template.remote, {PREFIX}tl_assessment_template.job_type, {PREFIX}tl_assessment_template.industry, {PREFIX}tl_assessment_template.require_cv, {PREFIX}tl_assessment_template.assessment_type, {PREFIX}tl_assessment_template.include_assessment_criteria, {PREFIX}tl_assessment_template.level_id, {PREFIX}tl_assessment_template.occupation_id, {PREFIX}tl_assessment_template.job_owner_id, {PREFIX}tl_assessment_template.job_id, {PREFIX}tl_assessment_template.client_id, {PREFIX}tl_assessment_template.hiring_team_id, {PREFIX}tl_assessment_template.company_user_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -94,7 +128,24 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
// Check for persistent sets already prefetched
if (false || !tl_assessment_templatePSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_TemplateName)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_User))
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_JobTitle)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_JobDescription)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_ReferenceNumber)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_GoogleAddressText)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_ExpectedCandidateRadius)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_Remote)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_JobType)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_Industry)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_RequireCV)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_AssessmentType)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.FIELD_IncludeAssessmentCriteria)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Level)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Occupation)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_JobOwner)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Job)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Client)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_HiringTeam)||
!tl_assessment_templatePSet.containsAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_CompanyUser))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
......@@ -164,10 +215,10 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_assessment_template " +
"SET template_name = ?, user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET template_name = ?, job_title = ?, job_description = ?, ref_number = ?, google_address_text = ?, location_radius = ?, remote = ?, job_type = ?, industry = ?, require_cv = ?, assessment_type = ?, include_assessment_criteria = ?, level_id = ? , occupation_id = ? , job_owner_id = ? , job_id = ? , client_id = ? , hiring_team_id = ? , company_user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_assessment_template.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_TemplateName))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_User)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_TemplateName))).listEntry (HELPER_JobTitle.getForSQL(dummyJobTitle, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_JobTitle))).listEntry (HELPER_JobDescription.getForSQL(dummyJobDescription, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_JobDescription))).listEntry (HELPER_ReferenceNumber.getForSQL(dummyReferenceNumber, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_ReferenceNumber))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_GoogleAddressText))).listEntry (HELPER_ExpectedCandidateRadius.getForSQL(dummyExpectedCandidateRadius, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_ExpectedCandidateRadius))).listEntry (HELPER_Remote.getForSQL(dummyRemote, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_Remote))).listEntry (HELPER_JobType.getForSQL(dummyJobType, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_JobType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_Industry))).listEntry (HELPER_RequireCV.getForSQL(dummyRequireCV, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_RequireCV))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_AssessmentType))).listEntry (HELPER_IncludeAssessmentCriteria.getForSQL(dummyIncludeAssessmentCriteria, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_IncludeAssessmentCriteria))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Occupation)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_JobOwner)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Job)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_CompanyUser)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -255,10 +306,6 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public ResultSet executeSearchQueryCompany (SQLManager sqlMgr, Company Company) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryCompany");
}
......@@ -408,56 +455,6 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
return results;
}
else if (searchType.equals (AssessmentCriteriaTemplate.SEARCH_Company))
{
// Local scope for transformed variables
{
if (criteria.containsKey("Company"))
{
Company Company = (Company)(criteria.get("Company"));
criteria.put ("Company", Company.getObjectID ());
}
}
String orderBy = " ORDER BY tl_assessment_template.object_id";
String tables = ", oneit_sec_user_extension, tl_company ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_assessment_template.object_id is not null
String preFilter = "(tl_assessment_template.object_id is not null)"
+ " AND (oneit_sec_user_extension.user_id = tl_assessment_template.user_id) AND (tl_company.object_id = oneit_sec_user_extension.company_id) ";
if (criteria.containsKey("Company"))
{
preFilter += " AND (tl_company.object_id = ${Company}) ";
preFilter += "";
}
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_assessment_template " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
......@@ -478,8 +475,25 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
tl_assessment_templatePSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_TemplateName, HELPER_TemplateName.getFromRS(dummyTemplateName, r, "template_name"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_JobTitle, HELPER_JobTitle.getFromRS(dummyJobTitle, r, "job_title"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_JobDescription, HELPER_JobDescription.getFromRS(dummyJobDescription, r, "job_description"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_ReferenceNumber, HELPER_ReferenceNumber.getFromRS(dummyReferenceNumber, r, "ref_number"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_GoogleAddressText, HELPER_GoogleAddressText.getFromRS(dummyGoogleAddressText, r, "google_address_text"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_ExpectedCandidateRadius, HELPER_ExpectedCandidateRadius.getFromRS(dummyExpectedCandidateRadius, r, "location_radius"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_Remote, HELPER_Remote.getFromRS(dummyRemote, r, "remote"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_JobType, HELPER_JobType.getFromRS(dummyJobType, r, "job_type"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_Industry, HELPER_Industry.getFromRS(dummyIndustry, r, "industry"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_RequireCV, HELPER_RequireCV.getFromRS(dummyRequireCV, r, "require_cv"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_AssessmentType, HELPER_AssessmentType.getFromRS(dummyAssessmentType, r, "assessment_type"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.FIELD_IncludeAssessmentCriteria, HELPER_IncludeAssessmentCriteria.getFromRS(dummyIncludeAssessmentCriteria, r, "include_assessment_criteria"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_User, r.getObject ("user_id"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Level, r.getObject ("level_id"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Occupation, r.getObject ("occupation_id"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_JobOwner, r.getObject ("job_owner_id"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Job, r.getObject ("job_id"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_Client, r.getObject ("client_id"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_HiringTeam, r.getObject ("hiring_team_id"));
tl_assessment_templatePSet.setAttrib(AssessmentCriteriaTemplate.SINGLEREFERENCE_CompanyUser, r.getObject ("company_user_id"));
}
......@@ -496,10 +510,10 @@ public class AssessmentCriteriaTemplatePersistenceMgr extends ObjectPersistenceM
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_assessment_template " +
" (template_name, user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (template_name, job_title, job_description, ref_number, google_address_text, location_radius, remote, job_type, industry, require_cv, assessment_type, include_assessment_criteria, level_id, occupation_id, job_owner_id, job_id, client_id, hiring_team_id, company_user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_TemplateName))) .listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_User)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_TemplateName))).listEntry (HELPER_JobTitle.getForSQL(dummyJobTitle, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_JobTitle))).listEntry (HELPER_JobDescription.getForSQL(dummyJobDescription, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_JobDescription))).listEntry (HELPER_ReferenceNumber.getForSQL(dummyReferenceNumber, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_ReferenceNumber))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_GoogleAddressText))).listEntry (HELPER_ExpectedCandidateRadius.getForSQL(dummyExpectedCandidateRadius, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_ExpectedCandidateRadius))).listEntry (HELPER_Remote.getForSQL(dummyRemote, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_Remote))).listEntry (HELPER_JobType.getForSQL(dummyJobType, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_JobType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_Industry))).listEntry (HELPER_RequireCV.getForSQL(dummyRequireCV, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_RequireCV))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_AssessmentType))).listEntry (HELPER_IncludeAssessmentCriteria.getForSQL(dummyIncludeAssessmentCriteria, tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.FIELD_IncludeAssessmentCriteria))) .listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Occupation)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_JobOwner)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Job)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_assessment_templatePSet.getAttrib (AssessmentCriteriaTemplate.SINGLEREFERENCE_CompanyUser)))) .listEntry (objectID.longID ()).toList().toArray());
tl_assessment_templatePSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -41,25 +41,31 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
// Static constants corresponding to field names
public static final String FIELD_TemplateName = "TemplateName";
public static final String SINGLEREFERENCE_User = "User";
public static final String FIELD_CultureStatement = "CultureStatement";
public static final String SINGLEREFERENCE_Client = "Client";
public static final String SINGLEREFERENCE_HiringTeam = "HiringTeam";
public static final String SINGLEREFERENCE_CompanyUser = "CompanyUser";
public static final String MULTIPLEREFERENCE_CultureCriterias = "CultureCriterias";
public static final String BACKREF_CultureCriterias = "";
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
public static final String SEARCH_Company = "Company";
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<CultureCriteriaTemplate> HELPER_TemplateName = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CultureCriteriaTemplate> HELPER_CultureStatement = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
private String _TemplateName;
private String _CultureStatement;
// Private attributes corresponding to single references
private SingleAssociation<CultureCriteriaTemplate, SecUser> _User;
private SingleAssociation<CultureCriteriaTemplate, Client> _Client;
private SingleAssociation<CultureCriteriaTemplate, HiringTeam> _HiringTeam;
private SingleAssociation<CultureCriteriaTemplate, CompanyUser> _CompanyUser;
// Private attributes corresponding to multiple references
......@@ -71,6 +77,7 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_TemplateName_Validators;
private static final AttributeValidator[] FIELD_CultureStatement_Validators;
// Arrays of behaviour decorators
......@@ -86,8 +93,11 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_CultureCriterias();
setupAssocMetaData_User();
setupAssocMetaData_Client();
setupAssocMetaData_HiringTeam();
setupAssocMetaData_CompanyUser();
FIELD_TemplateName_Validators = (AttributeValidator[])setupAttribMetaData_TemplateName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CultureStatement_Validators = (AttributeValidator[])setupAttribMetaData_CultureStatement(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_CultureCriteriaTemplate.initialiseReference ();
......@@ -117,17 +127,46 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
// Meta Info setup
private static void setupAssocMetaData_User()
private static void setupAssocMetaData_Client()
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "user_id");
metaInfo.put ("name", "User");
metaInfo.put ("type", "SecUser");
metaInfo.put ("uniqueGroup", "TemplateName");
metaInfo.put ("dbcol", "client_id");
metaInfo.put ("name", "Client");
metaInfo.put ("type", "Client");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CultureCriteriaTemplate.User:", metaInfo);
ATTRIBUTES_METADATA_CultureCriteriaTemplate.put (SINGLEREFERENCE_User, Collections.unmodifiableMap (metaInfo));
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CultureCriteriaTemplate.Client:", metaInfo);
ATTRIBUTES_METADATA_CultureCriteriaTemplate.put (SINGLEREFERENCE_Client, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_HiringTeam()
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "hiring_team_id");
metaInfo.put ("name", "HiringTeam");
metaInfo.put ("type", "HiringTeam");
metaInfo.put ("uniqueGroup", "TemplateID");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CultureCriteriaTemplate.HiringTeam:", metaInfo);
ATTRIBUTES_METADATA_CultureCriteriaTemplate.put (SINGLEREFERENCE_HiringTeam, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_CompanyUser()
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "company_user_id");
metaInfo.put ("name", "CompanyUser");
metaInfo.put ("type", "CompanyUser");
metaInfo.put ("uniqueGroup", "TemplateID");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CultureCriteriaTemplate.CompanyUser:", metaInfo);
ATTRIBUTES_METADATA_CultureCriteriaTemplate.put (SINGLEREFERENCE_CompanyUser, Collections.unmodifiableMap (metaInfo));
}
......@@ -140,7 +179,7 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
metaInfo.put ("length", "100");
metaInfo.put ("name", "TemplateName");
metaInfo.put ("type", "String");
metaInfo.put ("uniqueGroup", "TemplateName");
metaInfo.put ("uniqueGroup", "TemplateID");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CultureCriteriaTemplate.TemplateName:", metaInfo);
ATTRIBUTES_METADATA_CultureCriteriaTemplate.put (FIELD_TemplateName, Collections.unmodifiableMap (metaInfo));
......@@ -151,6 +190,25 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_CultureStatement(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "culture_statement");
metaInfo.put ("length", "2000");
metaInfo.put ("name", "CultureStatement");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CultureCriteriaTemplate.CultureStatement:", metaInfo);
ATTRIBUTES_METADATA_CultureCriteriaTemplate.put (FIELD_CultureStatement, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CultureCriteriaTemplate.class, "CultureStatement", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CultureCriteriaTemplate.CultureStatement:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
......@@ -179,6 +237,7 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
_TemplateName = (String)(HELPER_TemplateName.initialise (_TemplateName));
_CultureStatement = (String)(HELPER_CultureStatement.initialise (_CultureStatement));
}
......@@ -187,7 +246,9 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
super._initialiseAssociations ();
_User = new SingleAssociation<CultureCriteriaTemplate, SecUser> (this, SINGLEREFERENCE_User, null, SecUser.REFERENCE_SecUser, "tl_culture_template");
_Client = new SingleAssociation<CultureCriteriaTemplate, Client> (this, SINGLEREFERENCE_Client, null, Client.REFERENCE_Client, "tl_culture_template");
_HiringTeam = new SingleAssociation<CultureCriteriaTemplate, HiringTeam> (this, SINGLEREFERENCE_HiringTeam, null, HiringTeam.REFERENCE_HiringTeam, "tl_culture_template");
_CompanyUser = new SingleAssociation<CultureCriteriaTemplate, CompanyUser> (this, SINGLEREFERENCE_CompanyUser, null, CompanyUser.REFERENCE_CompanyUser, "tl_culture_template");
_CultureCriterias = new MultipleAssociation<CultureCriteriaTemplate, CultureCriteria> (this, MULTIPLEREFERENCE_CultureCriterias, CultureCriteria.SINGLEREFERENCE_Template, CultureCriteria.REFERENCE_CultureCriteria);
}
......@@ -198,7 +259,9 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
super.initialiseReference ();
_User = new SingleAssociation<CultureCriteriaTemplate, SecUser> (this, SINGLEREFERENCE_User, null, SecUser.REFERENCE_SecUser, "tl_culture_template");
_Client = new SingleAssociation<CultureCriteriaTemplate, Client> (this, SINGLEREFERENCE_Client, null, Client.REFERENCE_Client, "tl_culture_template");
_HiringTeam = new SingleAssociation<CultureCriteriaTemplate, HiringTeam> (this, SINGLEREFERENCE_HiringTeam, null, HiringTeam.REFERENCE_HiringTeam, "tl_culture_template");
_CompanyUser = new SingleAssociation<CultureCriteriaTemplate, CompanyUser> (this, SINGLEREFERENCE_CompanyUser, null, CompanyUser.REFERENCE_CompanyUser, "tl_culture_template");
_CultureCriterias = new MultipleAssociation<CultureCriteriaTemplate, CultureCriteria> (this, MULTIPLEREFERENCE_CultureCriterias, CultureCriteria.SINGLEREFERENCE_Template, CultureCriteria.REFERENCE_CultureCriteria);
......@@ -305,6 +368,104 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
}
}
/**
* Get the attribute CultureStatement
*/
public String getCultureStatement ()
{
assertValid();
String valToReturn = _CultureStatement;
for (CultureCriteriaTemplateBehaviourDecorator bhd : CultureCriteriaTemplate_BehaviourDecorators)
{
valToReturn = bhd.getCultureStatement ((CultureCriteriaTemplate)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 preCultureStatementChange (String newCultureStatement) 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 postCultureStatementChange () throws FieldException
{
}
public FieldWriteability getWriteability_CultureStatement ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute CultureStatement. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCultureStatement (String newCultureStatement) throws FieldException
{
boolean oldAndNewIdentical = HELPER_CultureStatement.compare (_CultureStatement, newCultureStatement);
try
{
for (CultureCriteriaTemplateBehaviourDecorator bhd : CultureCriteriaTemplate_BehaviourDecorators)
{
newCultureStatement = bhd.setCultureStatement ((CultureCriteriaTemplate)this, newCultureStatement);
oldAndNewIdentical = HELPER_CultureStatement.compare (_CultureStatement, newCultureStatement);
}
if (FIELD_CultureStatement_Validators.length > 0)
{
Object newCultureStatementObj = HELPER_CultureStatement.toObject (newCultureStatement);
if (newCultureStatementObj != null)
{
int loopMax = FIELD_CultureStatement_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CultureCriteriaTemplate.get (FIELD_CultureStatement);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_CultureStatement_Validators[v].checkAttribute (this, FIELD_CultureStatement, metadata, newCultureStatementObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_CultureStatement () != FieldWriteability.FALSE, "Field CultureStatement is not writeable");
preCultureStatementChange (newCultureStatement);
markFieldChange (FIELD_CultureStatement);
_CultureStatement = newCultureStatement;
postFieldChange (FIELD_CultureStatement);
postCultureStatementChange ();
}
}
/**
......@@ -315,7 +476,11 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
List result = super.getSingleAssocs ();
result.add("User");
result.add("Client");
result.add("HiringTeam");
result.add("CompanyUser");
return result;
......@@ -328,9 +493,15 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_User))
else if (assocName.equals (SINGLEREFERENCE_Client))
{
return _User.getReferencedType ();
return _Client.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
{
return _HiringTeam.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_CompanyUser))
{
return _CompanyUser.getReferencedType ();
}
else
{
......@@ -345,7 +516,13 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_User))
else if (assocName.equals (SINGLEREFERENCE_Client))
{
return null ;
}else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
{
return null ;
}else if (assocName.equals (SINGLEREFERENCE_CompanyUser))
{
return null ;
}
......@@ -362,9 +539,15 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_User))
else if (assocName.equals (SINGLEREFERENCE_Client))
{
return getUser ();
return getClient ();
}else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
{
return getHiringTeam ();
}else if (assocName.equals (SINGLEREFERENCE_CompanyUser))
{
return getCompanyUser ();
}
else
{
......@@ -379,9 +562,15 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_User))
else if (assocName.equals (SINGLEREFERENCE_Client))
{
return getClient (getType);
}else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
{
return getUser (getType);
return getHiringTeam (getType);
}else if (assocName.equals (SINGLEREFERENCE_CompanyUser))
{
return getCompanyUser (getType);
}
else
{
......@@ -396,9 +585,15 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_User))
else if (assocName.equals (SINGLEREFERENCE_Client))
{
return getClientID ();
}else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
{
return getHiringTeamID ();
}else if (assocName.equals (SINGLEREFERENCE_CompanyUser))
{
return getUserID ();
return getCompanyUserID ();
}
else
{
......@@ -413,9 +608,15 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_User))
else if (assocName.equals (SINGLEREFERENCE_Client))
{
setUser ((SecUser)(newValue));
setClient ((Client)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
{
setHiringTeam ((HiringTeam)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_CompanyUser))
{
setCompanyUser ((CompanyUser)(newValue));
}
else
{
......@@ -426,20 +627,20 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
/**
* Get the reference User
* Get the reference Client
*/
public SecUser getUser () throws StorageException
public Client getClient () throws StorageException
{
assertValid();
try
{
return (SecUser)(_User.get ());
return (Client)(_Client.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in CultureCriteriaTemplate:", this.getObjectID (), ", was trying to get SecUser:", getUserID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _User.get ().getClass ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in CultureCriteriaTemplate:", this.getObjectID (), ", was trying to get Client:", getClientID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _Client.get ().getClass ());
throw e;
}
}
......@@ -448,27 +649,27 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public SecUser getUser (Get getType) throws StorageException
public Client getClient (Get getType) throws StorageException
{
assertValid();
return _User.get(getType);
return _Client.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getUserID ()
public Long getClientID ()
{
assertValid();
if (_User == null)
if (_Client == null)
{
return null;
}
else
{
return _User.getID ();
return _Client.getID ();
}
}
......@@ -476,7 +677,7 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
* 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 preUserChange (SecUser newUser) throws FieldException
protected void preClientChange (Client newClient) throws FieldException
{
}
......@@ -486,36 +687,224 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postUserChange () throws FieldException
protected void postClientChange () throws FieldException
{
}
public FieldWriteability getWriteability_User ()
public FieldWriteability getWriteability_Client ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference User. Checks to ensure a new value
* Set the reference Client. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setUser (SecUser newUser) throws StorageException, FieldException
public void setClient (Client newClient) throws StorageException, FieldException
{
if (_User.wouldReferencedChange (newUser))
if (_Client.wouldReferencedChange (newClient))
{
assertValid();
Debug.assertion (getWriteability_User () != FieldWriteability.FALSE, "Assoc User is not writeable");
preUserChange (newUser);
Debug.assertion (getWriteability_Client () != FieldWriteability.FALSE, "Assoc Client is not writeable");
preClientChange (newClient);
_User.set (newUser);
_Client.set (newClient);
postUserChange ();
postClientChange ();
}
}
/**
* Get the reference HiringTeam
*/
public HiringTeam getHiringTeam () throws StorageException
{
assertValid();
try
{
return (HiringTeam)(_HiringTeam.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in CultureCriteriaTemplate:", this.getObjectID (), ", was trying to get HiringTeam:", getHiringTeamID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _HiringTeam.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public HiringTeam getHiringTeam (Get getType) throws StorageException
{
assertValid();
return _HiringTeam.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getHiringTeamID ()
{
assertValid();
if (_HiringTeam == null)
{
return null;
}
else
{
return _HiringTeam.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 preHiringTeamChange (HiringTeam newHiringTeam) 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 postHiringTeamChange () throws FieldException
{
}
public FieldWriteability getWriteability_HiringTeam ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference HiringTeam. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setHiringTeam (HiringTeam newHiringTeam) throws StorageException, FieldException
{
if (_HiringTeam.wouldReferencedChange (newHiringTeam))
{
assertValid();
Debug.assertion (getWriteability_HiringTeam () != FieldWriteability.FALSE, "Assoc HiringTeam is not writeable");
preHiringTeamChange (newHiringTeam);
_HiringTeam.set (newHiringTeam);
postHiringTeamChange ();
}
}
/**
* Get the reference CompanyUser
*/
public CompanyUser getCompanyUser () throws StorageException
{
assertValid();
try
{
return (CompanyUser)(_CompanyUser.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in CultureCriteriaTemplate:", this.getObjectID (), ", was trying to get CompanyUser:", getCompanyUserID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _CompanyUser.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public CompanyUser getCompanyUser (Get getType) throws StorageException
{
assertValid();
return _CompanyUser.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getCompanyUserID ()
{
assertValid();
if (_CompanyUser == null)
{
return null;
}
else
{
return _CompanyUser.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 preCompanyUserChange (CompanyUser newCompanyUser) 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 postCompanyUserChange () throws FieldException
{
}
public FieldWriteability getWriteability_CompanyUser ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference CompanyUser. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setCompanyUser (CompanyUser newCompanyUser) throws StorageException, FieldException
{
if (_CompanyUser.wouldReferencedChange (newCompanyUser))
{
assertValid();
Debug.assertion (getWriteability_CompanyUser () != FieldWriteability.FALSE, "Assoc CompanyUser is not writeable");
preCompanyUserChange (newCompanyUser);
_CompanyUser.set (newCompanyUser);
postCompanyUserChange ();
}
}
......@@ -800,7 +1189,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
tl_culture_templatePSet.setAttrib (FIELD_ObjectID, myID);
tl_culture_templatePSet.setAttrib (FIELD_TemplateName, HELPER_TemplateName.toObject (_TemplateName)); //
_User.getPersistentSets (allSets);
tl_culture_templatePSet.setAttrib (FIELD_CultureStatement, HELPER_CultureStatement.toObject (_CultureStatement)); //
_Client.getPersistentSets (allSets);
_HiringTeam.getPersistentSets (allSets);
_CompanyUser.getPersistentSets (allSets);
}
......@@ -816,7 +1208,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
PersistentSet tl_culture_templatePSet = allSets.getPersistentSet (objectID, "tl_culture_template");
_TemplateName = (String)(HELPER_TemplateName.fromObject (_TemplateName, tl_culture_templatePSet.getAttrib (FIELD_TemplateName))); //
_User.setFromPersistentSets (objectID, allSets);
_CultureStatement = (String)(HELPER_CultureStatement.fromObject (_CultureStatement, tl_culture_templatePSet.getAttrib (FIELD_CultureStatement))); //
_Client.setFromPersistentSets (objectID, allSets);
_HiringTeam.setFromPersistentSets (objectID, allSets);
_CompanyUser.setFromPersistentSets (objectID, allSets);
}
......@@ -841,6 +1236,15 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
e.addException (ex);
}
try
{
setCultureStatement (otherCultureCriteriaTemplate.getCultureStatement ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
......@@ -857,6 +1261,7 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
BaseCultureCriteriaTemplate sourceCultureCriteriaTemplate = (BaseCultureCriteriaTemplate)(source);
_TemplateName = sourceCultureCriteriaTemplate._TemplateName;
_CultureStatement = sourceCultureCriteriaTemplate._CultureStatement;
}
}
......@@ -873,7 +1278,9 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
BaseCultureCriteriaTemplate sourceCultureCriteriaTemplate = (BaseCultureCriteriaTemplate)(source);
_User.copyFrom (sourceCultureCriteriaTemplate._User, linkToGhosts);
_Client.copyFrom (sourceCultureCriteriaTemplate._Client, linkToGhosts);
_HiringTeam.copyFrom (sourceCultureCriteriaTemplate._HiringTeam, linkToGhosts);
_CompanyUser.copyFrom (sourceCultureCriteriaTemplate._CompanyUser, linkToGhosts);
}
}
......@@ -912,7 +1319,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
super.readExternalData(vals);
_TemplateName = (String)(HELPER_TemplateName.readExternal (_TemplateName, vals.get(FIELD_TemplateName))); //
_User.readExternalData(vals.get(SINGLEREFERENCE_User));
_CultureStatement = (String)(HELPER_CultureStatement.readExternal (_CultureStatement, vals.get(FIELD_CultureStatement))); //
_Client.readExternalData(vals.get(SINGLEREFERENCE_Client));
_HiringTeam.readExternalData(vals.get(SINGLEREFERENCE_HiringTeam));
_CompanyUser.readExternalData(vals.get(SINGLEREFERENCE_CompanyUser));
_CultureCriterias.readExternalData(vals.get(MULTIPLEREFERENCE_CultureCriterias));
}
......@@ -926,7 +1336,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
super.writeExternalData(vals);
vals.put (FIELD_TemplateName, HELPER_TemplateName.writeExternal (_TemplateName));
vals.put (SINGLEREFERENCE_User, _User.writeExternalData());
vals.put (FIELD_CultureStatement, HELPER_CultureStatement.writeExternal (_CultureStatement));
vals.put (SINGLEREFERENCE_Client, _Client.writeExternalData());
vals.put (SINGLEREFERENCE_HiringTeam, _HiringTeam.writeExternalData());
vals.put (SINGLEREFERENCE_CompanyUser, _CompanyUser.writeExternalData());
vals.put (MULTIPLEREFERENCE_CultureCriterias, _CultureCriterias.writeExternalData());
}
......@@ -945,9 +1358,15 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
listener.notifyFieldChange(this, other, FIELD_TemplateName, HELPER_TemplateName.toObject(this._TemplateName), HELPER_TemplateName.toObject(otherCultureCriteriaTemplate._TemplateName));
}
if (!HELPER_CultureStatement.compare(this._CultureStatement, otherCultureCriteriaTemplate._CultureStatement))
{
listener.notifyFieldChange(this, other, FIELD_CultureStatement, HELPER_CultureStatement.toObject(this._CultureStatement), HELPER_CultureStatement.toObject(otherCultureCriteriaTemplate._CultureStatement));
}
// Compare single assocs
_User.compare (otherCultureCriteriaTemplate._User, listener);
_Client.compare (otherCultureCriteriaTemplate._Client, listener);
_HiringTeam.compare (otherCultureCriteriaTemplate._HiringTeam, listener);
_CompanyUser.compare (otherCultureCriteriaTemplate._CompanyUser, listener);
// Compare multiple assocs
......@@ -970,7 +1389,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_TemplateName, HELPER_TemplateName.toObject(getTemplateName()));
visitor.visitAssociation (_User);
visitor.visitField(this, FIELD_CultureStatement, HELPER_CultureStatement.toObject(getCultureStatement()));
visitor.visitAssociation (_Client);
visitor.visitAssociation (_HiringTeam);
visitor.visitAssociation (_CompanyUser);
visitor.visitAssociation (_CultureCriterias);
}
......@@ -980,9 +1402,17 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
super.visitAssociations (visitor, scope);
if (scope.includes (_User))
if (scope.includes (_Client))
{
visitor.visit (_Client);
}
if (scope.includes (_HiringTeam))
{
visitor.visit (_HiringTeam);
}
if (scope.includes (_CompanyUser))
{
visitor.visit (_User);
visitor.visit (_CompanyUser);
}
if (scope.includes (_CultureCriterias))
{
......@@ -1017,9 +1447,21 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
return filter.matches (getTemplateName ());
}
else if (attribName.equals (SINGLEREFERENCE_User))
else if (attribName.equals (FIELD_CultureStatement))
{
return filter.matches (getCultureStatement ());
}
else if (attribName.equals (SINGLEREFERENCE_Client))
{
return filter.matches (getClient ());
}
else if (attribName.equals (SINGLEREFERENCE_HiringTeam))
{
return filter.matches (getHiringTeam ());
}
else if (attribName.equals (SINGLEREFERENCE_CompanyUser))
{
return filter.matches (getUser ());
return filter.matches (getCompanyUser ());
}
else
{
......@@ -1058,78 +1500,27 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
return this;
}
public SearchAll andUser (QueryFilter<SecUser> filter)
public SearchAll andCultureStatement (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_culture_template.user_id", "User");
filter.addFilter (context, "tl_culture_template.culture_statement", "CultureStatement");
return this;
}
public CultureCriteriaTemplate[]
search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_CultureCriteriaTemplate, SEARCH_All, criteria);
Set<CultureCriteriaTemplate> typedResults = new LinkedHashSet <CultureCriteriaTemplate> ();
for (BaseBusinessClass bbcResult : results)
public SearchAll andClient (QueryFilter<Client> filter)
{
CultureCriteriaTemplate aResult = (CultureCriteriaTemplate)bbcResult;
typedResults.add (aResult);
}
return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new CultureCriteriaTemplate[0]);
}
}
public static CultureCriteriaTemplate[]
searchAll (ObjectTransaction transaction) throws StorageException
{
return SearchByAll ()
.search (transaction);
}
public static SearchCompany SearchByCompany () { return new SearchCompany (); }
public static class SearchCompany extends SearchObject<CultureCriteriaTemplate>
{
public SearchCompany byCompany (Company Company)
{
by ("Company", Company);
return this;
}
public SearchCompany andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_culture_template.object_id", FIELD_ObjectID);
filter.addFilter (context, "tl_culture_template.client_id", "Client");
return this;
}
public SearchCompany andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_culture_template.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchCompany andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_culture_template.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchCompany andTemplateName (QueryFilter<String> filter)
public SearchAll andHiringTeam (QueryFilter<HiringTeam> filter)
{
filter.addFilter (context, "tl_culture_template.template_name", "TemplateName");
filter.addFilter (context, "tl_culture_template.hiring_team_id", "HiringTeam");
return this;
}
public SearchCompany andUser (QueryFilter<SecUser> filter)
public SearchAll andCompanyUser (QueryFilter<CompanyUser> filter)
{
filter.addFilter (context, "tl_culture_template.user_id", "User");
filter.addFilter (context, "tl_culture_template.company_user_id", "CompanyUser");
return this;
}
......@@ -1138,7 +1529,7 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_CultureCriteriaTemplate, SEARCH_Company, criteria);
BaseBusinessClass[] results = super.search (transaction, REFERENCE_CultureCriteriaTemplate, SEARCH_All, criteria);
Set<CultureCriteriaTemplate> typedResults = new LinkedHashSet <CultureCriteriaTemplate> ();
for (BaseBusinessClass bbcResult : results)
{
......@@ -1154,10 +1545,9 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
public static CultureCriteriaTemplate[]
searchCompany (ObjectTransaction transaction, Company Company) throws StorageException
searchAll (ObjectTransaction transaction) throws StorageException
{
return SearchByCompany ()
.byCompany (Company)
return SearchByAll ()
.search (transaction);
}
......@@ -1173,6 +1563,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
return HELPER_TemplateName.toObject (getTemplateName ());
}
else if (attribName.equals (FIELD_CultureStatement))
{
return HELPER_CultureStatement.toObject (getCultureStatement ());
}
else
{
return super.getAttribute (attribName);
......@@ -1190,6 +1584,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
return HELPER_TemplateName;
}
else if (attribName.equals (FIELD_CultureStatement))
{
return HELPER_CultureStatement;
}
else
{
return super.getAttributeHelper (attribName);
......@@ -1207,6 +1605,10 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
setTemplateName ((String)(HELPER_TemplateName.fromObject (_TemplateName, attribValue)));
}
else if (attribName.equals (FIELD_CultureStatement))
{
setCultureStatement ((String)(HELPER_CultureStatement.fromObject (_CultureStatement, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
......@@ -1231,13 +1633,25 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
return getWriteability_TemplateName ();
}
else if (fieldName.equals (FIELD_CultureStatement))
{
return getWriteability_CultureStatement ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_CultureCriterias))
{
return getWriteability_CultureCriterias ();
}
else if (fieldName.equals (SINGLEREFERENCE_User))
else if (fieldName.equals (SINGLEREFERENCE_Client))
{
return getWriteability_Client ();
}
else if (fieldName.equals (SINGLEREFERENCE_HiringTeam))
{
return getWriteability_HiringTeam ();
}
else if (fieldName.equals (SINGLEREFERENCE_CompanyUser))
{
return getWriteability_User ();
return getWriteability_CompanyUser ();
}
else
{
......@@ -1254,6 +1668,11 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
fields.add (FIELD_TemplateName);
}
if (getWriteability_CultureStatement () != FieldWriteability.TRUE)
{
fields.add (FIELD_CultureStatement);
}
super.putUnwriteable (fields);
}
......@@ -1264,6 +1683,7 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
result.add(HELPER_TemplateName.getAttribObject (getClass (), _TemplateName, false, FIELD_TemplateName));
result.add(HELPER_CultureStatement.getAttribObject (getClass (), _CultureStatement, false, FIELD_CultureStatement));
return result;
}
......@@ -1332,6 +1752,24 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
return newTemplateName;
}
/**
* Get the attribute CultureStatement
*/
public String getCultureStatement (CultureCriteriaTemplate obj, String original)
{
return original;
}
/**
* Change the value set for attribute CultureStatement.
* May modify the field beforehand
* Occurs before validation.
*/
public String setCultureStatement (CultureCriteriaTemplate obj, String newCultureStatement) throws FieldException
{
return newCultureStatement;
}
}
......@@ -1392,9 +1830,21 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
{
return toTemplateName ();
}
if (name.equals ("User"))
if (name.equals ("CultureStatement"))
{
return toCultureStatement ();
}
if (name.equals ("Client"))
{
return toClient ();
}
if (name.equals ("HiringTeam"))
{
return toHiringTeam ();
}
if (name.equals ("CompanyUser"))
{
return toUser ();
return toCompanyUser ();
}
......@@ -1403,11 +1853,25 @@ public abstract class BaseCultureCriteriaTemplate extends BaseBusinessClass
public PipeLine<From, String> toTemplateName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_TemplateName)); }
public SecUser.SecUserPipeLineFactory<From, SecUser> toUser () { return toUser (Filter.ALL); }
public PipeLine<From, String> toCultureStatement () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CultureStatement)); }
public Client.ClientPipeLineFactory<From, Client> toClient () { return toClient (Filter.ALL); }
public SecUser.SecUserPipeLineFactory<From, SecUser> toUser (Filter<SecUser> filter)
public Client.ClientPipeLineFactory<From, Client> toClient (Filter<Client> filter)
{
return SecUser.REFERENCE_SecUser.new SecUserPipeLineFactory<From, SecUser> (this, new ORMSingleAssocPipe<Me, SecUser>(SINGLEREFERENCE_User, filter));
return Client.REFERENCE_Client.new ClientPipeLineFactory<From, Client> (this, new ORMSingleAssocPipe<Me, Client>(SINGLEREFERENCE_Client, filter));
}
public HiringTeam.HiringTeamPipeLineFactory<From, HiringTeam> toHiringTeam () { return toHiringTeam (Filter.ALL); }
public HiringTeam.HiringTeamPipeLineFactory<From, HiringTeam> toHiringTeam (Filter<HiringTeam> filter)
{
return HiringTeam.REFERENCE_HiringTeam.new HiringTeamPipeLineFactory<From, HiringTeam> (this, new ORMSingleAssocPipe<Me, HiringTeam>(SINGLEREFERENCE_HiringTeam, filter));
}
public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toCompanyUser () { return toCompanyUser (Filter.ALL); }
public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toCompanyUser (Filter<CompanyUser> filter)
{
return CompanyUser.REFERENCE_CompanyUser.new CompanyUserPipeLineFactory<From, CompanyUser> (this, new ORMSingleAssocPipe<Me, CompanyUser>(SINGLEREFERENCE_CompanyUser, filter));
}
public CultureCriteria.CultureCriteriaPipeLineFactory<From, CultureCriteria> toCultureCriterias () { return toCultureCriterias(Filter.ALL); }
......@@ -1446,18 +1910,46 @@ class DummyCultureCriteriaTemplate extends CultureCriteriaTemplate
}
public SecUser getUser () throws StorageException
public Client getClient () throws StorageException
{
return (Client)(Client.DUMMY_Client);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getClientID ()
{
return Client.DUMMY_Client.getObjectID();
}
public HiringTeam getHiringTeam () throws StorageException
{
return (HiringTeam)(HiringTeam.DUMMY_HiringTeam);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getHiringTeamID ()
{
return HiringTeam.DUMMY_HiringTeam.getObjectID();
}
public CompanyUser getCompanyUser () throws StorageException
{
return (SecUser)(SecUser.DUMMY_SecUser);
return (CompanyUser)(CompanyUser.DUMMY_CompanyUser);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getUserID ()
public Long getCompanyUserID ()
{
return SecUser.DUMMY_SecUser.getObjectID();
return CompanyUser.DUMMY_CompanyUser.getObjectID();
}
public int getCultureCriteriasCount () throws StorageException
......
......@@ -886,7 +886,6 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "is_ppj");
metaInfo.put ("defaultValue", "Boolean.TRUE");
metaInfo.put ("name", "IsPPJ");
metaInfo.put ("type", "Boolean");
......@@ -1039,7 +1038,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (_PlanRenewedOn));
_UsedCredits = (Integer)(HELPER_UsedCredits.initialise (_UsedCredits));
_AvailableCredits = (Integer)(HELPER_AvailableCredits.initialise (_AvailableCredits));
_IsPPJ = (Boolean)(Boolean.TRUE);
_IsPPJ = (Boolean)(HELPER_IsPPJ.initialise (_IsPPJ));
_HasCap = (Boolean)(Boolean.FALSE);
_MaxCap = (Integer)(HELPER_MaxCap.initialise (_MaxCap));
_CouponExpiryDate = (Date)(HELPER_CouponExpiryDate.initialise (_CouponExpiryDate));
......
......@@ -82,7 +82,6 @@ public abstract class BaseJob extends BaseBusinessClass
public static final String FIELD_AppProcessOption = "AppProcessOption";
public static final String FIELD_RankingCompleted = "RankingCompleted";
public static final String FIELD_OccupationId = "OccupationId";
public static final String SINGLEREFERENCE_AssessmentTemplate = "AssessmentTemplate";
public static final String SINGLEREFERENCE_CultureTemplate = "CultureTemplate";
public static final String SINGLEREFERENCE_JobTemplate = "JobTemplate";
public static final String SINGLEREFERENCE_AppStatusWorkFlow = "AppStatusWorkFlow";
......@@ -94,6 +93,7 @@ public abstract class BaseJob extends BaseBusinessClass
public static final String SINGLEREFERENCE_HiringTeam = "HiringTeam";
public static final String SINGLEREFERENCE_Occupation = "Occupation";
public static final String SINGLEREFERENCE_ShortenedURL = "ShortenedURL";
public static final String SINGLEREFERENCE_AssessmentTemplate = "AssessmentTemplate";
public static final String MULTIPLEREFERENCE_JobApplications = "JobApplications";
public static final String BACKREF_JobApplications = "";
public static final String MULTIPLEREFERENCE_AssessmentCriterias = "AssessmentCriterias";
......@@ -197,7 +197,6 @@ public abstract class BaseJob extends BaseBusinessClass
// Private attributes corresponding to single references
private SingleAssociation<Job, AssessmentCriteriaTemplate> _AssessmentTemplate;
private SingleAssociation<Job, CultureCriteriaTemplate> _CultureTemplate;
private SingleAssociation<Job, Job> _JobTemplate;
private SingleAssociation<Job, WorkFlow> _AppStatusWorkFlow;
......@@ -208,6 +207,7 @@ public abstract class BaseJob extends BaseBusinessClass
private SingleAssociation<Job, HiringTeam> _HiringTeam;
private SingleAssociation<Job, Occupation> _Occupation;
private SingleAssociation<Job, ShortenedURL> _ShortenedURL;
private SingleAssociation<Job, AssessmentCriteriaTemplate> _AssessmentTemplate;
// Private attributes corresponding to multiple references
......@@ -283,7 +283,6 @@ public abstract class BaseJob extends BaseBusinessClass
setupAssocMetaData_AssessmentCriterias();
setupAssocMetaData_CultureCriterias();
setupAssocMetaData_WorkFlows();
setupAssocMetaData_AssessmentTemplate();
setupAssocMetaData_CultureTemplate();
setupAssocMetaData_JobTemplate();
setupAssocMetaData_AppStatusWorkFlow();
......@@ -294,6 +293,7 @@ public abstract class BaseJob extends BaseBusinessClass
setupAssocMetaData_HiringTeam();
setupAssocMetaData_Occupation();
setupAssocMetaData_ShortenedURL();
setupAssocMetaData_AssessmentTemplate();
FIELD_Email_Validators = (AttributeValidator[])setupAttribMetaData_Email(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Password_Validators = (AttributeValidator[])setupAttribMetaData_Password(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ConfirmPassword_Validators = (AttributeValidator[])setupAttribMetaData_ConfirmPassword(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -405,19 +405,6 @@ public abstract class BaseJob extends BaseBusinessClass
// Meta Info setup
private static void setupAssocMetaData_AssessmentTemplate()
{
Map metaInfo = new HashMap ();
metaInfo.put ("name", "AssessmentTemplate");
metaInfo.put ("type", "AssessmentCriteriaTemplate");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.AssessmentTemplate:", metaInfo);
ATTRIBUTES_METADATA_Job.put (SINGLEREFERENCE_AssessmentTemplate, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_CultureTemplate()
{
Map metaInfo = new HashMap ();
......@@ -558,6 +545,20 @@ public abstract class BaseJob extends BaseBusinessClass
// Meta Info setup
private static void setupAssocMetaData_AssessmentTemplate()
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "template_id");
metaInfo.put ("name", "AssessmentTemplate");
metaInfo.put ("type", "AssessmentCriteriaTemplate");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.AssessmentTemplate:", metaInfo);
ATTRIBUTES_METADATA_Job.put (SINGLEREFERENCE_AssessmentTemplate, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_Email(Map validatorMapping)
{
Map metaInfo = new HashMap ();
......@@ -1378,7 +1379,6 @@ public abstract class BaseJob extends BaseBusinessClass
{
super._initialiseAssociations ();
_AssessmentTemplate = new SingleAssociation<Job, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_AssessmentTemplate, null, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "");
_CultureTemplate = new SingleAssociation<Job, CultureCriteriaTemplate> (this, SINGLEREFERENCE_CultureTemplate, null, CultureCriteriaTemplate.REFERENCE_CultureCriteriaTemplate, "");
_JobTemplate = new SingleAssociation<Job, Job> (this, SINGLEREFERENCE_JobTemplate, null, Job.REFERENCE_Job, "");
_AppStatusWorkFlow = new SingleAssociation<Job, WorkFlow> (this, SINGLEREFERENCE_AppStatusWorkFlow, null, WorkFlow.REFERENCE_WorkFlow, "");
......@@ -1389,6 +1389,7 @@ public abstract class BaseJob extends BaseBusinessClass
_HiringTeam = new SingleAssociation<Job, HiringTeam> (this, SINGLEREFERENCE_HiringTeam, null, HiringTeam.REFERENCE_HiringTeam, "tl_job");
_Occupation = new SingleAssociation<Job, Occupation> (this, SINGLEREFERENCE_Occupation, null, Occupation.REFERENCE_Occupation, "tl_job");
_ShortenedURL = new SingleAssociation<Job, ShortenedURL> (this, SINGLEREFERENCE_ShortenedURL, null, ShortenedURL.REFERENCE_ShortenedURL, "tl_job");
_AssessmentTemplate = new SingleAssociation<Job, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_AssessmentTemplate, null, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "tl_job");
_JobApplications = new MultipleAssociation<Job, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Job, JobApplication.REFERENCE_JobApplication);
_AssessmentCriterias = new MultipleAssociation<Job, AssessmentCriteria> (this, MULTIPLEREFERENCE_AssessmentCriterias, AssessmentCriteria.SINGLEREFERENCE_Job, AssessmentCriteria.REFERENCE_AssessmentCriteria);
_CultureCriterias = new MultipleAssociation<Job, CultureCriteria> (this, MULTIPLEREFERENCE_CultureCriterias, CultureCriteria.SINGLEREFERENCE_Job, CultureCriteria.REFERENCE_CultureCriteria);
......@@ -1402,7 +1403,6 @@ public abstract class BaseJob extends BaseBusinessClass
{
super.initialiseReference ();
_AssessmentTemplate = new SingleAssociation<Job, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_AssessmentTemplate, null, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "");
_CultureTemplate = new SingleAssociation<Job, CultureCriteriaTemplate> (this, SINGLEREFERENCE_CultureTemplate, null, CultureCriteriaTemplate.REFERENCE_CultureCriteriaTemplate, "");
_JobTemplate = new SingleAssociation<Job, Job> (this, SINGLEREFERENCE_JobTemplate, null, Job.REFERENCE_Job, "");
_AppStatusWorkFlow = new SingleAssociation<Job, WorkFlow> (this, SINGLEREFERENCE_AppStatusWorkFlow, null, WorkFlow.REFERENCE_WorkFlow, "");
......@@ -1413,6 +1413,7 @@ public abstract class BaseJob extends BaseBusinessClass
_HiringTeam = new SingleAssociation<Job, HiringTeam> (this, SINGLEREFERENCE_HiringTeam, null, HiringTeam.REFERENCE_HiringTeam, "tl_job");
_Occupation = new SingleAssociation<Job, Occupation> (this, SINGLEREFERENCE_Occupation, null, Occupation.REFERENCE_Occupation, "tl_job");
_ShortenedURL = new SingleAssociation<Job, ShortenedURL> (this, SINGLEREFERENCE_ShortenedURL, null, ShortenedURL.REFERENCE_ShortenedURL, "tl_job");
_AssessmentTemplate = new SingleAssociation<Job, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_AssessmentTemplate, null, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "tl_job");
_JobApplications = new MultipleAssociation<Job, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Job, JobApplication.REFERENCE_JobApplication);
_AssessmentCriterias = new MultipleAssociation<Job, AssessmentCriteria> (this, MULTIPLEREFERENCE_AssessmentCriterias, AssessmentCriteria.SINGLEREFERENCE_Job, AssessmentCriteria.REFERENCE_AssessmentCriteria);
_CultureCriterias = new MultipleAssociation<Job, CultureCriteria> (this, MULTIPLEREFERENCE_CultureCriterias, CultureCriteria.SINGLEREFERENCE_Job, CultureCriteria.REFERENCE_CultureCriteria);
......@@ -5361,8 +5362,6 @@ public abstract class BaseJob extends BaseBusinessClass
List result = super.getSingleAssocs ();
result.add("AssessmentTemplate");
result.add("CultureTemplate");
result.add("JobTemplate");
......@@ -5383,6 +5382,8 @@ public abstract class BaseJob extends BaseBusinessClass
result.add("ShortenedURL");
result.add("AssessmentTemplate");
return result;
}
......@@ -5394,10 +5395,7 @@ public abstract class BaseJob extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return _AssessmentTemplate.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
{
return _CultureTemplate.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
......@@ -5427,6 +5425,9 @@ public abstract class BaseJob extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_ShortenedURL))
{
return _ShortenedURL.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return _AssessmentTemplate.getReferencedType ();
}
else
{
......@@ -5462,6 +5463,9 @@ public abstract class BaseJob extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_ShortenedURL))
{
return null ;
}else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return null ;
}
else
{
......@@ -5476,10 +5480,7 @@ public abstract class BaseJob extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getAssessmentTemplate ();
}else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
{
return getCultureTemplate ();
}else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
......@@ -5509,6 +5510,9 @@ public abstract class BaseJob extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_ShortenedURL))
{
return getShortenedURL ();
}else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getAssessmentTemplate ();
}
else
{
......@@ -5523,10 +5527,7 @@ public abstract class BaseJob extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getAssessmentTemplate (getType);
}else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
{
return getCultureTemplate (getType);
}else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
......@@ -5556,6 +5557,9 @@ public abstract class BaseJob extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_ShortenedURL))
{
return getShortenedURL (getType);
}else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getAssessmentTemplate (getType);
}
else
{
......@@ -5570,10 +5574,7 @@ public abstract class BaseJob extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getAssessmentTemplateID ();
}else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
{
return getCultureTemplateID ();
}else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
......@@ -5603,6 +5604,9 @@ public abstract class BaseJob extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_ShortenedURL))
{
return getShortenedURLID ();
}else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getAssessmentTemplateID ();
}
else
{
......@@ -5617,10 +5621,7 @@ public abstract class BaseJob extends BaseBusinessClass
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
setAssessmentTemplate ((AssessmentCriteriaTemplate)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
{
setCultureTemplate ((CultureCriteriaTemplate)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
......@@ -5650,110 +5651,19 @@ public abstract class BaseJob extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_ShortenedURL))
{
setShortenedURL ((ShortenedURL)(newValue));
}
else
}else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
super.setSingleAssoc (assocName, newValue);
}
}
/**
* Get the reference AssessmentTemplate
*/
public AssessmentCriteriaTemplate getAssessmentTemplate () throws StorageException
{
assertValid();
try
{
return (AssessmentCriteriaTemplate)(_AssessmentTemplate.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Job:", this.getObjectID (), ", was trying to get AssessmentCriteriaTemplate:", getAssessmentTemplateID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _AssessmentTemplate.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public AssessmentCriteriaTemplate getAssessmentTemplate (Get getType) throws StorageException
{
assertValid();
return _AssessmentTemplate.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getAssessmentTemplateID ()
{
assertValid();
if (_AssessmentTemplate == null)
{
return null;
setAssessmentTemplate ((AssessmentCriteriaTemplate)(newValue));
}
else
{
return _AssessmentTemplate.getID ();
super.setSingleAssoc (assocName, newValue);
}
}
/**
* 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 preAssessmentTemplateChange (AssessmentCriteriaTemplate newAssessmentTemplate) 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 postAssessmentTemplateChange () throws FieldException
{
}
public FieldWriteability getWriteability_AssessmentTemplate ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference AssessmentTemplate. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setAssessmentTemplate (AssessmentCriteriaTemplate newAssessmentTemplate) throws StorageException, FieldException
{
if (_AssessmentTemplate.wouldReferencedChange (newAssessmentTemplate))
{
assertValid();
Debug.assertion (getWriteability_AssessmentTemplate () != FieldWriteability.FALSE, "Assoc AssessmentTemplate is not writeable");
preAssessmentTemplateChange (newAssessmentTemplate);
_AssessmentTemplate.set (newAssessmentTemplate);
postAssessmentTemplateChange ();
}
}
/**
* Get the reference CultureTemplate
*/
public CultureCriteriaTemplate getCultureTemplate () throws StorageException
......@@ -6708,6 +6618,100 @@ public abstract class BaseJob extends BaseBusinessClass
}
/**
* Get the reference AssessmentTemplate
*/
public AssessmentCriteriaTemplate getAssessmentTemplate () throws StorageException
{
assertValid();
try
{
return (AssessmentCriteriaTemplate)(_AssessmentTemplate.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Job:", this.getObjectID (), ", was trying to get AssessmentCriteriaTemplate:", getAssessmentTemplateID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _AssessmentTemplate.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public AssessmentCriteriaTemplate getAssessmentTemplate (Get getType) throws StorageException
{
assertValid();
return _AssessmentTemplate.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getAssessmentTemplateID ()
{
assertValid();
if (_AssessmentTemplate == null)
{
return null;
}
else
{
return _AssessmentTemplate.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 preAssessmentTemplateChange (AssessmentCriteriaTemplate newAssessmentTemplate) 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 postAssessmentTemplateChange () throws FieldException
{
}
public FieldWriteability getWriteability_AssessmentTemplate ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference AssessmentTemplate. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setAssessmentTemplate (AssessmentCriteriaTemplate newAssessmentTemplate) throws StorageException, FieldException
{
if (_AssessmentTemplate.wouldReferencedChange (newAssessmentTemplate))
{
assertValid();
Debug.assertion (getWriteability_AssessmentTemplate () != FieldWriteability.FALSE, "Assoc AssessmentTemplate is not writeable");
preAssessmentTemplateChange (newAssessmentTemplate);
_AssessmentTemplate.set (newAssessmentTemplate);
postAssessmentTemplateChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getMultiAssocs()
......@@ -7399,6 +7403,7 @@ public abstract class BaseJob extends BaseBusinessClass
_HiringTeam.getPersistentSets (allSets);
_Occupation.getPersistentSets (allSets);
_ShortenedURL.getPersistentSets (allSets);
_AssessmentTemplate.getPersistentSets (allSets);
}
......@@ -7445,6 +7450,7 @@ public abstract class BaseJob extends BaseBusinessClass
_HiringTeam.setFromPersistentSets (objectID, allSets);
_Occupation.setFromPersistentSets (objectID, allSets);
_ShortenedURL.setFromPersistentSets (objectID, allSets);
_AssessmentTemplate.setFromPersistentSets (objectID, allSets);
}
......@@ -7756,7 +7762,6 @@ public abstract class BaseJob extends BaseBusinessClass
{
BaseJob sourceJob = (BaseJob)(source);
_AssessmentTemplate.copyFrom (sourceJob._AssessmentTemplate, linkToGhosts);
_CultureTemplate.copyFrom (sourceJob._CultureTemplate, linkToGhosts);
_JobTemplate.copyFrom (sourceJob._JobTemplate, linkToGhosts);
_AppStatusWorkFlow.copyFrom (sourceJob._AppStatusWorkFlow, linkToGhosts);
......@@ -7767,6 +7772,7 @@ public abstract class BaseJob extends BaseBusinessClass
_HiringTeam.copyFrom (sourceJob._HiringTeam, linkToGhosts);
_Occupation.copyFrom (sourceJob._Occupation, linkToGhosts);
_ShortenedURL.copyFrom (sourceJob._ShortenedURL, linkToGhosts);
_AssessmentTemplate.copyFrom (sourceJob._AssessmentTemplate, linkToGhosts);
}
}
......@@ -7849,7 +7855,6 @@ public abstract class BaseJob extends BaseBusinessClass
_AppProcessOption = (AppProcessOption)(HELPER_AppProcessOption.readExternal (_AppProcessOption, vals.get(FIELD_AppProcessOption))); //
_RankingCompleted = (Boolean)(HELPER_RankingCompleted.readExternal (_RankingCompleted, vals.get(FIELD_RankingCompleted))); //
_OccupationId = (String)(HELPER_OccupationId.readExternal (_OccupationId, vals.get(FIELD_OccupationId))); //
_AssessmentTemplate.readExternalData(vals.get(SINGLEREFERENCE_AssessmentTemplate));
_CultureTemplate.readExternalData(vals.get(SINGLEREFERENCE_CultureTemplate));
_JobTemplate.readExternalData(vals.get(SINGLEREFERENCE_JobTemplate));
_AppStatusWorkFlow.readExternalData(vals.get(SINGLEREFERENCE_AppStatusWorkFlow));
......@@ -7860,6 +7865,7 @@ public abstract class BaseJob extends BaseBusinessClass
_HiringTeam.readExternalData(vals.get(SINGLEREFERENCE_HiringTeam));
_Occupation.readExternalData(vals.get(SINGLEREFERENCE_Occupation));
_ShortenedURL.readExternalData(vals.get(SINGLEREFERENCE_ShortenedURL));
_AssessmentTemplate.readExternalData(vals.get(SINGLEREFERENCE_AssessmentTemplate));
_JobApplications.readExternalData(vals.get(MULTIPLEREFERENCE_JobApplications));
_AssessmentCriterias.readExternalData(vals.get(MULTIPLEREFERENCE_AssessmentCriterias));
_CultureCriterias.readExternalData(vals.get(MULTIPLEREFERENCE_CultureCriterias));
......@@ -7915,7 +7921,6 @@ public abstract class BaseJob extends BaseBusinessClass
vals.put (FIELD_AppProcessOption, HELPER_AppProcessOption.writeExternal (_AppProcessOption));
vals.put (FIELD_RankingCompleted, HELPER_RankingCompleted.writeExternal (_RankingCompleted));
vals.put (FIELD_OccupationId, HELPER_OccupationId.writeExternal (_OccupationId));
vals.put (SINGLEREFERENCE_AssessmentTemplate, _AssessmentTemplate.writeExternalData());
vals.put (SINGLEREFERENCE_CultureTemplate, _CultureTemplate.writeExternalData());
vals.put (SINGLEREFERENCE_JobTemplate, _JobTemplate.writeExternalData());
vals.put (SINGLEREFERENCE_AppStatusWorkFlow, _AppStatusWorkFlow.writeExternalData());
......@@ -7926,6 +7931,7 @@ public abstract class BaseJob extends BaseBusinessClass
vals.put (SINGLEREFERENCE_HiringTeam, _HiringTeam.writeExternalData());
vals.put (SINGLEREFERENCE_Occupation, _Occupation.writeExternalData());
vals.put (SINGLEREFERENCE_ShortenedURL, _ShortenedURL.writeExternalData());
vals.put (SINGLEREFERENCE_AssessmentTemplate, _AssessmentTemplate.writeExternalData());
vals.put (MULTIPLEREFERENCE_JobApplications, _JobApplications.writeExternalData());
vals.put (MULTIPLEREFERENCE_AssessmentCriterias, _AssessmentCriterias.writeExternalData());
vals.put (MULTIPLEREFERENCE_CultureCriterias, _CultureCriterias.writeExternalData());
......@@ -8045,7 +8051,6 @@ public abstract class BaseJob extends BaseBusinessClass
}
// Compare single assocs
_AssessmentTemplate.compare (otherJob._AssessmentTemplate, listener);
_CultureTemplate.compare (otherJob._CultureTemplate, listener);
_JobTemplate.compare (otherJob._JobTemplate, listener);
_AppStatusWorkFlow.compare (otherJob._AppStatusWorkFlow, listener);
......@@ -8056,6 +8061,7 @@ public abstract class BaseJob extends BaseBusinessClass
_HiringTeam.compare (otherJob._HiringTeam, listener);
_Occupation.compare (otherJob._Occupation, listener);
_ShortenedURL.compare (otherJob._ShortenedURL, listener);
_AssessmentTemplate.compare (otherJob._AssessmentTemplate, listener);
// Compare multiple assocs
......@@ -8120,7 +8126,6 @@ public abstract class BaseJob extends BaseBusinessClass
visitor.visitField(this, FIELD_CultureStatement, HELPER_CultureStatement.toObject(getCultureStatement()));
visitor.visitField(this, FIELD_DraftLocation, HELPER_DraftLocation.toObject(getDraftLocation()));
visitor.visitField(this, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(getGoogleAddressText()));
visitor.visitAssociation (_AssessmentTemplate);
visitor.visitAssociation (_CultureTemplate);
visitor.visitAssociation (_JobTemplate);
visitor.visitAssociation (_AppStatusWorkFlow);
......@@ -8131,6 +8136,7 @@ public abstract class BaseJob extends BaseBusinessClass
visitor.visitAssociation (_HiringTeam);
visitor.visitAssociation (_Occupation);
visitor.visitAssociation (_ShortenedURL);
visitor.visitAssociation (_AssessmentTemplate);
visitor.visitAssociation (_JobApplications);
visitor.visitAssociation (_AssessmentCriterias);
visitor.visitAssociation (_CultureCriterias);
......@@ -8143,10 +8149,6 @@ public abstract class BaseJob extends BaseBusinessClass
{
super.visitAssociations (visitor, scope);
if (scope.includes (_AssessmentTemplate))
{
visitor.visit (_AssessmentTemplate);
}
if (scope.includes (_CultureTemplate))
{
visitor.visit (_CultureTemplate);
......@@ -8187,6 +8189,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
visitor.visit (_ShortenedURL);
}
if (scope.includes (_AssessmentTemplate))
{
visitor.visit (_AssessmentTemplate);
}
if (scope.includes (_JobApplications))
{
visitor.visit (_JobApplications);
......@@ -8356,6 +8362,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return filter.matches (getShortenedURL ());
}
else if (attribName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return filter.matches (getAssessmentTemplate ());
}
else
{
return super.testFilter (attribName, filter);
......@@ -8579,6 +8589,12 @@ public abstract class BaseJob extends BaseBusinessClass
return this;
}
public SearchAll andAssessmentTemplate (QueryFilter<AssessmentCriteriaTemplate> filter)
{
filter.addFilter (context, "tl_job.template_id", "AssessmentTemplate");
return this;
}
public Job[]
search (ObjectTransaction transaction) throws StorageException
{
......@@ -8834,6 +8850,12 @@ public abstract class BaseJob extends BaseBusinessClass
return this;
}
public SearchJobKey andAssessmentTemplate (QueryFilter<AssessmentCriteriaTemplate> filter)
{
filter.addFilter (context, "tl_job.template_id", "AssessmentTemplate");
return this;
}
public Job search (ObjectTransaction transaction) throws StorageException
{
......@@ -9083,6 +9105,12 @@ public abstract class BaseJob extends BaseBusinessClass
return this;
}
public SearchCompany andAssessmentTemplate (QueryFilter<AssessmentCriteriaTemplate> filter)
{
filter.addFilter (context, "tl_job.template_id", "AssessmentTemplate");
return this;
}
public Job[]
search (ObjectTransaction transaction) throws StorageException
{
......@@ -9333,6 +9361,12 @@ public abstract class BaseJob extends BaseBusinessClass
return this;
}
public SearchDetails andAssessmentTemplate (QueryFilter<AssessmentCriteriaTemplate> filter)
{
filter.addFilter (context, "tl_job.template_id", "AssessmentTemplate");
return this;
}
public Job[]
search (ObjectTransaction transaction) throws StorageException
{
......@@ -10039,6 +10073,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return getWriteability_ShortenedURL ();
}
else if (fieldName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getWriteability_AssessmentTemplate ();
}
else if (fieldName.equals (FIELD_Email))
{
return getWriteability_Email ();
......@@ -10099,10 +10137,6 @@ public abstract class BaseJob extends BaseBusinessClass
{
return getWriteability_OccupationId ();
}
else if (fieldName.equals (SINGLEREFERENCE_AssessmentTemplate))
{
return getWriteability_AssessmentTemplate ();
}
else if (fieldName.equals (SINGLEREFERENCE_CultureTemplate))
{
return getWriteability_CultureTemplate ();
......@@ -11272,10 +11306,6 @@ public abstract class BaseJob extends BaseBusinessClass
{
return toOccupationId ();
}
if (name.equals ("AssessmentTemplate"))
{
return toAssessmentTemplate ();
}
if (name.equals ("CultureTemplate"))
{
return toCultureTemplate ();
......@@ -11416,6 +11446,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return toShortenedURL ();
}
if (name.equals ("AssessmentTemplate"))
{
return toAssessmentTemplate ();
}
return super.to(name);
......@@ -11501,12 +11535,6 @@ public abstract class BaseJob extends BaseBusinessClass
public PipeLine<From, DraftLocation> toDraftLocation () { return pipe(new ORMAttributePipe<Me, DraftLocation>(FIELD_DraftLocation)); }
public PipeLine<From, String> toGoogleAddressText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_GoogleAddressText)); }
public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toAssessmentTemplate () { return toAssessmentTemplate (Filter.ALL); }
public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toAssessmentTemplate (Filter<AssessmentCriteriaTemplate> filter)
{
return AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate.new AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> (this, new ORMSingleAssocPipe<Me, AssessmentCriteriaTemplate>(SINGLEREFERENCE_AssessmentTemplate, filter));
}
public CultureCriteriaTemplate.CultureCriteriaTemplatePipeLineFactory<From, CultureCriteriaTemplate> toCultureTemplate () { return toCultureTemplate (Filter.ALL); }
public CultureCriteriaTemplate.CultureCriteriaTemplatePipeLineFactory<From, CultureCriteriaTemplate> toCultureTemplate (Filter<CultureCriteriaTemplate> filter)
......@@ -11567,6 +11595,12 @@ public abstract class BaseJob extends BaseBusinessClass
{
return ShortenedURL.REFERENCE_ShortenedURL.new ShortenedURLPipeLineFactory<From, ShortenedURL> (this, new ORMSingleAssocPipe<Me, ShortenedURL>(SINGLEREFERENCE_ShortenedURL, filter));
}
public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toAssessmentTemplate () { return toAssessmentTemplate (Filter.ALL); }
public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toAssessmentTemplate (Filter<AssessmentCriteriaTemplate> filter)
{
return AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate.new AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> (this, new ORMSingleAssocPipe<Me, AssessmentCriteriaTemplate>(SINGLEREFERENCE_AssessmentTemplate, filter));
}
public JobApplication.JobApplicationPipeLineFactory<From, JobApplication> toJobApplications () { return toJobApplications(Filter.ALL); }
public JobApplication.JobApplicationPipeLineFactory<From, JobApplication> toJobApplications (Filter<JobApplication> filter)
......@@ -11679,11 +11713,6 @@ public abstract class BaseJob extends BaseBusinessClass
public boolean isTransientSingleReference(String assocName)
{
if(CollectionUtils.equals(assocName, "AssessmentTemplate"))
{
return true;
}
if(CollectionUtils.equals(assocName, "CultureTemplate"))
{
return true;
......@@ -11717,20 +11746,6 @@ class DummyJob extends Job
}
public AssessmentCriteriaTemplate getAssessmentTemplate () throws StorageException
{
return (AssessmentCriteriaTemplate)(AssessmentCriteriaTemplate.DUMMY_AssessmentCriteriaTemplate);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getAssessmentTemplateID ()
{
return AssessmentCriteriaTemplate.DUMMY_AssessmentCriteriaTemplate.getObjectID();
}
public CultureCriteriaTemplate getCultureTemplate () throws StorageException
{
return (CultureCriteriaTemplate)(CultureCriteriaTemplate.DUMMY_CultureCriteriaTemplate);
......@@ -11871,6 +11886,20 @@ class DummyJob extends Job
return ShortenedURL.DUMMY_ShortenedURL.getObjectID();
}
public AssessmentCriteriaTemplate getAssessmentTemplate () throws StorageException
{
return (AssessmentCriteriaTemplate)(AssessmentCriteriaTemplate.DUMMY_AssessmentCriteriaTemplate);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getAssessmentTemplateID ()
{
return AssessmentCriteriaTemplate.DUMMY_AssessmentCriteriaTemplate.getObjectID();
}
public int getJobApplicationsCount () throws StorageException
{
return 0;
......
......@@ -45,6 +45,8 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
public static final String FIELD_ApplicationStatus = "ApplicationStatus";
public static final String SINGLEREFERENCE_Job = "Job";
public static final String BACKREF_Job = "";
public static final String SINGLEREFERENCE_Template = "Template";
public static final String BACKREF_Template = "";
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
......@@ -64,6 +66,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
// Private attributes corresponding to single references
private SingleAssociation<WorkFlow, Job> _Job;
private SingleAssociation<WorkFlow, AssessmentCriteriaTemplate> _Template;
// Private attributes corresponding to multiple references
......@@ -87,10 +90,12 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
{
String tmp_Job = Job.BACKREF_WorkFlows;
String tmp_Template = AssessmentCriteriaTemplate.BACKREF_WorkFlows;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_Job();
setupAssocMetaData_Template();
FIELD_Name_Validators = (AttributeValidator[])setupAttribMetaData_Name(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_SortOrder_Validators = (AttributeValidator[])setupAttribMetaData_SortOrder(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ApplicationStatus_Validators = (AttributeValidator[])setupAttribMetaData_ApplicationStatus(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -115,7 +120,6 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
metaInfo.put ("backreferenceName", "WorkFlows");
metaInfo.put ("dbcol", "job_id");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Job");
metaInfo.put ("type", "Job");
......@@ -125,6 +129,21 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
// Meta Info setup
private static void setupAssocMetaData_Template()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "WorkFlows");
metaInfo.put ("dbcol", "template_id");
metaInfo.put ("name", "Template");
metaInfo.put ("type", "AssessmentCriteriaTemplate");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlow.Template:", metaInfo);
ATTRIBUTES_METADATA_WorkFlow.put (SINGLEREFERENCE_Template, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_Name(Map validatorMapping)
{
Map metaInfo = new HashMap ();
......@@ -222,6 +241,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
super._initialiseAssociations ();
_Job = new SingleAssociation<WorkFlow, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_WorkFlows, Job.REFERENCE_Job, "tl_work_flow");
_Template = new SingleAssociation<WorkFlow, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_Template, AssessmentCriteriaTemplate.MULTIPLEREFERENCE_WorkFlows, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "tl_work_flow");
}
......@@ -232,6 +252,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
super.initialiseReference ();
_Job = new SingleAssociation<WorkFlow, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_WorkFlows, Job.REFERENCE_Job, "tl_work_flow");
_Template = new SingleAssociation<WorkFlow, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_Template, AssessmentCriteriaTemplate.MULTIPLEREFERENCE_WorkFlows, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "tl_work_flow");
return this;
......@@ -548,6 +569,8 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
result.add("Job");
result.add("Template");
return result;
}
......@@ -562,6 +585,9 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_Job))
{
return _Job.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_Template))
{
return _Template.getReferencedType ();
}
else
{
......@@ -579,6 +605,9 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_Job))
{
return Job.MULTIPLEREFERENCE_WorkFlows ;
}else if (assocName.equals (SINGLEREFERENCE_Template))
{
return AssessmentCriteriaTemplate.MULTIPLEREFERENCE_WorkFlows ;
}
else
{
......@@ -596,6 +625,9 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_Job))
{
return getJob ();
}else if (assocName.equals (SINGLEREFERENCE_Template))
{
return getTemplate ();
}
else
{
......@@ -613,6 +645,9 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_Job))
{
return getJob (getType);
}else if (assocName.equals (SINGLEREFERENCE_Template))
{
return getTemplate (getType);
}
else
{
......@@ -630,6 +665,9 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_Job))
{
return getJobID ();
}else if (assocName.equals (SINGLEREFERENCE_Template))
{
return getTemplateID ();
}
else
{
......@@ -647,6 +685,9 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_Job))
{
setJob ((Job)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_Template))
{
setTemplate ((AssessmentCriteriaTemplate)(newValue));
}
else
{
......@@ -736,7 +777,6 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
*/
public void setJob (Job newJob) throws StorageException, FieldException
{
BusinessObjectParser.assertFieldCondition (newJob != null, this, SINGLEREFERENCE_Job, "mandatory");
if (_Job.wouldReferencedChange (newJob))
......@@ -765,6 +805,113 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
}
/**
* Get the reference Template
*/
public AssessmentCriteriaTemplate getTemplate () throws StorageException
{
assertValid();
try
{
return (AssessmentCriteriaTemplate)(_Template.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in WorkFlow:", this.getObjectID (), ", was trying to get AssessmentCriteriaTemplate:", getTemplateID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _Template.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public AssessmentCriteriaTemplate getTemplate (Get getType) throws StorageException
{
assertValid();
return _Template.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getTemplateID ()
{
assertValid();
if (_Template == null)
{
return null;
}
else
{
return _Template.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 preTemplateChange (AssessmentCriteriaTemplate newTemplate) 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 postTemplateChange () throws FieldException
{
}
public FieldWriteability getWriteability_Template ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference Template. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setTemplate (AssessmentCriteriaTemplate newTemplate) throws StorageException, FieldException
{
if (_Template.wouldReferencedChange (newTemplate))
{
assertValid();
Debug.assertion (getWriteability_Template () != FieldWriteability.FALSE, "Assoc Template is not writeable");
preTemplateChange (newTemplate);
AssessmentCriteriaTemplate oldTemplate = getTemplate ();
if (oldTemplate != null)
{
// This is to stop validation from triggering when we are removed
_Template.set (null);
oldTemplate.removeFromWorkFlows ((WorkFlow)(this));
}
_Template.set (newTemplate);
if (newTemplate != null)
{
newTemplate.addToWorkFlows ((WorkFlow)(this));
}
postTemplateChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getMultiAssocs()
......@@ -876,6 +1023,20 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
}
}
// Ensure we are removed from any loaded multi-associations that aren't mandatory
if (_Template.isLoaded () || getTransaction ().isObjectLoaded (_Template.getReferencedType (), getTemplateID ()))
{
AssessmentCriteriaTemplate referenced = getTemplate ();
if (referenced != null)
{
// Stop the callback
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null WorkFlows from ", getObjectID (), " to ", referenced.getObjectID ());
_Template.set (null);
referenced.removeFromWorkFlows ((WorkFlow)this);
}
}
}
catch (Exception e)
{
......@@ -940,6 +1101,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
tl_work_flowPSet.setAttrib (FIELD_SortOrder, HELPER_SortOrder.toObject (_SortOrder)); //
tl_work_flowPSet.setAttrib (FIELD_ApplicationStatus, HELPER_ApplicationStatus.toObject (_ApplicationStatus)); //
_Job.getPersistentSets (allSets);
_Template.getPersistentSets (allSets);
}
......@@ -958,6 +1120,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
_SortOrder = (Integer)(HELPER_SortOrder.fromObject (_SortOrder, tl_work_flowPSet.getAttrib (FIELD_SortOrder))); //
_ApplicationStatus = (ApplicationStatus)(HELPER_ApplicationStatus.fromObject (_ApplicationStatus, tl_work_flowPSet.getAttrib (FIELD_ApplicationStatus))); //
_Job.setFromPersistentSets (objectID, allSets);
_Template.setFromPersistentSets (objectID, allSets);
}
......@@ -1035,6 +1198,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
BaseWorkFlow sourceWorkFlow = (BaseWorkFlow)(source);
_Job.copyFrom (sourceWorkFlow._Job, linkToGhosts);
_Template.copyFrom (sourceWorkFlow._Template, linkToGhosts);
}
}
......@@ -1061,8 +1225,6 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
super.validate (context);
context.check (getJobID() != null, this, SINGLEREFERENCE_Job, "mandatory");
}
......@@ -1077,6 +1239,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
_SortOrder = (Integer)(HELPER_SortOrder.readExternal (_SortOrder, vals.get(FIELD_SortOrder))); //
_ApplicationStatus = (ApplicationStatus)(HELPER_ApplicationStatus.readExternal (_ApplicationStatus, vals.get(FIELD_ApplicationStatus))); //
_Job.readExternalData(vals.get(SINGLEREFERENCE_Job));
_Template.readExternalData(vals.get(SINGLEREFERENCE_Template));
}
......@@ -1092,6 +1255,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
vals.put (FIELD_SortOrder, HELPER_SortOrder.writeExternal (_SortOrder));
vals.put (FIELD_ApplicationStatus, HELPER_ApplicationStatus.writeExternal (_ApplicationStatus));
vals.put (SINGLEREFERENCE_Job, _Job.writeExternalData());
vals.put (SINGLEREFERENCE_Template, _Template.writeExternalData());
}
......@@ -1120,6 +1284,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
// Compare single assocs
_Job.compare (otherWorkFlow._Job, listener);
_Template.compare (otherWorkFlow._Template, listener);
// Compare multiple assocs
......@@ -1144,6 +1309,7 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
visitor.visitField(this, FIELD_SortOrder, HELPER_SortOrder.toObject(getSortOrder()));
visitor.visitField(this, FIELD_ApplicationStatus, HELPER_ApplicationStatus.toObject(getApplicationStatus()));
visitor.visitAssociation (_Job);
visitor.visitAssociation (_Template);
}
......@@ -1156,6 +1322,10 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
{
visitor.visit (_Job);
}
if (scope.includes (_Template))
{
visitor.visit (_Template);
}
}
......@@ -1197,6 +1367,10 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
{
return filter.matches (getJob ());
}
else if (attribName.equals (SINGLEREFERENCE_Template))
{
return filter.matches (getTemplate ());
}
else
{
return super.testFilter (attribName, filter);
......@@ -1252,6 +1426,12 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
return this;
}
public SearchAll andTemplate (QueryFilter<AssessmentCriteriaTemplate> filter)
{
filter.addFilter (context, "tl_work_flow.template_id", "Template");
return this;
}
public WorkFlow[]
search (ObjectTransaction transaction) throws StorageException
{
......@@ -1385,6 +1565,10 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
{
return getWriteability_Job ();
}
else if (fieldName.equals (SINGLEREFERENCE_Template))
{
return getWriteability_Template ();
}
else
{
return super.getWriteable (fieldName);
......@@ -1594,6 +1778,10 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
{
return toJob ();
}
if (name.equals ("Template"))
{
return toTemplate ();
}
return super.to(name);
......@@ -1611,6 +1799,12 @@ public abstract class BaseWorkFlow extends BaseBusinessClass
{
return Job.REFERENCE_Job.new JobPipeLineFactory<From, Job> (this, new ORMSingleAssocPipe<Me, Job>(SINGLEREFERENCE_Job, filter));
}
public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toTemplate () { return toTemplate (Filter.ALL); }
public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toTemplate (Filter<AssessmentCriteriaTemplate> filter)
{
return AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate.new AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> (this, new ORMSingleAssocPipe<Me, AssessmentCriteriaTemplate>(SINGLEREFERENCE_Template, filter));
}
}
......@@ -1656,6 +1850,20 @@ class DummyWorkFlow extends WorkFlow
return Job.DUMMY_Job.getObjectID();
}
public AssessmentCriteriaTemplate getTemplate () throws StorageException
{
return (AssessmentCriteriaTemplate)(AssessmentCriteriaTemplate.DUMMY_AssessmentCriteriaTemplate);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getTemplateID ()
{
return AssessmentCriteriaTemplate.DUMMY_AssessmentCriteriaTemplate.getObjectID();
}
}
package performa.orm;
import java.util.Collection;
import java.util.Comparator;
import java.util.Set;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.objstore.rdbms.filters.InFilter;
import oneit.objstore.utils.ObjstoreUtils;
import oneit.utils.CollectionUtils;
import oneit.utils.ObjectTransform;
import oneit.utils.filter.Filter;
import performa.orm.types.CultureClass;
public class CultureCriteriaTemplate extends BaseCultureCriteriaTemplate
{
......@@ -17,4 +28,18 @@ public class CultureCriteriaTemplate extends BaseCultureCriteriaTemplate
{
return getTemplateName();
}
public Collection<CultureCriteria> getCultureCriteriasForClass(CultureClass cultureClass)
{
Filter elementFilter = CultureElement.SearchByAll().andCultureClass(new EqualsFilter(cultureClass));
Set<CultureElement> cultureElements = pipelineCultureCriteriaTemplate().toCultureCriterias().toCultureElement(elementFilter).uniqueVals();
Filter criteriaFilter = CultureCriteria.SearchByAll().andCultureElement(new InFilter(cultureElements));
return ObjstoreUtils.sort(pipelineCultureCriteriaTemplate().toCultureCriterias(criteriaFilter).vals(),
new ObjectTransform[]{CultureCriteria.pipesCultureCriteria().toObjectID()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
}
}
\ No newline at end of file
......@@ -10,19 +10,16 @@
<TABLE name="tl_culture_template" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="TemplateName" type="String" dbcol="template_name" length="100" uniqueGroup="TemplateName"/>
<ATTRIB name="TemplateName" type="String" dbcol="template_name" length="100" uniqueGroup="TemplateID"/>
<ATTRIB name="CultureStatement" type="String" dbcol="culture_statement" length="2000"/>
<SINGLEREFERENCE name="User" type="SecUser" dbcol="user_id" uniqueGroup="TemplateName"/>
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" />
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" uniqueGroup="TemplateID"/>
<SINGLEREFERENCE name="CompanyUser" type="CompanyUser" dbcol="company_user_id" uniqueGroup="TemplateID"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_culture_template.object_id is not null" orderBy="tl_culture_template.object_id" />
<SEARCH type="Company" paramFilter="tl_culture_template.object_id is not null" orderBy="tl_culture_template.object_id">
<TABLE name="oneit_sec_user_extension" join="oneit_sec_user_extension.user_id = tl_culture_template.user_id"/>
<TABLE name="tl_company" join="tl_company.object_id = oneit_sec_user_extension.company_id"/>
<PARAM name="Company" type="Company" transform="Company.getObjectID ()" paramFilter="tl_company.object_id = ${Company}"/>
</SEARCH>
</BUSINESSCLASS>
......
......@@ -28,10 +28,12 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
// Private attributes corresponding to business object data
private String dummyTemplateName;
private String dummyCultureStatement;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_TemplateName = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_CultureStatement = DefaultAttributeHelper.INSTANCE;
......@@ -39,10 +41,11 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
public CultureCriteriaTemplatePersistenceMgr ()
{
dummyTemplateName = (String)(HELPER_TemplateName.initialise (dummyTemplateName));
dummyCultureStatement = (String)(HELPER_CultureStatement.initialise (dummyCultureStatement));
}
private String SELECT_COLUMNS = "{PREFIX}tl_culture_template.object_id as id, {PREFIX}tl_culture_template.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_culture_template.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_culture_template.template_name, {PREFIX}tl_culture_template.user_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_culture_template.object_id as id, {PREFIX}tl_culture_template.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_culture_template.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_culture_template.template_name, {PREFIX}tl_culture_template.culture_statement, {PREFIX}tl_culture_template.client_id, {PREFIX}tl_culture_template.hiring_team_id, {PREFIX}tl_culture_template.company_user_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -94,7 +97,10 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
// Check for persistent sets already prefetched
if (false || !tl_culture_templatePSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_culture_templatePSet.containsAttrib(CultureCriteriaTemplate.FIELD_TemplateName)||
!tl_culture_templatePSet.containsAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_User))
!tl_culture_templatePSet.containsAttrib(CultureCriteriaTemplate.FIELD_CultureStatement)||
!tl_culture_templatePSet.containsAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_Client)||
!tl_culture_templatePSet.containsAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_HiringTeam)||
!tl_culture_templatePSet.containsAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_CompanyUser))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
......@@ -164,10 +170,10 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_culture_template " +
"SET template_name = ?, user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET template_name = ?, culture_statement = ?, client_id = ? , hiring_team_id = ? , company_user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_culture_template.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.FIELD_TemplateName))).listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_User)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.FIELD_TemplateName))).listEntry (HELPER_CultureStatement.getForSQL(dummyCultureStatement, tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.FIELD_CultureStatement))).listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_CompanyUser)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -255,10 +261,6 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public ResultSet executeSearchQueryCompany (SQLManager sqlMgr, Company Company) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryCompany");
}
......@@ -408,56 +410,6 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
return results;
}
else if (searchType.equals (CultureCriteriaTemplate.SEARCH_Company))
{
// Local scope for transformed variables
{
if (criteria.containsKey("Company"))
{
Company Company = (Company)(criteria.get("Company"));
criteria.put ("Company", Company.getObjectID ());
}
}
String orderBy = " ORDER BY tl_culture_template.object_id";
String tables = ", oneit_sec_user_extension, tl_company ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_culture_template.object_id is not null
String preFilter = "(tl_culture_template.object_id is not null)"
+ " AND (oneit_sec_user_extension.user_id = tl_culture_template.user_id) AND (tl_company.object_id = oneit_sec_user_extension.company_id) ";
if (criteria.containsKey("Company"))
{
preFilter += " AND (tl_company.object_id = ${Company}) ";
preFilter += "";
}
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_culture_template " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
......@@ -478,8 +430,11 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
tl_culture_templatePSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_culture_templatePSet.setAttrib(CultureCriteriaTemplate.FIELD_TemplateName, HELPER_TemplateName.getFromRS(dummyTemplateName, r, "template_name"));
tl_culture_templatePSet.setAttrib(CultureCriteriaTemplate.FIELD_CultureStatement, HELPER_CultureStatement.getFromRS(dummyCultureStatement, r, "culture_statement"));
tl_culture_templatePSet.setAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_User, r.getObject ("user_id"));
tl_culture_templatePSet.setAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_Client, r.getObject ("client_id"));
tl_culture_templatePSet.setAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_HiringTeam, r.getObject ("hiring_team_id"));
tl_culture_templatePSet.setAttrib(CultureCriteriaTemplate.SINGLEREFERENCE_CompanyUser, r.getObject ("company_user_id"));
}
......@@ -496,10 +451,10 @@ public class CultureCriteriaTemplatePersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_culture_template " +
" (template_name, user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (template_name, culture_statement, client_id, hiring_team_id, company_user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.FIELD_TemplateName))) .listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_User)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_TemplateName.getForSQL(dummyTemplateName, tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.FIELD_TemplateName))).listEntry (HELPER_CultureStatement.getForSQL(dummyCultureStatement, tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.FIELD_CultureStatement))) .listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_culture_templatePSet.getAttrib (CultureCriteriaTemplate.SINGLEREFERENCE_CompanyUser)))) .listEntry (objectID.longID ()).toList().toArray());
tl_culture_templatePSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -39,7 +39,7 @@
<ATTRIB name="PlanRenewedOn" type="Date" dbcol="plan_renewed_on" mandatory="false" />
<ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" />
<ATTRIB name="AvailableCredits" type="Integer" dbcol="available_credits" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.TRUE"/>
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" />
<ATTRIB name="HasCap" type="Boolean" dbcol="has_cap" defaultValue="Boolean.FALSE"/>
<ATTRIB name="MaxCap" type="Integer" dbcol="max_cap" />
<ATTRIB name="CouponExpiryDate" type="Date" dbcol="coupon_expiry_date" />
......
......@@ -313,8 +313,9 @@ public class Job extends BaseJob
{
CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser);
return AssessmentCriteriaTemplate.SearchByCompany()
.byCompany(companyUser.getCompany())
return AssessmentCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(getHiringTeam()))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(getTransaction());
}
......@@ -323,8 +324,9 @@ public class Job extends BaseJob
{
CompanyUser companyUser = SecUser.getTXUser(getTransaction()).getExtension(CompanyUser.REFERENCE_CompanyUser);
return CultureCriteriaTemplate.SearchByCompany()
.byCompany(companyUser.getCompany())
return CultureCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(getHiringTeam()))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(getTransaction());
}
......
......@@ -27,7 +27,6 @@
<TRANSIENT name="RankingCompleted" type="Boolean" />
<TRANSIENT name="OccupationId" type="String" />
<TRANSIENTSINGLE name="AssessmentTemplate" type="AssessmentCriteriaTemplate" />
<TRANSIENTSINGLE name="CultureTemplate" type="CultureCriteriaTemplate" />
<TRANSIENTSINGLE name="JobTemplate" type="Job" />
<TRANSIENTSINGLE name="AppStatusWorkFlow" type="WorkFlow" />
......@@ -60,13 +59,14 @@
<ATTRIB name="DraftLocation" type="DraftLocation" dbcol="draft_location" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" />
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="false"/>
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" backreferenceName="Jobs"/>
<SINGLEREFERENCE name="JobOwner" type="CompanyUser" dbcol="job_owner_id" />
<SINGLEREFERENCE name="CreatedBy" type="CompanyUser" dbcol="company_user_id" />
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" />
<SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/>
<SINGLEREFERENCE name="ShortenedURL" type="ShortenedURL" dbcol="shortened_url_id" />
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" mandatory="false"/>
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" backreferenceName="Jobs"/>
<SINGLEREFERENCE name="JobOwner" type="CompanyUser" dbcol="job_owner_id" />
<SINGLEREFERENCE name="CreatedBy" type="CompanyUser" dbcol="company_user_id" />
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" />
<SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/>
<SINGLEREFERENCE name="ShortenedURL" type="ShortenedURL" dbcol="shortened_url_id" />
<SINGLEREFERENCE name="AssessmentTemplate" type="AssessmentCriteriaTemplate" dbcol="template_id" />
</TABLE>
......
......@@ -115,7 +115,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
}
private String SELECT_COLUMNS = "{PREFIX}tl_job.object_id as id, {PREFIX}tl_job.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_job.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_job.job_title, {PREFIX}tl_job.job_description, {PREFIX}tl_job.job_status, {PREFIX}tl_job.open_date, {PREFIX}tl_job.apply_by, {PREFIX}tl_job.include_assessment_criteria, {PREFIX}tl_job.assessment_type, {PREFIX}tl_job.random_key, {PREFIX}tl_job.job_type, {PREFIX}tl_job.ref_number, {PREFIX}tl_job.last_status_change_date, {PREFIX}tl_job.remote, {PREFIX}tl_job.city, {PREFIX}tl_job.postcode, {PREFIX}tl_job.location_radius, {PREFIX}tl_job.state, {PREFIX}tl_job.country, {PREFIX}tl_job.require_cv, {PREFIX}tl_job.manually_closed, {PREFIX}tl_job.last_edited, {PREFIX}tl_job.is_ppj, {PREFIX}tl_job.industry, {PREFIX}tl_job.culture_statement, {PREFIX}tl_job.draft_location, {PREFIX}tl_job.google_address_text, {PREFIX}tl_job.level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.job_owner_id, {PREFIX}tl_job.company_user_id, {PREFIX}tl_job.hiring_team_id, {PREFIX}tl_job.occupation_id, {PREFIX}tl_job.shortened_url_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_job.object_id as id, {PREFIX}tl_job.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_job.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_job.job_title, {PREFIX}tl_job.job_description, {PREFIX}tl_job.job_status, {PREFIX}tl_job.open_date, {PREFIX}tl_job.apply_by, {PREFIX}tl_job.include_assessment_criteria, {PREFIX}tl_job.assessment_type, {PREFIX}tl_job.random_key, {PREFIX}tl_job.job_type, {PREFIX}tl_job.ref_number, {PREFIX}tl_job.last_status_change_date, {PREFIX}tl_job.remote, {PREFIX}tl_job.city, {PREFIX}tl_job.postcode, {PREFIX}tl_job.location_radius, {PREFIX}tl_job.state, {PREFIX}tl_job.country, {PREFIX}tl_job.require_cv, {PREFIX}tl_job.manually_closed, {PREFIX}tl_job.last_edited, {PREFIX}tl_job.is_ppj, {PREFIX}tl_job.industry, {PREFIX}tl_job.culture_statement, {PREFIX}tl_job.draft_location, {PREFIX}tl_job.google_address_text, {PREFIX}tl_job.level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.job_owner_id, {PREFIX}tl_job.company_user_id, {PREFIX}tl_job.hiring_team_id, {PREFIX}tl_job.occupation_id, {PREFIX}tl_job.shortened_url_id, {PREFIX}tl_job.template_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -197,7 +197,8 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
!tl_jobPSet.containsAttrib(Job.SINGLEREFERENCE_CreatedBy)||
!tl_jobPSet.containsAttrib(Job.SINGLEREFERENCE_HiringTeam)||
!tl_jobPSet.containsAttrib(Job.SINGLEREFERENCE_Occupation)||
!tl_jobPSet.containsAttrib(Job.SINGLEREFERENCE_ShortenedURL))
!tl_jobPSet.containsAttrib(Job.SINGLEREFERENCE_ShortenedURL)||
!tl_jobPSet.containsAttrib(Job.SINGLEREFERENCE_AssessmentTemplate))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
......@@ -277,10 +278,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_job " +
"SET job_title = ?, job_description = ?, job_status = ?, open_date = ?, apply_by = ?, include_assessment_criteria = ?, assessment_type = ?, random_key = ?, job_type = ?, ref_number = ?, last_status_change_date = ?, remote = ?, city = ?, postcode = ?, location_radius = ?, state = ?, country = ?, require_cv = ?, manually_closed = ?, last_edited = ?, is_ppj = ?, industry = ?, culture_statement = ?, draft_location = ?, google_address_text = ?, level_id = ? , client_id = ? , job_owner_id = ? , company_user_id = ? , hiring_team_id = ? , occupation_id = ? , shortened_url_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET job_title = ?, job_description = ?, job_status = ?, open_date = ?, apply_by = ?, include_assessment_criteria = ?, assessment_type = ?, random_key = ?, job_type = ?, ref_number = ?, last_status_change_date = ?, remote = ?, city = ?, postcode = ?, location_radius = ?, state = ?, country = ?, require_cv = ?, manually_closed = ?, last_edited = ?, is_ppj = ?, industry = ?, culture_statement = ?, draft_location = ?, google_address_text = ?, level_id = ? , client_id = ? , job_owner_id = ? , company_user_id = ? , hiring_team_id = ? , occupation_id = ? , shortened_url_id = ? , template_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_job.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_JobTitle.getForSQL(dummyJobTitle, tl_jobPSet.getAttrib (Job.FIELD_JobTitle))).listEntry (HELPER_JobDescription.getForSQL(dummyJobDescription, tl_jobPSet.getAttrib (Job.FIELD_JobDescription))).listEntry (HELPER_JobStatus.getForSQL(dummyJobStatus, tl_jobPSet.getAttrib (Job.FIELD_JobStatus))).listEntry (HELPER_OpenDate.getForSQL(dummyOpenDate, tl_jobPSet.getAttrib (Job.FIELD_OpenDate))).listEntry (HELPER_ApplyBy.getForSQL(dummyApplyBy, tl_jobPSet.getAttrib (Job.FIELD_ApplyBy))).listEntry (HELPER_IncludeAssessmentCriteria.getForSQL(dummyIncludeAssessmentCriteria, tl_jobPSet.getAttrib (Job.FIELD_IncludeAssessmentCriteria))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_jobPSet.getAttrib (Job.FIELD_AssessmentType))).listEntry (HELPER_RandomKey.getForSQL(dummyRandomKey, tl_jobPSet.getAttrib (Job.FIELD_RandomKey))).listEntry (HELPER_JobType.getForSQL(dummyJobType, tl_jobPSet.getAttrib (Job.FIELD_JobType))).listEntry (HELPER_ReferenceNumber.getForSQL(dummyReferenceNumber, tl_jobPSet.getAttrib (Job.FIELD_ReferenceNumber))).listEntry (HELPER_LastStatusChangeDate.getForSQL(dummyLastStatusChangeDate, tl_jobPSet.getAttrib (Job.FIELD_LastStatusChangeDate))).listEntry (HELPER_Remote.getForSQL(dummyRemote, tl_jobPSet.getAttrib (Job.FIELD_Remote))).listEntry (HELPER_City.getForSQL(dummyCity, tl_jobPSet.getAttrib (Job.FIELD_City))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_jobPSet.getAttrib (Job.FIELD_PostCode))).listEntry (HELPER_ExpectedCandidateRadius.getForSQL(dummyExpectedCandidateRadius, tl_jobPSet.getAttrib (Job.FIELD_ExpectedCandidateRadius))).listEntry (HELPER_State.getForSQL(dummyState, tl_jobPSet.getAttrib (Job.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_jobPSet.getAttrib (Job.FIELD_Country))).listEntry (HELPER_RequireCV.getForSQL(dummyRequireCV, tl_jobPSet.getAttrib (Job.FIELD_RequireCV))).listEntry (HELPER_IsManuallyClosed.getForSQL(dummyIsManuallyClosed, tl_jobPSet.getAttrib (Job.FIELD_IsManuallyClosed))).listEntry (HELPER_LastEdited.getForSQL(dummyLastEdited, tl_jobPSet.getAttrib (Job.FIELD_LastEdited))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_jobPSet.getAttrib (Job.FIELD_IsPPJ))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_jobPSet.getAttrib (Job.FIELD_Industry))).listEntry (HELPER_CultureStatement.getForSQL(dummyCultureStatement, tl_jobPSet.getAttrib (Job.FIELD_CultureStatement))).listEntry (HELPER_DraftLocation.getForSQL(dummyDraftLocation, tl_jobPSet.getAttrib (Job.FIELD_DraftLocation))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_jobPSet.getAttrib (Job.FIELD_GoogleAddressText))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_JobOwner)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_CreatedBy)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Occupation)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_ShortenedURL)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_JobTitle.getForSQL(dummyJobTitle, tl_jobPSet.getAttrib (Job.FIELD_JobTitle))).listEntry (HELPER_JobDescription.getForSQL(dummyJobDescription, tl_jobPSet.getAttrib (Job.FIELD_JobDescription))).listEntry (HELPER_JobStatus.getForSQL(dummyJobStatus, tl_jobPSet.getAttrib (Job.FIELD_JobStatus))).listEntry (HELPER_OpenDate.getForSQL(dummyOpenDate, tl_jobPSet.getAttrib (Job.FIELD_OpenDate))).listEntry (HELPER_ApplyBy.getForSQL(dummyApplyBy, tl_jobPSet.getAttrib (Job.FIELD_ApplyBy))).listEntry (HELPER_IncludeAssessmentCriteria.getForSQL(dummyIncludeAssessmentCriteria, tl_jobPSet.getAttrib (Job.FIELD_IncludeAssessmentCriteria))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_jobPSet.getAttrib (Job.FIELD_AssessmentType))).listEntry (HELPER_RandomKey.getForSQL(dummyRandomKey, tl_jobPSet.getAttrib (Job.FIELD_RandomKey))).listEntry (HELPER_JobType.getForSQL(dummyJobType, tl_jobPSet.getAttrib (Job.FIELD_JobType))).listEntry (HELPER_ReferenceNumber.getForSQL(dummyReferenceNumber, tl_jobPSet.getAttrib (Job.FIELD_ReferenceNumber))).listEntry (HELPER_LastStatusChangeDate.getForSQL(dummyLastStatusChangeDate, tl_jobPSet.getAttrib (Job.FIELD_LastStatusChangeDate))).listEntry (HELPER_Remote.getForSQL(dummyRemote, tl_jobPSet.getAttrib (Job.FIELD_Remote))).listEntry (HELPER_City.getForSQL(dummyCity, tl_jobPSet.getAttrib (Job.FIELD_City))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_jobPSet.getAttrib (Job.FIELD_PostCode))).listEntry (HELPER_ExpectedCandidateRadius.getForSQL(dummyExpectedCandidateRadius, tl_jobPSet.getAttrib (Job.FIELD_ExpectedCandidateRadius))).listEntry (HELPER_State.getForSQL(dummyState, tl_jobPSet.getAttrib (Job.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_jobPSet.getAttrib (Job.FIELD_Country))).listEntry (HELPER_RequireCV.getForSQL(dummyRequireCV, tl_jobPSet.getAttrib (Job.FIELD_RequireCV))).listEntry (HELPER_IsManuallyClosed.getForSQL(dummyIsManuallyClosed, tl_jobPSet.getAttrib (Job.FIELD_IsManuallyClosed))).listEntry (HELPER_LastEdited.getForSQL(dummyLastEdited, tl_jobPSet.getAttrib (Job.FIELD_LastEdited))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_jobPSet.getAttrib (Job.FIELD_IsPPJ))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_jobPSet.getAttrib (Job.FIELD_Industry))).listEntry (HELPER_CultureStatement.getForSQL(dummyCultureStatement, tl_jobPSet.getAttrib (Job.FIELD_CultureStatement))).listEntry (HELPER_DraftLocation.getForSQL(dummyDraftLocation, tl_jobPSet.getAttrib (Job.FIELD_DraftLocation))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_jobPSet.getAttrib (Job.FIELD_GoogleAddressText))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_JobOwner)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_CreatedBy)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Occupation)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_ShortenedURL)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_AssessmentTemplate)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -733,6 +734,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
tl_jobPSet.setAttrib(Job.SINGLEREFERENCE_HiringTeam, r.getObject ("hiring_team_id"));
tl_jobPSet.setAttrib(Job.SINGLEREFERENCE_Occupation, r.getObject ("occupation_id"));
tl_jobPSet.setAttrib(Job.SINGLEREFERENCE_ShortenedURL, r.getObject ("shortened_url_id"));
tl_jobPSet.setAttrib(Job.SINGLEREFERENCE_AssessmentTemplate, r.getObject ("template_id"));
}
......@@ -749,10 +751,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_job " +
" (job_title, job_description, job_status, open_date, apply_by, include_assessment_criteria, assessment_type, random_key, job_type, ref_number, last_status_change_date, remote, city, postcode, location_radius, state, country, require_cv, manually_closed, last_edited, is_ppj, industry, culture_statement, draft_location, google_address_text, level_id, client_id, job_owner_id, company_user_id, hiring_team_id, occupation_id, shortened_url_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (job_title, job_description, job_status, open_date, apply_by, include_assessment_criteria, assessment_type, random_key, job_type, ref_number, last_status_change_date, remote, city, postcode, location_radius, state, country, require_cv, manually_closed, last_edited, is_ppj, industry, culture_statement, draft_location, google_address_text, level_id, client_id, job_owner_id, company_user_id, hiring_team_id, occupation_id, shortened_url_id, template_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_JobTitle.getForSQL(dummyJobTitle, tl_jobPSet.getAttrib (Job.FIELD_JobTitle))).listEntry (HELPER_JobDescription.getForSQL(dummyJobDescription, tl_jobPSet.getAttrib (Job.FIELD_JobDescription))).listEntry (HELPER_JobStatus.getForSQL(dummyJobStatus, tl_jobPSet.getAttrib (Job.FIELD_JobStatus))).listEntry (HELPER_OpenDate.getForSQL(dummyOpenDate, tl_jobPSet.getAttrib (Job.FIELD_OpenDate))).listEntry (HELPER_ApplyBy.getForSQL(dummyApplyBy, tl_jobPSet.getAttrib (Job.FIELD_ApplyBy))).listEntry (HELPER_IncludeAssessmentCriteria.getForSQL(dummyIncludeAssessmentCriteria, tl_jobPSet.getAttrib (Job.FIELD_IncludeAssessmentCriteria))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_jobPSet.getAttrib (Job.FIELD_AssessmentType))).listEntry (HELPER_RandomKey.getForSQL(dummyRandomKey, tl_jobPSet.getAttrib (Job.FIELD_RandomKey))).listEntry (HELPER_JobType.getForSQL(dummyJobType, tl_jobPSet.getAttrib (Job.FIELD_JobType))).listEntry (HELPER_ReferenceNumber.getForSQL(dummyReferenceNumber, tl_jobPSet.getAttrib (Job.FIELD_ReferenceNumber))).listEntry (HELPER_LastStatusChangeDate.getForSQL(dummyLastStatusChangeDate, tl_jobPSet.getAttrib (Job.FIELD_LastStatusChangeDate))).listEntry (HELPER_Remote.getForSQL(dummyRemote, tl_jobPSet.getAttrib (Job.FIELD_Remote))).listEntry (HELPER_City.getForSQL(dummyCity, tl_jobPSet.getAttrib (Job.FIELD_City))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_jobPSet.getAttrib (Job.FIELD_PostCode))).listEntry (HELPER_ExpectedCandidateRadius.getForSQL(dummyExpectedCandidateRadius, tl_jobPSet.getAttrib (Job.FIELD_ExpectedCandidateRadius))).listEntry (HELPER_State.getForSQL(dummyState, tl_jobPSet.getAttrib (Job.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_jobPSet.getAttrib (Job.FIELD_Country))).listEntry (HELPER_RequireCV.getForSQL(dummyRequireCV, tl_jobPSet.getAttrib (Job.FIELD_RequireCV))).listEntry (HELPER_IsManuallyClosed.getForSQL(dummyIsManuallyClosed, tl_jobPSet.getAttrib (Job.FIELD_IsManuallyClosed))).listEntry (HELPER_LastEdited.getForSQL(dummyLastEdited, tl_jobPSet.getAttrib (Job.FIELD_LastEdited))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_jobPSet.getAttrib (Job.FIELD_IsPPJ))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_jobPSet.getAttrib (Job.FIELD_Industry))).listEntry (HELPER_CultureStatement.getForSQL(dummyCultureStatement, tl_jobPSet.getAttrib (Job.FIELD_CultureStatement))).listEntry (HELPER_DraftLocation.getForSQL(dummyDraftLocation, tl_jobPSet.getAttrib (Job.FIELD_DraftLocation))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_jobPSet.getAttrib (Job.FIELD_GoogleAddressText))) .listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_JobOwner)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_CreatedBy)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Occupation)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_ShortenedURL)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_JobTitle.getForSQL(dummyJobTitle, tl_jobPSet.getAttrib (Job.FIELD_JobTitle))).listEntry (HELPER_JobDescription.getForSQL(dummyJobDescription, tl_jobPSet.getAttrib (Job.FIELD_JobDescription))).listEntry (HELPER_JobStatus.getForSQL(dummyJobStatus, tl_jobPSet.getAttrib (Job.FIELD_JobStatus))).listEntry (HELPER_OpenDate.getForSQL(dummyOpenDate, tl_jobPSet.getAttrib (Job.FIELD_OpenDate))).listEntry (HELPER_ApplyBy.getForSQL(dummyApplyBy, tl_jobPSet.getAttrib (Job.FIELD_ApplyBy))).listEntry (HELPER_IncludeAssessmentCriteria.getForSQL(dummyIncludeAssessmentCriteria, tl_jobPSet.getAttrib (Job.FIELD_IncludeAssessmentCriteria))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_jobPSet.getAttrib (Job.FIELD_AssessmentType))).listEntry (HELPER_RandomKey.getForSQL(dummyRandomKey, tl_jobPSet.getAttrib (Job.FIELD_RandomKey))).listEntry (HELPER_JobType.getForSQL(dummyJobType, tl_jobPSet.getAttrib (Job.FIELD_JobType))).listEntry (HELPER_ReferenceNumber.getForSQL(dummyReferenceNumber, tl_jobPSet.getAttrib (Job.FIELD_ReferenceNumber))).listEntry (HELPER_LastStatusChangeDate.getForSQL(dummyLastStatusChangeDate, tl_jobPSet.getAttrib (Job.FIELD_LastStatusChangeDate))).listEntry (HELPER_Remote.getForSQL(dummyRemote, tl_jobPSet.getAttrib (Job.FIELD_Remote))).listEntry (HELPER_City.getForSQL(dummyCity, tl_jobPSet.getAttrib (Job.FIELD_City))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_jobPSet.getAttrib (Job.FIELD_PostCode))).listEntry (HELPER_ExpectedCandidateRadius.getForSQL(dummyExpectedCandidateRadius, tl_jobPSet.getAttrib (Job.FIELD_ExpectedCandidateRadius))).listEntry (HELPER_State.getForSQL(dummyState, tl_jobPSet.getAttrib (Job.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_jobPSet.getAttrib (Job.FIELD_Country))).listEntry (HELPER_RequireCV.getForSQL(dummyRequireCV, tl_jobPSet.getAttrib (Job.FIELD_RequireCV))).listEntry (HELPER_IsManuallyClosed.getForSQL(dummyIsManuallyClosed, tl_jobPSet.getAttrib (Job.FIELD_IsManuallyClosed))).listEntry (HELPER_LastEdited.getForSQL(dummyLastEdited, tl_jobPSet.getAttrib (Job.FIELD_LastEdited))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_jobPSet.getAttrib (Job.FIELD_IsPPJ))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_jobPSet.getAttrib (Job.FIELD_Industry))).listEntry (HELPER_CultureStatement.getForSQL(dummyCultureStatement, tl_jobPSet.getAttrib (Job.FIELD_CultureStatement))).listEntry (HELPER_DraftLocation.getForSQL(dummyDraftLocation, tl_jobPSet.getAttrib (Job.FIELD_DraftLocation))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_jobPSet.getAttrib (Job.FIELD_GoogleAddressText))) .listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Client)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_JobOwner)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_CreatedBy)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_Occupation)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_ShortenedURL)))).listEntry (SQLManager.CheckNull((Long)(tl_jobPSet.getAttrib (Job.SINGLEREFERENCE_AssessmentTemplate)))) .listEntry (objectID.longID ()).toList().toArray());
tl_jobPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -12,7 +12,8 @@
<ATTRIB name="SortOrder" type="Integer" dbcol="sort_order" mandatory="true" />
<ATTRIB name="ApplicationStatus" type="ApplicationStatus" dbcol="application_status" mandatory="true" attribHelper="EnumeratedAttributeHelper"/>
<SINGLEREFERENCE name="Job" type="Job" dbcol="job_id" backreferenceName="WorkFlows" mandatory="true"/>
<SINGLEREFERENCE name="Job" type="Job" dbcol="job_id" backreferenceName="WorkFlows"/>
<SINGLEREFERENCE name="Template" type="AssessmentCriteriaTemplate" dbcol="template_id" backreferenceName="WorkFlows"/>
</TABLE>
......
......@@ -48,7 +48,7 @@ public class WorkFlowPersistenceMgr extends ObjectPersistenceMgr
}
private String SELECT_COLUMNS = "{PREFIX}tl_work_flow.object_id as id, {PREFIX}tl_work_flow.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_work_flow.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_work_flow.name, {PREFIX}tl_work_flow.sort_order, {PREFIX}tl_work_flow.application_status, {PREFIX}tl_work_flow.job_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_work_flow.object_id as id, {PREFIX}tl_work_flow.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_work_flow.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_work_flow.name, {PREFIX}tl_work_flow.sort_order, {PREFIX}tl_work_flow.application_status, {PREFIX}tl_work_flow.job_id, {PREFIX}tl_work_flow.template_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -102,7 +102,8 @@ public class WorkFlowPersistenceMgr extends ObjectPersistenceMgr
!tl_work_flowPSet.containsAttrib(WorkFlow.FIELD_Name)||
!tl_work_flowPSet.containsAttrib(WorkFlow.FIELD_SortOrder)||
!tl_work_flowPSet.containsAttrib(WorkFlow.FIELD_ApplicationStatus)||
!tl_work_flowPSet.containsAttrib(WorkFlow.SINGLEREFERENCE_Job))
!tl_work_flowPSet.containsAttrib(WorkFlow.SINGLEREFERENCE_Job)||
!tl_work_flowPSet.containsAttrib(WorkFlow.SINGLEREFERENCE_Template))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
......@@ -158,6 +159,16 @@ public class WorkFlowPersistenceMgr extends ObjectPersistenceMgr
return results;
}
else if (refName.equals (WorkFlow.SINGLEREFERENCE_Template))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_work_flow " +
"WHERE " + SELECT_JOINS + "template_id = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
......@@ -182,10 +193,10 @@ public class WorkFlowPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_work_flow " +
"SET name = ?, sort_order = ?, application_status = ?, job_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET name = ?, sort_order = ?, application_status = ?, job_id = ? , template_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_work_flow.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Name.getForSQL(dummyName, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_Name))).listEntry (HELPER_SortOrder.getForSQL(dummySortOrder, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_SortOrder))).listEntry (HELPER_ApplicationStatus.getForSQL(dummyApplicationStatus, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_ApplicationStatus))).listEntry (SQLManager.CheckNull((Long)(tl_work_flowPSet.getAttrib (WorkFlow.SINGLEREFERENCE_Job)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_Name.getForSQL(dummyName, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_Name))).listEntry (HELPER_SortOrder.getForSQL(dummySortOrder, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_SortOrder))).listEntry (HELPER_ApplicationStatus.getForSQL(dummyApplicationStatus, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_ApplicationStatus))).listEntry (SQLManager.CheckNull((Long)(tl_work_flowPSet.getAttrib (WorkFlow.SINGLEREFERENCE_Job)))).listEntry (SQLManager.CheckNull((Long)(tl_work_flowPSet.getAttrib (WorkFlow.SINGLEREFERENCE_Template)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -446,6 +457,7 @@ public class WorkFlowPersistenceMgr extends ObjectPersistenceMgr
tl_work_flowPSet.setAttrib(WorkFlow.FIELD_ApplicationStatus, HELPER_ApplicationStatus.getFromRS(dummyApplicationStatus, r, "application_status"));
tl_work_flowPSet.setAttrib(WorkFlow.SINGLEREFERENCE_Job, r.getObject ("job_id"));
tl_work_flowPSet.setAttrib(WorkFlow.SINGLEREFERENCE_Template, r.getObject ("template_id"));
}
......@@ -462,10 +474,10 @@ public class WorkFlowPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_work_flow " +
" (name, sort_order, application_status, job_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (name, sort_order, application_status, job_id, template_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Name.getForSQL(dummyName, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_Name))).listEntry (HELPER_SortOrder.getForSQL(dummySortOrder, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_SortOrder))).listEntry (HELPER_ApplicationStatus.getForSQL(dummyApplicationStatus, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_ApplicationStatus))) .listEntry (SQLManager.CheckNull((Long)(tl_work_flowPSet.getAttrib (WorkFlow.SINGLEREFERENCE_Job)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Name.getForSQL(dummyName, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_Name))).listEntry (HELPER_SortOrder.getForSQL(dummySortOrder, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_SortOrder))).listEntry (HELPER_ApplicationStatus.getForSQL(dummyApplicationStatus, tl_work_flowPSet.getAttrib (WorkFlow.FIELD_ApplicationStatus))) .listEntry (SQLManager.CheckNull((Long)(tl_work_flowPSet.getAttrib (WorkFlow.SINGLEREFERENCE_Job)))).listEntry (SQLManager.CheckNull((Long)(tl_work_flowPSet.getAttrib (WorkFlow.SINGLEREFERENCE_Template)))) .listEntry (objectID.longID ()).toList().toArray());
tl_work_flowPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -587,31 +587,53 @@ public class Utils
return hiringTeam.pipelineHiringTeam().toCompany().toHiringTeams(filter).uniqueVals().toArray(new HiringTeam[0]);
}
public static void setupJobFromTemplate(Job job, Job jobTemplate) throws FieldException, StorageException, BusinessException
public static void setupJobFromTemplate(Job job, AssessmentCriteriaTemplate jobTemplate, ObjectTransaction objTran) throws FieldException, StorageException, BusinessException
{
for(CultureCriteria criteria : job.getCultureCriteriasSet())
for(AssessmentCriteria criteria : job.getAssessmentCriteriasSet())
{
criteria.delete();
}
for(AssessmentCriteria criteria : job.getAssessmentCriteriasSet())
for(WorkFlow workflow : job.getWorkFlowsSet())
{
criteria.delete();
workflow.delete();
}
job.setJobTitle(jobTemplate.getJobTitle());
job.setReferenceNumber(jobTemplate.getReferenceNumber());
job.setJobDescription(jobTemplate.getJobDescription());
job.setJobOwner(jobTemplate.getJobOwner());
job.setClient(jobTemplate.getClient());
job.setGoogleAddressText(jobTemplate.getGoogleAddressText());
job.setExpectedCandidateRadius(jobTemplate.getExpectedCandidateRadius());
job.setRemote(jobTemplate.getRemote());
job.setJobType(jobTemplate.getJobType());
job.setIndustry(jobTemplate.getIndustry());
job.setOccupation(jobTemplate.getOccupation());
job.setRequireCV(jobTemplate.getRequireCV());
job.setAssessmentType(jobTemplate.getAssessmentType());
job.setLevel(jobTemplate.getLevel());
for(AssessmentCriteria criteria : jobTemplate.getAssessmentCriteriasSet())
{
AssessmentCriteria criteriaCopy = AssessmentCriteria.createAssessmentCriteria(objTran);
criteriaCopy.copyAttributesFrom(criteria);
job.addToAssessmentCriterias(criteriaCopy);
}
jobTemplate.cloneJob(job);
for (WorkFlow workflow : jobTemplate.getWorkFlowsSet())
{
WorkFlow workflowCopy = WorkFlow.createWorkFlow(objTran);
workflowCopy.copyAttributesFrom(workflow);
job.initAttribs();
job.setJobStatus(JobStatus.DRAFT);
job.setApplyBy(null);
job.setOpenDate(null);
job.setReferenceNumber(null);
job.setCompletedDetails(Boolean.TRUE);
job.setCompletedAssessmentType(Boolean.TRUE);
job.setCompletedRequirements(Boolean.TRUE);
job.setCompletedCulture(Boolean.TRUE);
job.setShortenedURL(null);
job.setDraftLocation(null);
job.addToWorkFlows(workflowCopy);
}
}
public static ApplicationStatus getApplicationStatus(int sortOrder)
......@@ -692,4 +714,9 @@ public class Utils
return Arrays.asList(new RoleType[]{RoleType.STANDARD});
}
public static boolean isAssumedUser (HttpServletRequest request)
{
return request.getSession ().getAttribute (oneit.security.jsp.AssumeUserFP.UNASSUME_SEC_USER_ID) != null;
}
}
\ No newline at end of file
......@@ -18,6 +18,8 @@ public class WebUtils
public static final String APPLICANT_PORTAL = "ApplicantPortal";
public static final String ADMIN_HOME = "AdminHome";
public static final String APPLICANT_HOME = "ApplicantHome";
public static final String EDIT_CULTURE = "EditCulture";
public static final String EDIT_JOB_TEMP = "EditJobTemplate";
public static final String CREATE_JOB = "CreateJob";
public static final String START_JOB = "StartJob";
public static final String OCCUPATION = "Occupation";
......@@ -160,6 +162,8 @@ public class WebUtils
renderMode.equals(EDIT_CARD) ||
renderMode.equals(OCCUPATION) ||
renderMode.equals(START_JOB) ||
renderMode.equals(EDIT_CULTURE) ||
renderMode.equals(EDIT_JOB_TEMP) ||
renderMode.equals(CREATED_JOB);
}
......
......@@ -331,15 +331,15 @@ ul.profile-dropdown {
float: left;
margin-right: 22px;
}
/*.template-icon{
background-image: url('../images/my-company-icon.svg');
.template-icon{
background-image: url('../images/icon-reuse-sml.svg');
background-repeat: no-repeat;
background-position: center;
width: 24px;
height: 24px;
float: left;
margin-right: 22px;
}*/
}
.billing-icon{
background-image: url('../images/billing.png');
background-repeat: no-repeat;
......@@ -385,9 +385,9 @@ ul.profile-dropdown {
.main-menu li:hover .client-icon,.main-menu li.active .client-icon{
background-image: url('../images/clients-icon-hover.png');
}
/*.main-menu li:hover .template-icon,.main-menu li.active .template-icon{
background-image: url('../images/my-company-hover.png');
}*/
.main-menu li:hover .template-icon,.main-menu li.active .template-icon{
background-image: url('../images/icon-reuse-sml.svg');
}
.main-menu li:hover .manage-icon,.main-menu li.active .manage-icon{
background-image: url('../images/manage-user-hover.png');
}
......@@ -6022,7 +6022,140 @@ label, label .label-title span {
.job-main-tabs {
max-width: 1300px;
}
/* Start of Templates MT001 */
.edit-template{
padding-left: 50px;
}
.form-group.row.box-border{
height: 120px;
border: 1px solid #CED2D6;
border-radius: 5px;
padding: 35px 50px;
margin: 30px 10px;
}
.template-row {
display: flex;
}
.main-tab-template{
height: 90px;
border-radius: 5px 5px 0 0;
background-color: #4E5258;
}
.main-tab-template span.job-details{
color: #FFFFFF;
font-size: 20px;
}
.main-tab-template span.job-details.culture{
padding-left: 50px;
}
.job-template-left .grey-span, .template-name-left .grey-span {
color: #8E97A0;
font-size: 11px;
font-family: Usual-Medium;
}
.job-template-left.job-template-cl1 {
width: 30%;
border-right: 1px solid #efefef;
display: flex;
align-items: center;
}
.job-template-left.job-template-cl2 {
width: 25%;
border-right: 1px solid #efefef;
}
.job-template-left.job-template-cl3 {
width: 20%;
border-right: 1px solid #efefef;
}
.job-template-left.job-template-cl4 {
width: 25%;
}
.job-template-left.job-template-cl1.culture {
width: 49%;
}
.job-template-left.job-template-cl4 .m-user-right-padlock {
float: right;
padding: 17px 0;
cursor: pointer;
position: absolute;
top: 0;
right: 25px;
width: auto;
}
.template-list {
background: #fff none repeat scroll 0 0;
display: inline-block;
width: 100%;
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.02);
margin-bottom: 10px;
height:80px;
}
.template-name-left{
float: left;
width: 30%;
padding: 18px 26px;
position: relative;
}
.template-name{
text-align: left;
font-size: 14px;
}
.template-name.heading{
font-size: 20px;
}
.job-template-left{
float: left;
width: 22%;
padding: 18px 26px;
position: relative;
}
.job-template-left .grey-span, .template-name-left .grey-span{
color: #8E97A0;
font-size: 11px;
}
.text-center.save-template{
padding-top: 30px;
}
.save-template-text{
color: #4E5258;
font-size: 14px;
font-weight: 300;
padding-top: 20px;
}
.form-group.row.box-border {
height: 120px;
border: 1px solid #CED2D6;
border-radius: 5px;
padding: 35px 50px;
margin: 30px 10px;
display: flex;
align-items: center;
}
.main-tab-template {
height: 90px;
border-radius: 5px 5px 0 0;
background-color: #4E5258;
display: flex;
align-items: center;
}
span.tab-number {
width: 35px;
height: 35px;
padding: 10px 12.5px;
background: #67B413;
color: white;
display: block;
border-radius: 50%;
margin: 0 25px 0 35px;
}
/* End of Templates MT001 */
/* Start of Clients HT010 */
......@@ -7482,4 +7615,18 @@ input{
.teammate-hiringteam {color: #8E97A0; font-size: 22px; font-weight: 300;}
.show-all-jobs-toggle span {display: inline-block; float: left; margin-right: 5px; font-size: 13px; color: #4E5258;}
.show-all-jobs-toggle {height: 40px; line-height: 22px; vertical-align: middle; padding-top: 30px;}
\ No newline at end of file
.show-all-jobs-toggle {height: 40px; line-height: 22px; vertical-align: middle; padding-top: 30px;}
.btn.btn-primary.loginAsAdmin {
border-radius: 100px;
background-color: #03a0e7 !important;
font-size: 15px;
text-align: center;
border-color: #03a0e7 !important;
width: 190px;
height: 50px;
margin-top: 10px;
margin-right: 20px;
font-weight: 500;
color: #ffffff !important;
}
......@@ -79,6 +79,24 @@
</NODE>
</MAP>
<MAP value="JOB_TEMPLATES" description="Job Templates" TemplatePage="dynamic_content_form_client.jsp">
<NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration">
<INHERITS nodename="StandardJSP"/>
<RenderMode name="Page" preIncludeJSP="extensions/adminportal/job_templates.jsp"/>
<RenderMode name="EditJobTemplate" preIncludeJSP="extensions/adminportal/edit_job_template.jsp"/>
</NODE>
</MAP>
<MAP value="CULTURE_TEMPLATES" description="Culture Templates" TemplatePage="dynamic_content_form_client.jsp">
<NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration">
<INHERITS nodename="StandardJSP"/>
<RenderMode name="Page" preIncludeJSP="extensions/adminportal/culture_templates.jsp"/>
<RenderMode name="EditCulture" preIncludeJSP="extensions/adminportal/edit_culture_template.jsp"/>
</NODE>
</MAP>
<MAP value="MY_COMPANY" description="My Company" TemplatePage="dynamic_content_form_client.jsp">
<NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration">
<INHERITS nodename="StandardJSP"/>
......
......@@ -11,8 +11,6 @@
String jobPage = WebUtils.getSamePageInRenderMode(request, "Page");
Debug.assertion(job != null, "Job is null in admin portal create job");
AssessmentCriteriaTemplate[] templates = job.getAssessmentTemplates();
%>
<script type="text/javascript">
......@@ -95,25 +93,15 @@
<oneit:recalcClass htmlTag="div" classScript="job.showAssessmentCriteriaSection() ? 'show': 'hide'" job="<%= job %>">
<%
// if(templates.length > 0 || false)
if(false)
if(job.getAssessmentTemplate() != null)
{
%>
<oneit:button value=" " name="loadRequirementsFromTemplate" cssClass="hide"
requestAttribs="<%= CollectionUtils.mapEntry ("Job", job)
.mapEntry (UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>" />
<div class="form-group wider-select">
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AssessmentTemplate" options="<%= templates %>"
blankValue="Optional: Select from previously defined Requirements"/>
</div>
<div class="info-box">
<div class="info-title">
Template : <strong>My Job Template Title</strong>
Template : <strong><%= job.getAssessmentTemplate().getTemplateName() %></strong>
</div>
<div class="info-desc">
Changing requirement below is possible and will not overwrite <strong>My Job Template Title</strong>, OR <strong>Job Details</strong> as already defined, however they will need to be saved if you wish to use them again (which also includes Job Details).
Changing requirement below is possible and will not overwrite <strong><%= job.getAssessmentTemplate().getTemplateName() %></strong>, OR <strong>Job Details</strong> as already defined, however they will need to be saved if you wish to use them again (which also includes Job Details).
</div>
</div>
<%
......@@ -171,17 +159,13 @@
}
%>
<%
if(false)
{
%>
<div class="form-group">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= job %>" id="save-assess-check" attributeName="SaveAssessmentTemplate" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="job.showSaveAssessmentTemplate() ? 'checked': 'unchecked'" job="<%= job %>">
<label for="save-assess-check">
<oneit:ormlabel obj="<%= job %>" field="SaveAssessmentTemplate" />
<oneit:label GUIName="Save Job Details and Requirements as a new template (this will not publish the Job)" />
</label>
</oneit:recalcClass>
</div>
......@@ -200,9 +184,6 @@
</span>
</div>
</oneit:recalcClass>
<%
}
%>
</oneit:recalcClass>
<div class="text-center">
......
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.EDIT_CULTURE);
SecUser secUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
Map<String, String[]> parameterMap = request.getParameterMap();
Client selectedClient = null;
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
Client[] clients = (Client[]) process.getAttribute("Clients");
CultureCriteriaTemplate[] templates = (CultureCriteriaTemplate[]) process.getAttribute("CultureCriteriaTemplates");
if( request.getParameter("ClientSortOption") != null)
{
clientSortOpt = ClientSortOption.forName((String) request.getParameter("ClientSortOption"));
}
if(clientSortOpt == null)
{
clientSortOpt = ClientSortOption.ALPHA_A_Z;
}
if(templates == null)
{
templates = CultureCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(hiringTeam))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(transaction);
process.setAttribute("CultureCriteriaTemplates", templates);
}
// handle client
if( parameterMap.containsKey("Client"))
{
if(!request.getParameter("Client").isEmpty())
{
selectedClient = Client.getClientByID(transaction, Long.valueOf(request.getParameter("Client")));
}
}
else
{
selectedClient = (Client) session.getAttribute("Client");
}
session.setAttribute("Client", selectedClient);
if(clients == null)
{
clients = Utils.getClientsByHiringTeam(transaction);
process.setAttribute("Clients", clients);
}
List<Client> sortedClients = Utils.getClientsSorted(clients, clientSortOpt);
process.setAttribute("ClientSortOption", clientSortOpt);
%>
<oneit:form name="cultureTemplates" method="post" enctype="multipart/form-data">
<div class="dashboard-content-area second-part">
<div class="jobs-list-shorting">
<div class="d-job-title all-jobs-title">Manage Culture Templates</div>
<%
if(false)
{
%>
<div class="shorting-dropdown">
<span class="order-label">Select Client</span>
<select class="form-control" onChange="location=this.value">
<%
for (ClientSortOption sortOption : ClientSortOption.getClientSortOptionArray())
{
String optionLink = clientPage + "&ClientSortOption=" + sortOption.getName() ;
%>
<option <%= (clientSortOpt != null && clientSortOpt == sortOption ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= sortOption.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div>
<%
}
%>
</div>
<div class="main-client-list">
<%
for(CultureCriteriaTemplate template : templates)
{
%>
<div class="template-list" id="<%= template.getID() %>">
<div class="template-row">
<div class="job-template-left job-template-cl1 culture">
<div class="template-name heading">
<oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" />
</div>
</div>
<div class="job-template-left job-template-cl2">
<span class="grey-span">CLIENT</span>
<div class="template-name">
<oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" />
</div>
</div>
<div class="job-template-left job-template-cl4">
<span class="grey-span">LAST UPDATED</span>
<div class="template-name">
<oneit:toString value="<%= template.getObjectLastModified() %>" mode="MidDate" />
</div>
<div class="m-user-right-padlock">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage + "&CultureCriteriaTemplateID=" + template.getObjectID())
.mapEntry("procParams", CollectionUtils.mapEntry("CultureCriteriaTemplate", template).toMap())
.toMap() %>">
<span class="m-user-right-padlockicon">
<span class="pencil"></span>
</span>
</oneit:button>
</div>
</div>
</div>
</div>
<%
}
%>
</div>
</div>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "CultureCriteriaTemplate", CultureCriteriaTemplate.REFERENCE_CultureCriteriaTemplate);
CultureCriteriaTemplate template = (CultureCriteriaTemplate) process.getAttribute("CultureCriteriaTemplate");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
Debug.assertion(template != null && !toRedirect, "Invalid template in culture templates");
template.pipelineCultureCriteriaTemplate().toCultureCriterias().toCultureElement().toRatings().uniqueVals(); //preloading data
%>
<script type="text/javascript">
$(document).ready(function(){
recalcFunction = setupRecalc ($("form#editCultureTemplate"), {'recalcOnError':true});
});
</script>
<oneit:form name="editCultureTemplate" method="post" enctype="multipart/form-data">
<h1 class="page-title page-title-with-arrow edit-template">
<oneit:button cssClass="arrow-btn-blue" name="gotoPage" value=" " skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("cancelProcess", true)
.toMap() %>">
<img src="images/arrow-left-prev_blue.svg" />
</oneit:button>
View/Edit Culture Template
</h1>
<div class="form-group row box-border">
<div class="col-md-1">
<label><oneit:label GUIName="Title" /></label>
</div>
<div class="col-md-5">
<oneit:ormInput obj="<%= template %>" type="text" attributeName="TemplateName" cssClass="form-control" />
</div>
<%
if(template.getClient() != null)
{
%>
<div class="col-md-1">
<label><oneit:label GUIName="Client" /></label>
</div>
<div class="col-md-5 wider-select">
<tagfile:ormsingleasso_select obj="<%= template %>" assocName="Client" options="<%= Utils.getClientsByHiringTeam(transaction) %>"/>
</div>
<%
}
%>
</div>
<div class="container-fluid">
<div class="main-tab-template">
<span class="job-details culture">Culture</span>
</div>
<div class="form-page-area nopadding">
<div class="create-job">
<div class="form-page-section darkbg">
<div class="form-group">
<label><oneit:label GUIName="Organisation Culture Statement" /> <a href="#" title="Note description gose here." class="info-icon"><img src="images/info-icon.png" /></a></label>
<oneit:ormtextarea obj="<%= template %>" attributeName="CultureStatement" cssClass="form-control textarea-box"/>
</div>
</div>
<oneit:dynInclude page="/extensions/adminportal/inc/culture_details.jsp" CultureCriteriaTemplate="<%= template %>" data="<%= CollectionUtils.EMPTY_MAP%>"/>
</div>
</div>
</div>
<div class="text-center save-template">
<oneit:button value="Save Template" name="save" cssClass="btn btn-primary top-margin-25 largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.toMap() %>" />
<div class="save-template-text">Saving this template will not affect any previously created or filled jobs</div>
</div>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "AssessmentCriteriaTemplate", AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate);
AssessmentCriteriaTemplate template = (AssessmentCriteriaTemplate) process.getAttribute("AssessmentCriteriaTemplate");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
String samePage = WebUtils.getSamePageInRenderMode(request, WebUtils.EDIT_JOB_TEMP);
Debug.assertion(template != null && !toRedirect, "Invalid template in job templates");
%>
<script type="text/javascript">
var lastclickedOccid = 0 , lastclickedOcc = "" ;
var occPopup;
var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null };
var scrolldiv = null ;
$(document).ready(function()
{
setupRecalc ($("form#editJobTemplate"), {'recalcOnError':true});
$("select[name$='JobTemplate']").change(function()
{
$("button[name$='loadJobFromTemplate']").click();
});
if ($("#select-occupation-id").val()) {
lastclickedOccid = $("#select-occupation-id").val();
}else {
lastclickedOccid = 0 ;
}
var popup_width = 1040;
occPopup = new jBox('Modal', {
id : "occupation-list",
attach: '.select-occupation',
title: 'Select the occupation classification for this job',
content : $("#occupation_content"),overlay : true,
closeButton: "title",
minWidth : popup_width, height : 500,
onCreated : function(){
$(".dyn-div").empty();
$(".occupation_content_column").css("width", popup_width/4 );
},
onOpen : function(){
$(".dyn-div").empty();
$('.occupation_content_column ul li').removeClass("clicked");
$(".occupation_select_info").css("width","75%");
if (scrolldiv===null) scrolldiv = '.main-list-div';
if(lastclickedOccid!==0){
var currEle = $(".main-list-div").find("li[data-id='"+ lastclickedOccid +"']");
occlistObj[currEle.parent('ul').attr("class")] = lastclickedOccid ;
checkParents(currEle);
for (i = 0; i < 4; i++) {
if (occlistObj["level"+i] ){
popuplateSelectLists ($(".main-list-div").find("li[data-id='"+ occlistObj["level"+i] +"']"));
$(".level"+i+"-div").find("li").removeClass("clicked");
$(".level"+i+"-div").find("li[data-id='"+ occlistObj["level"+i] +"']").addClass("clicked");
occlistObj["level"+i] = null ;
}
}
}
}
});
$(document).on("click",".occupation_content_column ul li",function(){
popuplateSelectLists($(this));
});
$("#save-job-occ").on("click",function(){
if(lastclickedOccid!==0){
occPopup.close();
}
});
$(document).on('mousewheel', function(e){
if(scrolldiv!==null){
var target = $( scrolldiv);
if(e.originalEvent.wheelDelta /120 > 0) {
target.scrollTop(target.scrollTop() + 10);
}
else{
target.scrollTop(target.scrollTop() - 10);
}
}
});
$(".create-job").find('input,select,textarea').each( function (i)
{
if($(this).hasClass('type_radio'))
{
$(this).next('label').attr('tabindex', i + 1);
}
else if($(this).hasClass('level_radio'))
{
$(this).parent('a').attr('tabindex', i + 1);
}
else if($(this).hasClass('last-workflow'))
{
$(this).attr('tabindex', i + 5);
}
else
{
$(this).attr('tabindex', i + 1);
}
});
var currFocusSelect2;
$(document).on('focus', '.select2.select2-container', function (e) {
// only open on original attempt - close focus event should not fire open
if (e.originalEvent && $(this).find(".select2-selection--single").length > 0) {
currFocusSelect2 = $(this).siblings('select').on("select2-blur", function(e) { log ("blur");});;
currFocusSelect2.select2('open');
}
});
$(document).on('keyup', '.select2.select2-container', function (e) {
if(!$(this).hasClass('select2-container--open')){
nexttab = parseInt($(this).siblings('select').attr('tabindex')) + 1 ;
$('[tabindex=' + nexttab + ']').focus();
}
});
$('input[type="text"][id$="Industry"]').blur(function(){
if($(this).next().val() === ""){
$(this).val('');
}
});
$('input[type="text"][id$="Industry"]').attr('placeholder','Please select an Industry');
});
function checkParents(currEle){
newCurrEle = currEle.parent('ul').parent("li");
if (newCurrEle.length){
occlistObj[newCurrEle.parent("ul").attr("class")] = newCurrEle.data("id") ;
checkParents(newCurrEle);
} else {
return false;
}
}
function popuplateSelectLists(thisEle){
lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ');
$(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid);
thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked");
if( !thisEle.parent().hasClass("level3")) {
$(".occupation_select_info").show();
var nextUl = thisEle.find('ul').first().clone();
$("." + nextUl.attr('class') + "-div").empty();
$("." + nextUl.attr('class') + "-div").nextAll().empty();
var nextDiv = $("." + nextUl.attr('class') + "-div");
if(nextUl) {
nextUl.appendTo(nextDiv);
}
if(nextDiv.hasScrollBar()){
scrolldiv = "." + nextUl.attr('class') + "-div";
}else{
scrolldiv = '.main-list-div';
}
if(thisEle.parent().hasClass("level2")) {
$(".occupation_select_info").hide();
} else {
if( thisEle.hasClass("main-item")) {
$(".occupation_select_info").css("width","50%").show();
} else {
if( thisEle.parent().hasClass("level1")) {
$(".occupation_select_info").css("width","25%").show();
}
}
}
}
}
function addWorkflow()
{
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/workflow_add.jsp", "#middle-workflows", {}, function (theHTML_JQ) {
$("#middle-workflows").append (theHTML_JQ);
$("#middle-workflows").find('input').each( function ()
{
$(this).attr('tabindex', 26);
});
});
}
function deleteWorkflow(deleteVarKey)
{
ajaxProcessDeleteJQ("<%= request.getContextPath() %>/genericDelete_AJAX.jsp", "#middle-workflows" , { varKey: deleteVarKey });
return false;
}
function addCriteria(criteria)
{
var divID = "#" + criteria;
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/job_assessment_criteria_add.jsp", divID, {'CriteriaName' : criteria}, function (theHTML_JQ) {
$(divID + "> #assessmentCriteriaSection").append (theHTML_JQ);
});
}
function deleteCriteria(deleteVarKey)
{
ajaxProcessDeleteJQ("<%= request.getContextPath() %>/genericDelete_AJAX.jsp", "#assessmentCriteriaSection" , { varKey: deleteVarKey });
return false;
}
(function($) {
$.fn.hasScrollBar = function() {
return this.get(0).scrollHeight > this.height();
}
})(jQuery);
</script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=AIzaSyCaBh-MsMb8BBYJD_NcFzoCmygQbt5-QSw"></script>
<oneit:script>
<oneit:script src="/scripts/google_address.js"/>
</oneit:script>
<oneit:form name="editJobTemplate" method="post" enctype="multipart/form-data">
<h1 class="page-title page-title-with-arrow edit-template">
<oneit:button cssClass="arrow-btn-blue" name="gotoPage" value=" " skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("cancelProcess", true)
.toMap() %>">
<img src="images/arrow-left-prev_blue.svg" />
</oneit:button>
View/Edit Job Template
</h1>
<div class="form-group row box-border">
<div class="col-md-1">
<label><oneit:label GUIName="Title" /></label>
</div>
<div class="col-md-11">
<oneit:ormInput obj="<%= template %>" type="text" attributeName="TemplateName" cssClass="form-control" />
</div>
</div>
<div class="container-fluid">
<div class="main-tab-template">
<span class="tab-number">1</span>
<span class="job-details">Job Details</span>
</div>
<div class="form-page-area nopadding">
<div class="create-job">
<div class="form-page-section">
<div class="form-group row">
<div class="col-md-8">
<label><oneit:label GUIName="Job Title" /></label>
<oneit:ormInput obj="<%= template %>" type="text" attributeName="JobTitle" cssClass="form-control" />
</div>
<div class="col-md-4">
<label><oneit:label GUIName="Reference Number" /><a href="#" title="Uniquely identify jobs that have identical titles. Examlple:<br>&#8226; New Home Sales Consutant (ABC123)<br>&#8226; New Home Sales Consutant (ABC456)" class="info-icon"><img src="images/info-icon.png" /></a></label>
<oneit:ormInput obj="<%= template %>" type="text" attributeName="ReferenceNumber" cssClass="form-control" />
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<label><oneit:label GUIName="About the Job" /></label>
<oneit:ormtextarea obj="<%= template %>" attributeName="JobDescription" cssClass="form-control textarea-box"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label><oneit:label GUIName="Job Owner"/></label>
<div class="wider-select">
<tagfile:ormsingleasso_select obj="<%= template %>" assocName="JobOwner" options="<%= template.getHiringTeam().getActiveTeammates().toArray(new CompanyUser[0]) %>"/>
</div>
</div>
<%
if(template.getHiringTeam().showHasClientSupport())
{
%>
<div class="col-sm-6 col-xs-12">
<label><oneit:label GUIName="Client "/><span>(Optional)</span></label>
<div class="wider-select">
<tagfile:ormsingleasso_select obj="<%= template %>" assocName="Client" options="<%= Utils.getClientsByHiringTeam(transaction) %>"/>
</div>
</div>
<%
}
%>
</div>
</div>
<div class="form-page-section darkbg">
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Job Location</label>
</div>
</div>
<div class="form-group row">
<div class="col-md-8">
<label><oneit:label GUIName="Google Location"/></label>
<oneit:ormInput obj="<%= template %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+template.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" />
</div>
<div class="col-md-4">
<label><oneit:label GUIName="Expected Candidate Radius"/></label>
<oneit:ormEnum obj="<%= template %>" attributeName="ExpectedCandidateRadius" cssClass="form-control"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= template %>" id="is-remote" attributeName="Remote" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="template.getRemote() != null && template.getRemote() ? 'checked': 'unchecked'" template="<%= template %>">
<label for="is-remote">
<oneit:label GUIName="Working remotely is an option" />
</label>
</oneit:recalcClass>
</div>
</div>
</div>
</div>
</div>
<div class="form-page-section">
<div class="form-group row">
<div class="col-md-12">
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= template %>" attributeName="JobType" cssClass="form-control"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label><oneit:label GUIName="Industry Classification" /></label>
<oneit:ormEnum obj="<%= template %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
</div>
<div class="col-md-6">
<label><oneit:label GUIName="Job Occupation Classification" /></label>
<input type="text" class="form-control select-occupation search-input " placeholder="Select the occupation classification"
value="<%= template.getOccupation() != null ? template.getOccupation() : "Select the occupation classification"%>"></input>
<oneit:ormInput obj="<%= template %>" id="select-occupation-id" attributeName="OccupationId" type="hidden"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= template %>" id="require-cv" attributeName="RequireCV" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="template.getRequireCV() != null && template.getRequireCV() ? 'checked': 'unchecked'" template="<%= template %>">
<label for="require-cv">
<oneit:label GUIName="Require CV and Cover Letter from Candidate" />
</label>
</oneit:recalcClass>
</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 class="form-page-section darkbg">
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Applicant Workflow</label>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
Please define your applicant approval/refinement workflow and tabs below. We have nominated some defaults to help you get started. You are allowed up to 9 different steps, and can drag to re-order using the handle on the left.
</div>
</div>
<div id="workflows">
<div>
<%
WorkFlow firstWorkflow = template.getWorkFlowBySortOrder(1);
%>
<div class="form-group row">
<div class="col-md-12">
<div class="workflow-row">
<span><%= firstWorkflow.getSortOrder() %></span>
<oneit:ormInput obj="<%= firstWorkflow %>" type="text" attributeName="Name" cssClass="form-control" />
</div>
<div class="seperator-dots"><span class="dot"></span><span class="dot"></span><span class="dot"></span></div>
</div>
</div>
</div>
<div id="middle-workflows">
<%
List<WorkFlow> sortedWorkflows = template.getSortedMiddleWorkFlows();
int index = 0;
for (WorkFlow workflow : sortedWorkflows)
{
index++;
%>
<div class="form-group row" id="<%= workflow.getID() %>">
<div class="col-md-12">
<div class="workflow-row">
<span><%= workflow.getSortOrder() %></span>
<oneit:ormInput obj="<%= workflow %>" type="text" attributeName="Name" cssClass="form-control" />
<%
if(workflow.getApplicationStatus() != ApplicationStatus.SUBMITTED && workflow.getApplicationStatus() != ApplicationStatus.SHORTLISTED)
{
String deleteVarKey = FormTag.getVariableKey (request);
FormTag.setVariable (request, deleteVarKey, "objToDelete", workflow);
FormTag.setVariable (request, deleteVarKey, "jqToDelete", "#" + workflow.getID());
%>
<div class="remove-icon" onclick="return deleteWorkflow (<%= deleteVarKey %>)">_</div>
<%
}
%>
</div>
</div>
</div>
<%
}
%>
</div>
<div>
<%
WorkFlow lastWorkflow = template.getWorkFlowBySortOrder(9);
%>
<div class="form-group row">
<div class="col-md-12">
<div class="seperator-dots"><span class="dot"></span><span class="dot"></span><span class="dot"></span></div>
<div class="workflow-row">
<span><%= lastWorkflow.getSortOrder() %></span>
<oneit:ormInput obj="<%= lastWorkflow %>" type="text" attributeName="Name" cssClass="form-control last-workflow" />
</div>
</div>
</div>
</div>
</div>
<div class="form-group row" style="text-align: center;" >
<a href="#" class="add-more-btn review-edit-btn" onclick="<%="addWorkflow(); return false;"%>" tabindex="32">Add Workflow Step</a>
</div>
</div>
</div>
</div>
</div>
<div class="occupation_content" id="occupation_content" style="display: none;">
<div class="occupation_content_row">
<div id="scrollme" class="main-list-div occupation_content_column">
<ul class="level0">
<%
Occupation[] firstLevelOccupations = Occupation.SearchByAll()
.andLevel(new EqualsFilter<>(OccupationLevel.LEVEL_1))
.search(transaction);
for (Occupation firstLevel : firstLevelOccupations)
{
%>
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>">
<span> <%= firstLevel%> </span>
<ul class="level1">
<%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>">
<span> <%= secondLevel%></span>
<ul class="level2">
<%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>">
<span> <%= thirdLevel%></span>
<ul class="level3">
<%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>">
<span> <%= fourthLevel%></span>
</li>
<%
}
%>
</ul>
</li>
<%
}
%>
</ul>
</li>
<%
}
%>
</ul>
</li>
<%
}
%>
</ul>
</div>
<div class="level1-div occupation_content_column dyn-div"></div>
<div class="level2-div occupation_content_column dyn-div"></div>
<div class="level3-div occupation_content_column dyn-div"></div>
</div>
<div class="occupation_select_info">
Select the most appropriate Category to help narrow down your Occupation
</div>
<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>
</div>
</div>
<div class="container-fluid">
<div class="main-tab-template">
<span class="tab-number">2</span>
<span class="job-details">Requirements</span>
</div>
<div class="form-page-area nopadding">
<div class="create-job">
<div class="form-page-section">
<div class="form-group">
<label>Include Requirements for this Job?</label>
<span class="pull-right">
<label class="switch">
<oneit:recalcClass htmlTag="span" classScript="template.showAssessmentCriteriaSection() ? 'checkbox checked': 'checkbox unchecked'" template="<%= template %>">
<oneit:ormInput obj="<%= template %>" attributeName="IncludeAssessmentCriteria" type="checkbox"/>
</oneit:recalcClass>
<div class="slider round"></div>
</label>
<oneit:button value=" " name="changeAssessmentCriteria" cssClass="hide"
requestAttribs="<%= CollectionUtils.mapEntry ("AssessmentCriteriaTemplate", template)
.mapEntry (UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>" />
</span>
</div>
<oneit:recalcClass htmlTag="div" classScript="template.showAssessmentCriteriaSection() ? 'show': 'hide'" template="<%= template %>">
<div class="warning-box">
Requirements marked as Essential will be mandatory for any applicant applying for this job
</div>
<div class="form-brack-line-sub"></div>
<%
int criteriaCount = 0;
for(CriteriaType criteria : CriteriaType.getCriteriaTypeArray())
{
String name = criteria.getName();
criteriaCount++;
%>
<div class="form-group">
<div class="form-group" id="<%= name%>">
<div class="form-medium-title qualification-title">
<oneit:toString value="<%= criteria %>" mode="EscapeHTML"/>
<span class="skill-label">
<oneit:recalcClass htmlTag="span" class="skill-label" classScript="template.getAssessmentCriteraCountByType(criteria) > 0 ? 'show': 'hide'" template="<%= template %>" criteria="<%= criteria %>">
<oneit:recalc script="template.getAssessmentCriteraCountByType(criteria)" mode="EscapeHTML" template="<%= template %>" criteria="<%= criteria %>" />
<oneit:toString value="<%= criteria %>" mode="EscapeHTML"/> added
</oneit:recalcClass>
<oneit:recalcClass htmlTag="span" class="skill-label" classScript="template.getAssessmentCriteraCountByType(criteria) > 0 ? 'hide': 'show'" template="<%= template %>" criteria="<%= criteria %>">
<span class="skill-label">No required <oneit:toString value="<%= criteria %>" mode="EscapeHTML"/><%= criteria.getIsSingular() ? " has" : " have"%> been added.</span>
</oneit:recalcClass>
</span>
</div>
<div id="assessmentCriteriaSection">
<%
for (AssessmentCriteria assessmentCriteria : template.getAssessmentCriteraByType(criteria))
{
%>
<oneit:dynInclude page="/extensions/adminportal/inc/job_assessment_criteria_add.jsp" AssessmentCriteria="<%= assessmentCriteria %>"
data="<%= CollectionUtils.EMPTY_MAP%>"/>
<%
}
%>
</div>
</div>
<div class="main-add-more">
<oneit:button value="<%= "Add " + name%>" name="newAssessmentCriteria" cssClass="add-more-btn" skin="link"
onClick="<%="addCriteria('" + name + "'); return false;"%>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", samePage).toMap() %>"/>
</div>
</div>
<%
if(criteriaCount < 4)
{
%>
<div class="form-brack-line-sub"></div>
<%
}
}
%>
</oneit:recalcClass>
</div>
</div>
</div>
</div>
<div class="text-center save-template">
<oneit:button value="Save Template" name="save" cssClass="btn btn-primary top-margin-25 largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.toMap() %>" />
<div class="save-template-text">Saving this template will not affect any previously created or filled jobs</div>
</div>
<script>
addGoogleAddressListener('#<%= "gAddress_"+ template.getObjectID() %>');
</script>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<div class="form-page-section">
<script type="text/javascript">
function moveImportanceSection(elementRating){
var importanceDiv = $(elementRating).closest('.criteria_section').find('.work-rating');
var radioGroup = $("[name='" + $(elementRating).attr('name') +"']");
if(radioGroup.is(':checked')){
importanceDiv.insertAfter($("[name='" + $(elementRating).attr('name') +"']:checked").parent());
importanceDiv.show();
}
else{
importanceDiv.hide();
}
}
$(document).ready(function(){
$(".element_rating_radio").each(function (){
moveImportanceSection(this);
});
$(".element_rating_radio").change(function(){
moveImportanceSection(this);
});
$(".importance_radio").change(function(){
var importanceGroup = $(this).closest('.rate-toggle');
importanceGroup.find('li.active').removeClass("active" );
importanceGroup.find("input[type='radio']:checked").closest('li').addClass("active" );
});
$("select[name$='CultureTemplate']").change(function(){
$("button[name$='loadCultureFromTemplate']").click();
});
var showError = true;
addPostRecalcHandler (function ($fieldThatChanged) {
if(showError) {
showError = false;
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
}
recalcFunction();
});
});
</script>
<%
Job job = (Job) getData(request, "Job");
CultureCriteriaTemplate template = (CultureCriteriaTemplate) getData(request, "CultureCriteriaTemplate");
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
Debug.assertion(job != null || template != null , "Job or Template is null");
for(CultureClass cultureClass : CultureClass.getCultureClassArray())
{
%>
<div class="form-group">
<div class="work-belonging">
<oneit:toString value="<%= cultureClass %>" mode="EscapeHTML"/>
</div>
<div class="critarea-desc"><%= cultureClass.getClassDescription() %></div>
<%
for(CultureCriteria criteria : (job != null ? job.getCultureCriteriasForClass(cultureClass) : template.getCultureCriteriasForClass(cultureClass)))
{
String optionKey = WebUtils.getRadioSingleAssocKey(request, criteria, CultureCriteria.SINGLEREFERENCE_CultureElementRating);
String formValue = formBuilder.fieldValue (optionKey, criteria.getCultureElementRating() == null ? "" : String.valueOf(criteria.getCultureElementRatingID()));
CultureElement element = criteria.getCultureElement();
%>
<div class="criteria_section culture-margin-bottom">
<fieldset >
<legend>
<oneit:toString value="<%= element %>" mode="EscapeHTML"/>
<a href="#" title='<%= element.getDetailedDescription() %>' class="info-icon-left"><img src="images/info-icon.png" /></a>
</legend>
<label class="switch">
<oneit:recalcClass htmlTag="span" classScript="criteria.getIsApplicable() ? 'checkbox checked': 'checkbox unchecked'" criteria="<%= criteria %>">
<oneit:ormInput obj="<%= criteria %>" attributeName="IsApplicable" type="checkbox"/>
</oneit:recalcClass>
<div class="slider round"></div>
</label>
<oneit:recalcClass htmlTag="div" classScript="criteria.getIsApplicable() ? 'show': 'hide'" criteria="<%= criteria %>">
<%
for (CultureElementRating rating : element.getRatingsSet())
{
String ratingId = String.valueOf(rating.getID().longID());
String selectedStr = (CollectionUtils.equals(ratingId, formValue) ? "checked" : "");
%>
<div class="<%= "radio radio-primary workplace-radio " %>">
<input type="radio" name="<%= optionKey %>" id="<%= ratingId %>" class="element_rating_radio" value="<%= ratingId %>" <%= selectedStr %> >
<label for="<%= ratingId %>">
<oneit:toString value="<%= rating %>" mode="EscapeHTML"/>
</label>
</div>
<%
}
%>
</oneit:recalcClass>
<div class="work-rating">
<div class="rate-background">
<span class="arrow-up-gray"></span>
<span class="rate-label">
<oneit:label GUIName="Rate Importance" />
</span>
<span class="rate-toggle">
<ul class="nav nav-pills nav-justified">
<%
String importanceKey = WebUtils.getInputKey(request, criteria, CultureCriteria.FIELD_Importance);
String importanceValue = formBuilder.fieldValue (importanceKey, criteria.getImportance() == null ? "" : criteria.getImportance().getName());
for(Importance importance : Utils.getImportancesForCulture())
{
boolean isSelected = CollectionUtils.equals(importanceValue, importance.getName());
String importanceId = String.valueOf(criteria.getID().longID()) + "_importance_" + importance.getName();
String selected = isSelected ? "checked" : "";
String activeClass = isSelected ? "active" : "";
%>
<li class="<%= activeClass%>">
<a href="javascript:void(0)" class="importance">
<input type="radio" name="<%= importanceKey %>" id="<%= importanceId %>" class="importance_radio" value="<%= importance.getName() %>" <%= selected %>/>
<label for="<%= importanceId %>"><oneit:toString value="<%= importance.getDescription() %>" mode="EscapeHTML" /></label>
</a>
</li>
<%
}
%>
</ul>
</span>
</div>
</div>
</fieldset>
</div>
<!--<div class="form-brack-line-sub"></div>-->
<%
}
%>
</div>
<%
}
%>
</div>
</oneit:dynIncluded>
\ No newline at end of file
......@@ -42,7 +42,7 @@
<!-- Google Tag Manager -->
<script>
dataLayer = [{
'username': '<%= clientUser != null ? clientUser.getUserName() : "" %>',
'userId': '<%= clientUser != null ? clientUser.getUserName() : "" %>',
}];
</script>
<script>
......@@ -197,6 +197,14 @@
%>
<li><a href="<%= myDetailsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap())%>">My Details</a></li>
<li><a href="<%= signoutUrl %>">Sign Out</a></li>
<%
if (request.getSession ().getAttribute (oneit.security.jsp.AssumeUserFP.UNASSUME_SEC_USER_ID) != null)
{
%>
<li><a href="<%= request.getContextPath () %>/editor/index_unassume.jsp">Unassume</a></li>
<%
}
%>
</ul>
</div>
<div class="create-job-btn">
......@@ -207,7 +215,7 @@
boolean onJob = WebUtils.onJobPages(renderMode);
boolean canCreateJob = Utils.allowJobCreation(selectedTeam);
%>
<a href="<%= onJob || !canCreateJob ? "#" : jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.CREATE_JOB).toMap()) %>" class="<%= onJob || !canCreateJob ? "disabled" : ""%>" >Create Job</a>
<a href="<%= onJob || !canCreateJob ? "#" : jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>" class="<%= onJob || !canCreateJob ? "disabled" : ""%>" >Create Job</a>
<%
}
%>
......
......@@ -6,17 +6,26 @@
<%! protected String getName (ServletConfig config) { return "job_assessment_criteria_add_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState)ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
Job job = (Job) process.getAttribute("Job");
AssessmentCriteria criteria = (AssessmentCriteria) getData(request, "AssessmentCriteria");
ORMProcessState process = (ORMProcessState)ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
Job job = (Job) process.getAttribute("Job");
AssessmentCriteriaTemplate template = (AssessmentCriteriaTemplate) process.getAttribute("AssessmentCriteriaTemplate");
AssessmentCriteria criteria = (AssessmentCriteria) getData(request, "AssessmentCriteria");
if(criteria == null)
{
criteria = AssessmentCriteria.createAssessmentCriteria(objTran);
criteria.setCriteriaType(CriteriaType.forName((String) request.getParameter("CriteriaName")));
job.addToAssessmentCriterias(criteria);
if(job != null )
{
job.addToAssessmentCriterias(criteria);
}
else
{
template.addToAssessmentCriterias(criteria);
}
}
%>
......
......@@ -6,20 +6,29 @@
<%! protected String getName (ServletConfig config) { return "workflow_add_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState)ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
Job job = (Job) process.getAttribute("Job");
int sortOrder = job.getWorkFlowsCount();
ApplicationStatus status = Utils.getApplicationStatus(sortOrder);
WorkFlow workflow = null;
if(job.getWorkFlowsCount() < 9 && status != null)
ORMProcessState process = (ORMProcessState)ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
Job job = (Job) process.getAttribute("Job");
AssessmentCriteriaTemplate template = (AssessmentCriteriaTemplate) process.getAttribute("AssessmentCriteriaTemplate");
int sortOrder = job != null ? job.getWorkFlowsCount() : template.getWorkFlowsCount();
ApplicationStatus status = Utils.getApplicationStatus(sortOrder);
WorkFlow workflow = null;
if(sortOrder < 9 && status != null)
{
workflow = WorkFlow.createWorkFlow(objTran);
workflow.setApplicationStatus(status);
workflow.setSortOrder(sortOrder);
job.addToWorkFlows(workflow);
if(job != null)
{
job.addToWorkFlows(workflow);
}
else
{
template.addToWorkFlows(workflow);
}
%>
<oneit:form method="POST">
......
......@@ -6,39 +6,15 @@
<oneit:dynIncluded>
<%
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job);
Job job = (Job) process.getAttribute("Job");
String jobPage = WebUtils.getSamePageInRenderMode(request, "Page");
Debug.assertion(job != null, "Job is null in admin portal create job");
if(toRedirect)
{
%><%@include file="/saferedirect.jsp" %><%
}
SecUser txUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = txUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
Job[] jobs = Job.SearchByAll()
.andHiringTeam(new EqualsFilter<>(hiringTeam))
.search(transaction);
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
job.setHiringTeam(hiringTeam);
job.setJobOwner(companyUser);
job.setIndustry(hiringTeam.getIndustry());
job.setGoogleAddressText(hiringTeam.getGoogleAddressText());
// Job job = (Job) process.getAttribute("Job");
// String jobPage = WebUtils.getSamePageInRenderMode(request, "Page");
//
// Debug.assertion(job != null, "Job is null in admin portal create job");
//
// SecUser txUser = SecUser.getTXUser(process.getTransaction());
// CompanyUser companyUser = txUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
// Job[] jobs = Job.SearchByCompany().byCompany(companyUser.getCompany()).search(transaction);
// String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
SecUser txUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = txUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
AssessmentCriteriaTemplate[] templates = job.getAssessmentTemplates();
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
%>
<script type="text/javascript">
......@@ -50,7 +26,7 @@
{
setupRecalc ($("form#editJob"), {'recalcOnError':true});
$("select[name$='JobTemplate']").change(function()
$("select[name$='AssessmentTemplate']").change(function()
{
$("button[name$='loadJobFromTemplate']").click();
});
......@@ -266,7 +242,7 @@
<div class="create-job">
<div class="form-page-section">
<%
if(false)
if(templates.length > 0)
{
%>
<oneit:button value=" " name="loadJobFromTemplate" cssClass="hide"
......@@ -275,7 +251,7 @@
.toMap() %>" />
<div class="form-group wider-select">
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="JobTemplate" options="<%= jobs %>"
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AssessmentTemplate" options="<%= templates %>"
blankValue="Optional: Use another Job as a starting point"/>
</div>
<%
......@@ -504,16 +480,20 @@
index++;
%>
<div class="form-group row">
<div class="form-group row" id="<%= workflow.getID() %>">
<div class="col-md-12">
<div class="workflow-row">
<span><%= workflow.getSortOrder() %></span>
<oneit:ormInput obj="<%= workflow %>" type="text" attributeName="Name" cssClass="form-control" />
<%
if(workflow.getApplicationStatus() != ApplicationStatus.SUBMITTED && workflow.getApplicationStatus() != ApplicationStatus.SHORTLISTED)
{
{
String deleteVarKey = FormTag.getVariableKey (request);
FormTag.setVariable (request, deleteVarKey, "objToDelete", workflow);
FormTag.setVariable (request, deleteVarKey, "jqToDelete", "#" + workflow.getID());
%>
<div class="remove-icon">_</div>
<div class="remove-icon" onclick="return deleteWorkflow (<%= deleteVarKey %>)">_</div>
<%
}
%>
......
......@@ -85,11 +85,11 @@
<span class="create-job-icon from-template"></span>
<!--<img src="images/create_from_template.png">-->
<h3>Create from template</h3>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true" disabled='true'/>
<div>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="JobTemplate" options="<%= jobs %>"
blankValue="Select your template" disabled='true'/>
</div>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/>
<div>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="AssessmentTemplate" options="<%= job.getAssessmentTemplates() %>"
blankValue="Select your template" disabled='true'/>
</div>
</label>
</div>
</div>
......
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.EDIT_JOB_TEMP);
SecUser secUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
HiringTeam hiringTeam = companyUser.getSelectedTeam();
Map<String, String[]> parameterMap = request.getParameterMap();
Client selectedClient = null;
String clientPage = WebUtils.getSamePageInRenderMode(request, "Page");
ClientSortOption clientSortOpt = (ClientSortOption) process.getAttribute("ClientSortOption");
Client[] clients = (Client[]) process.getAttribute("Clients");
AssessmentCriteriaTemplate[] templates = (AssessmentCriteriaTemplate[]) process.getAttribute("AssessmentCriteriaTemplates");
if( request.getParameter("ClientSortOption") != null)
{
clientSortOpt = ClientSortOption.forName((String) request.getParameter("ClientSortOption"));
}
if(clientSortOpt == null)
{
clientSortOpt = ClientSortOption.ALPHA_A_Z;
}
if(templates == null)
{
templates = AssessmentCriteriaTemplate.SearchByAll()
.andHiringTeam(new EqualsFilter<>(hiringTeam))
.andCompanyUser(new EqualsFilter<>(companyUser))
.search(transaction);
process.setAttribute("AssessmentCriteriaTemplates", templates);
}
// handle client
if( parameterMap.containsKey("Client"))
{
if(!request.getParameter("Client").isEmpty())
{
selectedClient = Client.getClientByID(transaction, Long.valueOf(request.getParameter("Client")));
}
}
else
{
selectedClient = (Client) session.getAttribute("Client");
}
session.setAttribute("Client", selectedClient);
if(clients == null)
{
clients = Utils.getClientsByHiringTeam(transaction);
process.setAttribute("Clients", clients);
}
List<Client> sortedClients = Utils.getClientsSorted(clients, clientSortOpt);
process.setAttribute("ClientSortOption", clientSortOpt);
%>
<oneit:form name="jobTemplates" method="post" enctype="multipart/form-data">
<div class="dashboard-content-area second-part">
<div class="jobs-list-shorting">
<div class="d-job-title all-jobs-title">Manage Job Templates</div>
<%
if(false)
{
%>
<div class="shorting-dropdown">
<span class="order-label">Select Client</span>
<select class="form-control" onChange="location=this.value">
<%
for (ClientSortOption sortOption : ClientSortOption.getClientSortOptionArray())
{
String optionLink = clientPage + "&ClientSortOption=" + sortOption.getName() ;
%>
<option <%= (clientSortOpt != null && clientSortOpt == sortOption ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= sortOption.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div>
<%
}
%>
</div>
<div class="main-client-list">
<%
for(AssessmentCriteriaTemplate template : templates)
{
%>
<div class="template-list" id="<%= template.getID() %>">
<div class="template-row">
<div class="job-template-left job-template-cl1">
<div class="template-name heading">
<oneit:toString value="<%= template.getTemplateName() %>" mode="EscapeHTML" />
</div>
</div>
<div class="job-template-left job-template-cl2">
<span class="grey-span">JOB TITLE</span>
<div class="template-name">
<oneit:toString value="<%= template.getJobTitle() %>" mode="EscapeHTML" />
</div>
</div>
<div class="job-template-left job-template-cl3">
<span class="grey-span">CLIENT</span>
<div class="template-name">
<oneit:toString value="<%= template.getClient() %>" mode="EscapeHTML" />
</div>
</div>
<div class="job-template-left job-template-cl4">
<span class="grey-span">LAST UPDATED</span>
<div class="template-name">
<oneit:toString value="<%= template.getObjectLastModified() %>" mode="MidDate" />
</div>
<div class="m-user-right-padlock">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage + "&AssessmentCriteriaTemplateID=" + template.getObjectID())
.mapEntry("procParams", CollectionUtils.mapEntry("AssessmentCriteriaTemplate", template).toMap())
.toMap() %>">
<span class="m-user-right-padlockicon">
<span class="pencil"></span>
</span>
</oneit:button>
</div>
</div>
</div>
</div>
<%
}
%>
</div>
</div>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<OBJECTS xmlns:oneit="http://www.1iT.com.au" name="">
<NODE factory="Vector" name="Script">
<NODE class="oneit.appservices.upgrade.cms.CMSArticleUpdateOperation" factory="Participant" name="CultureTemplates">
<createSpecificIdentifier factory='String' value='YUTCMLJKKD3SMG6LHWDE784O6Z642M'/>
<articleIdentifiers factory="Array" class="java.lang.String">
<NODE factory="String" value="YUTCMLJKKD3SMG6LHWDE784O6Z642M"/>
</articleIdentifiers>
<createdLabel factory="String" value="YUTCMLJKKD3SMG6LHWDE784O6Z642M"/>
<newParentCategory factory="String" value="created:5L47UE8LMI51VOIOS8YTLLVQAT5NTW"/>
<articleAttributeChanges factory="Map">
<NODE name="Additional CSS Class" factory="String" value="second-menu"/>
<NODE name="Exclude From Sitemap" factory="Boolean" value="false"/>
<NODE name="Exclude from SEO Indexing" factory="Boolean" value="false"/>
<NODE name="Allow Disable" factory="Boolean" value="false"/>
<NODE name="Add Brackline Separator" factory="Boolean" value="false"/>
<NODE name="On Top Menu" factory="Boolean" value="false"/>
<NODE name="On Footer Left" factory="Boolean" value="false"/>
<NODE name="Menu Title" factory="String" value="Culture Templates"/>
<NODE name="On Footer Menu" factory="Boolean" value="false"/>
<NODE name="Exclude From Search" factory="Boolean" value="false"/>
<NODE name="Menu Icon CSS" factory="String" value="template-icon"/>
<NODE name="On Left Menu" factory="Boolean" value="true"/>
<NODE name="Shortcuts" factory="String" value="CultureTemplates"/>
<NODE name="Exclude From Navigation" factory="Boolean" value="false"/>
<NODE name="On Footer Right" factory="Boolean" value="false"/>
</articleAttributeChanges>
<ormAttributeChanges factory="Map">
<NODE name="PublishDate" factory="Date" value="2017-07-04 00:00:00"/>
<NODE name="WithdrawDate" factory="Date" value="2067-07-04 10:00:00"/>
<NODE name="Title" factory="String" value="CultureTemplates"/>
<NODE name="ShortTitle" factory="String" value="Clients"/>
<NODE name="SortOrder" factory="Integer" value="37957080"/>
<NODE name="Type" factory="Enumerated" class="oneit.business.content.ArticleType" value="ARTICLE"/>
<NODE name="Template" factory="Enumerated" class="oneit.business.content.ArticleTemplate" value="CULTURE_TEMPLATES"/>
</ormAttributeChanges>
<content factory="Map">
<NODE name="Body" factory="Map">
<NODE name="Content" factory="String"><![CDATA[
<p></p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
<NODE name="Synopsis" factory="Map">
<NODE name="Content" factory="String"><![CDATA[
<p></p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
</content>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<OBJECTS xmlns:oneit="http://www.1iT.com.au" name="">
<NODE factory="Vector" name="Script">
<NODE class="oneit.appservices.upgrade.cms.CMSArticleUpdateOperation" factory="Participant" name="JobTemplates">
<createSpecificIdentifier factory='String' value='RHOF6HGKG4WNKHWJI8MNL8392TZY03'/>
<articleIdentifiers factory="Array" class="java.lang.String">
<NODE factory="String" value="RHOF6HGKG4WNKHWJI8MNL8392TZY03"/>
</articleIdentifiers>
<createdLabel factory="String" value="RHOF6HGKG4WNKHWJI8MNL8392TZY03"/>
<newParentCategory factory="String" value="created:5L47UE8LMI51VOIOS8YTLLVQAT5NTW"/>
<articleAttributeChanges factory="Map">
<NODE name="Additional CSS Class" factory="String" value="second-menu"/>
<NODE name="Exclude From Sitemap" factory="Boolean" value="false"/>
<NODE name="Exclude from SEO Indexing" factory="Boolean" value="false"/>
<NODE name="Allow Disable" factory="Boolean" value="false"/>
<NODE name="Add Brackline Separator" factory="Boolean" value="false"/>
<NODE name="On Top Menu" factory="Boolean" value="false"/>
<NODE name="On Footer Left" factory="Boolean" value="false"/>
<NODE name="Menu Title" factory="String" value="Job Templates"/>
<NODE name="On Footer Menu" factory="Boolean" value="false"/>
<NODE name="Exclude From Search" factory="Boolean" value="false"/>
<NODE name="Menu Icon CSS" factory="String" value="template-icon"/>
<NODE name="On Left Menu" factory="Boolean" value="true"/>
<NODE name="Shortcuts" factory="String" value="JobTemplates"/>
<NODE name="Exclude From Navigation" factory="Boolean" value="false"/>
<NODE name="On Footer Right" factory="Boolean" value="false"/>
</articleAttributeChanges>
<ormAttributeChanges factory="Map">
<NODE name="PublishDate" factory="Date" value="2017-07-04 00:00:00"/>
<NODE name="WithdrawDate" factory="Date" value="2067-07-04 10:00:00"/>
<NODE name="Title" factory="String" value="JobTemplates"/>
<NODE name="ShortTitle" factory="String" value="Clients"/>
<NODE name="SortOrder" factory="Integer" value="37957079"/>
<NODE name="Type" factory="Enumerated" class="oneit.business.content.ArticleType" value="ARTICLE"/>
<NODE name="Template" factory="Enumerated" class="oneit.business.content.ArticleTemplate" value="JOB_TEMPLATES"/>
</ormAttributeChanges>
<content factory="Map">
<NODE name="Body" factory="Map">
<NODE name="Content" factory="String"><![CDATA[
<p></p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
<NODE name="Synopsis" factory="Map">
<NODE name="Content" factory="String"><![CDATA[
<p></p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
</content>
</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_culture_template</tableName>
<column name="client_id" type="Long" length="11" nullable="true"/>
<column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_culture_template" indexName="idx_tl_culture_template_TemplateID" isUnique="true">
<column name="template_name"/>
<column name="hiring_team_id"/>
<column name="company_user_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_assessment_template</tableName>
<column name="job_title" type="String" nullable="true" length="30"/>
<column name="job_description" type="CLOB" nullable="true"/>
<column name="ref_number" type="String" nullable="true" length="10"/>
<column name="google_address_text" type="String" nullable="true" length="300"/>
<column name="location_radius" type="String" nullable="true" length="200"/>
<column name="remote" type="Boolean" nullable="true"/>
<column name="job_type" type="String" nullable="true" length="200"/>
<column name="industry" type="String" nullable="true" length="200"/>
<column name="require_cv" type="Boolean" nullable="true"/>
<column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="include_assessment_criteria" type="Boolean" nullable="true"/>
<column name="level_id" type="Long" length="11" nullable="true"/>
<column name="occupation_id" type="Long" length="11" nullable="true"/>
<column name="job_owner_id" type="Long" length="11" nullable="true"/>
<column name="job_id" type="Long" length="11" nullable="true"/>
<column name="client_id" type="Long" length="11" nullable="true"/>
<column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_assessment_template" indexName="idx_tl_assessment_template_TemplateID" isUnique="true">
<column name="template_name"/>
<column name="hiring_team_id"/>
<column name="company_user_id"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
ALTER TABLE tl_culture_template ALTER COLUMN user_id DROP NOT NULL;
ALTER TABLE tl_assessment_template ALTER COLUMN user_id DROP NOT NULL;
ALTER TABLE tl_work_flow ALTER COLUMN job_id DROP NOT NULL;
<?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_culture_template</tableName>
<column name="culture_statement" type="String" nullable="true" length="2000"/>
</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_work_flow</tableName>
<column name="template_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_job</tableName>
<column name="template_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
......@@ -12,55 +12,14 @@
Debug.assertion(job != null, "Job is null in admin portal create job");
CultureCriteriaTemplate[] templates = job.getCultureTemplates();
job.pipelineJob().toCultureCriterias().toCultureElement().toRatings().uniqueVals(); //preloading data
%>
<script type="text/javascript">
function moveImportanceSection(elementRating){
var importanceDiv = $(elementRating).closest('.criteria_section').find('.work-rating');
var radioGroup = $("[name='" + $(elementRating).attr('name') +"']");
if(radioGroup.is(':checked')){
importanceDiv.insertAfter($("[name='" + $(elementRating).attr('name') +"']:checked").parent());
importanceDiv.show();
}
else{
importanceDiv.hide();
}
}
$(document).ready(function(){
recalcFunction = setupRecalc ($("form#editJob"), {'recalcOnError':true});
$(".element_rating_radio").each(function (){
moveImportanceSection(this);
});
$(".element_rating_radio").change(function(){
moveImportanceSection(this);
});
$(".importance_radio").change(function(){
var importanceGroup = $(this).closest('.rate-toggle');
importanceGroup.find('li.active').removeClass("active" );
importanceGroup.find("input[type='radio']:checked").closest('li').addClass("active" );
});
$("select[name$='CultureTemplate']").change(function(){
$("button[name$='loadCultureFromTemplate']").click();
});
var showError = true;
addPostRecalcHandler (function ($fieldThatChanged) {
if(showError) {
showError = false;
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
}
recalcFunction();
});
});
</script>
......@@ -86,8 +45,7 @@
<div class="form-page-area nopadding">
<div class="create-job">
<%
// if(templates.length > 0)
if(false)
if(templates.length > 0)
{
%>
<div class="form-page-section" style="padding-bottom: 0px">
......@@ -102,162 +60,58 @@
</div>
</div>
</div>
<%
}
%>
<div class="form-page-section darkbg">
<div class="form-group">
<label><oneit:label GUIName="Organisation Culture Statement" /> <a href="#" title="Note description gose here." class="info-icon"><img src="images/info-icon.png" /></a></label>
<oneit:ormtextarea obj="<%= job %>" attributeName="CultureStatement" cssClass="form-control textarea-box"/>
</div>
<%
}
%>
<div class="form-page-section darkbg">
<div class="form-group">
<label><oneit:label GUIName="Organisation Culture Statement" /> <a href="#" title="Note description gose here." class="info-icon"><img src="images/info-icon.png" /></a></label>
<oneit:ormtextarea obj="<%= job %>" attributeName="CultureStatement" cssClass="form-control textarea-box"/>
</div>
<div class="form-page-section">
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
job.pipelineJob().toCultureCriterias().toCultureElement().toRatings().uniqueVals(); //preloading data
for(CultureClass cultureClass : CultureClass.getCultureClassArray())
{
%>
<div class="form-group">
<div class="work-belonging">
<oneit:toString value="<%= cultureClass %>" mode="EscapeHTML"/>
</div>
<div class="critarea-desc"><%= cultureClass.getClassDescription()%></div>
<%
for(CultureCriteria criteria : job.getCultureCriteriasForClass(cultureClass))
{
String optionKey = WebUtils.getRadioSingleAssocKey(request, criteria, CultureCriteria.SINGLEREFERENCE_CultureElementRating);
String formValue = formBuilder.fieldValue (optionKey, criteria.getCultureElementRating() == null ? "" : String.valueOf(criteria.getCultureElementRatingID()));
CultureElement element = criteria.getCultureElement();
%>
<div class="criteria_section culture-margin-bottom">
<fieldset >
<legend>
<oneit:toString value="<%= element %>" mode="EscapeHTML"/>
<a href="#" title='<%= element.getDetailedDescription() %>' class="info-icon-left"><img src="images/info-icon.png" /></a>
</legend>
<label class="switch">
<oneit:recalcClass htmlTag="span" classScript="criteria.getIsApplicable() ? 'checkbox checked': 'checkbox unchecked'" criteria="<%= criteria %>">
<oneit:ormInput obj="<%= criteria %>" attributeName="IsApplicable" type="checkbox"/>
</oneit:recalcClass>
<div class="slider round"></div>
</label>
<oneit:recalcClass htmlTag="div" classScript="criteria.getIsApplicable() ? 'show': 'hide'" criteria="<%= criteria %>">
<%
for (CultureElementRating rating : element.getRatingsSet())
{
String ratingId = String.valueOf(rating.getID().longID());
String selectedStr = (CollectionUtils.equals(ratingId, formValue) ? "checked" : "");
%>
<div class="<%= "radio radio-primary workplace-radio " %>">
<input type="radio" name="<%= optionKey %>" id="<%= ratingId %>" class="element_rating_radio" value="<%= ratingId %>" <%= selectedStr %> >
<label for="<%= ratingId %>">
<oneit:toString value="<%= rating %>" mode="EscapeHTML"/>
</label>
</div>
<%
}
%>
</oneit:recalcClass>
<div class="work-rating">
<div class="rate-background">
<span class="arrow-up-gray"></span>
<span class="rate-label">
<oneit:label GUIName="Rate Importance" />
</span>
<span class="rate-toggle">
<ul class="nav nav-pills nav-justified">
<%
String importanceKey = WebUtils.getInputKey(request, criteria, CultureCriteria.FIELD_Importance);
String importanceValue = formBuilder.fieldValue (importanceKey, criteria.getImportance() == null ? "" : criteria.getImportance().getName());
for(Importance importance : Utils.getImportancesForCulture())
{
boolean isSelected = CollectionUtils.equals(importanceValue, importance.getName());
String importanceId = String.valueOf(criteria.getID().longID()) + "_importance_" + importance.getName();
String selected = isSelected ? "checked" : "";
String activeClass = isSelected ? "active" : "";
%>
<li class="<%= activeClass%>">
<a href="javascript:void(0)" class="importance">
<input type="radio" name="<%= importanceKey %>" id="<%= importanceId %>" class="importance_radio" value="<%= importance.getName() %>" <%= selected %>/>
<label for="<%= importanceId %>"><oneit:toString value="<%= importance.getDescription() %>" mode="EscapeHTML" /></label>
</a>
</li>
<%
}
%>
</ul>
</span>
</div>
</div>
</fieldset>
</div>
<!--<div class="form-brack-line-sub"></div>-->
<%
}
%>
</div>
<%
}
%>
</div>
<div class="form-page-section">
<%
if(false)
{
%>
<div class="form-group">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= job %>" id="save-assess-check" attributeName="SaveCultureTemplate" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="job.showSaveCultureTemplate() ? 'checked': 'unchecked'" job="<%= job %>">
<label for="save-assess-check">
<oneit:ormlabel obj="<%= job %>" field="SaveCultureTemplate" />
</label>
</oneit:recalcClass>
</div>
</div>
<oneit:dynInclude page="/extensions/adminportal/inc/culture_details.jsp" Job="<%= job %>" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="form-page-section">
<div class="form-group">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= job %>" id="save-assess-check" attributeName="SaveCultureTemplate" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="job.showSaveCultureTemplate() ? 'checked': 'unchecked'" job="<%= job %>">
<label for="save-assess-check">
<oneit:ormlabel obj="<%= job %>" field="SaveCultureTemplate" />
</label>
</oneit:recalcClass>
</div>
</div>
<oneit:recalcClass htmlTag="div" classScript="job.showSaveCultureTemplate() ? 'form-group template-save show': 'form-group template-save hide'" job="<%= job %>">
<div class="input-group input-group-lg">
<div class="icon-addon addon-lg">
<oneit:ormInput obj="<%= job %>" type="text" attributeName="CultureTemplateName" cssClass="form-control" />
</div>
<span class="input-group-btn">
<oneit:button value="SAVE" name="saveCultureTemplate" cssClass="btn btn-primary"
requestAttribs="<%= CollectionUtils.mapEntry("Job", job)
.mapEntry (UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>" />
</span>
</div>
<oneit:recalcClass htmlTag="div" classScript="job.showSaveCultureTemplate() ? 'form-group template-save show': 'form-group template-save hide'" job="<%= job %>">
<div class="input-group input-group-lg">
<div class="icon-addon addon-lg">
<oneit:ormInput obj="<%= job %>" type="text" attributeName="CultureTemplateName" cssClass="form-control" />
</div>
</oneit:recalcClass>
<%
}
%>
<div class="text-center">
<oneit:button value="Save as draft" name="saveJob" cssClass="btn btn-primary top-margin-25 largeBtn greyBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", jobPage)
.mapEntry("DraftLocation", DraftLocation.CULTURE)
.mapEntry(UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>"/>
<oneit:button value="Review Job Details" name="processCulture" cssClass="btn btn-primary top-margin-25 largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job", job)
.mapEntry("fromCulture", true)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.toMap() %>" />
<span class="input-group-btn">
<oneit:button value="SAVE" name="saveCultureTemplate" cssClass="btn btn-primary"
requestAttribs="<%= CollectionUtils.mapEntry("Job", job)
.mapEntry (UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>" />
</span>
</div>
</div>
</oneit:recalcClass>
<div class="text-center">
<oneit:button value="Save as draft" name="saveJob" cssClass="btn btn-primary top-margin-25 largeBtn greyBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", jobPage)
.mapEntry("DraftLocation", DraftLocation.CULTURE)
.mapEntry(UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>"/>
<oneit:button value="Review Job Details" name="processCulture" cssClass="btn btn-primary top-margin-25 largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job", job)
.mapEntry("fromCulture", true)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.toMap() %>" />
</div>
</div>
</div>
</div>
</div>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" 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>8A8DA27B-EA69-4B7E-9593-86C45C77A294</title>
<desc>Created with sketchtool.</desc>
<g id="2018---Create-Job" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="Create-a-job---step-2-J002" transform="translate(-573.000000, -328.000000)" stroke="#9B9B9B" stroke-width="1.5">
<g id="Content-Region" transform="translate(260.000000, 64.000000)">
<g id="Content" transform="translate(185.000000, 191.000000)">
<g id="Form" transform="translate(109.000000, 60.000000)">
<g id="Template" transform="translate(1.000000, 2.000000)">
<g id="icon-reuse-sml" transform="translate(19.000000, 12.000000)">
<polyline id="Shape" points="11.3684211 14.3289474 8.40789474 14.3289474 8.40789474 17.2894737"></polyline>
<path d="M17.4213158,14.9076316 C16.7765888,16.7917652 14.9465335,18.007774 12.9597657,17.872178 C10.9729979,17.736582 9.32512688,16.2832064 8.94236842,14.3289474" id="Shape"></path>
<polyline id="Shape" points="14.9210526 11.9605263 17.8815789 11.9605263 17.8815789 9"></polyline>
<path d="M8.86815789,11.3818421 C9.51288486,9.49770846 11.3429402,8.2816997 13.329708,8.41729567 C15.3164757,8.55289165 16.9643468,10.0062673 17.3471053,11.9605263" id="Shape"></path>
<path d="M5.44736842,15.5131579 L1.30263158,15.5131579 C0.648610165,15.5131579 0.118421053,14.9829688 0.118421053,14.3289474 L0.118421053,1.30263158 C0.118421053,0.648610165 0.648610165,0.118421053 1.30263158,0.118421053 L9.69394737,0.118421053 C10.0079137,0.118697451 10.30892,0.243643441 10.5307895,0.465789474 L12.7981579,2.73236842 C13.0202078,2.95456064 13.1448792,3.25587339 13.1447368,3.57 L13.1447368,5.44736842" id="Shape"></path>
</g>
</g>
</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