Commit ed0b93ec by Harsh Shah

Finish Hotfix-20190522

parents a323c912 46adf943
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<column name="object_created_date" type="Date" nullable="false" length="22"/> <column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="client_name" type="String" nullable="false" length="30"/> <column name="client_name" type="String" nullable="false" length="30"/>
<column name="client_logo" type="BLOB" nullable="true"/> <column name="client_logo" type="BLOB" nullable="true"/>
<column name="use_client_details" type="Boolean" nullable="true"/>
<column name="email" type="String" nullable="true" length="100"/> <column name="email" type="String" nullable="true" length="100"/>
<column name="contact_name" type="String" nullable="true" length="100"/> <column name="contact_name" type="String" nullable="true" length="100"/>
<column name="contact_surname" type="String" nullable="true" length="100"/> <column name="contact_surname" type="String" nullable="true" length="100"/>
......
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
<column name="name" type="String" nullable="false" length="250"/> <column name="name" type="String" nullable="false" length="250"/>
<column name="level" type="String" nullable="false" length="200"/> <column name="level" type="String" nullable="false" length="200"/>
<column name="assessment_type" type="String" nullable="true" length="200"/> <column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="parttime_assessment_type" type="String" nullable="true" length="200"/>
<column name="assessment_level_id" type="Long" length="11" nullable="true"/> <column name="assessment_level_id" type="Long" length="11" nullable="true"/>
<column name="express_assessment_level_id" type="Long" length="11" nullable="true"/>
<column name="parent_occupation_id" type="Long" length="11" nullable="true"/> <column name="parent_occupation_id" type="Long" length="11" nullable="true"/>
</NODE> </NODE>
......
...@@ -10,6 +10,7 @@ CREATE TABLE tl_client ( ...@@ -10,6 +10,7 @@ CREATE TABLE tl_client (
, ,
client_name varchar(30) NOT NULL, client_name varchar(30) NOT NULL,
client_logo image NULL, client_logo image NULL,
use_client_details char(1) NULL,
email varchar(100) NULL, email varchar(100) NULL,
contact_name varchar(100) NULL, contact_name varchar(100) NULL,
contact_surname varchar(100) NULL, contact_surname varchar(100) NULL,
......
...@@ -12,7 +12,9 @@ CREATE TABLE tl_occupation ( ...@@ -12,7 +12,9 @@ CREATE TABLE tl_occupation (
name varchar(250) NOT NULL, name varchar(250) NOT NULL,
level varchar(200) NOT NULL, level varchar(200) NOT NULL,
assessment_type varchar(200) NULL, assessment_type varchar(200) NULL,
parttime_assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL, assessment_level_id numeric(12) NULL,
express_assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL parent_occupation_id numeric(12) NULL
); );
......
...@@ -11,6 +11,7 @@ CREATE TABLE tl_client ( ...@@ -11,6 +11,7 @@ CREATE TABLE tl_client (
, ,
client_name varchar2(30) NOT NULL, client_name varchar2(30) NOT NULL,
client_logo blob NULL, client_logo blob NULL,
use_client_details char(1) NULL,
email varchar2(100) NULL, email varchar2(100) NULL,
contact_name varchar2(100) NULL, contact_name varchar2(100) NULL,
contact_surname varchar2(100) NULL, contact_surname varchar2(100) NULL,
......
...@@ -13,7 +13,9 @@ CREATE TABLE tl_occupation ( ...@@ -13,7 +13,9 @@ CREATE TABLE tl_occupation (
name varchar2(250) NOT NULL, name varchar2(250) NOT NULL,
level varchar2(200) NOT NULL, level varchar2(200) NOT NULL,
assessment_type varchar2(200) NULL, assessment_type varchar2(200) NULL,
parttime_assessment_type varchar2(200) NULL,
assessment_level_id number(12) NULL, assessment_level_id number(12) NULL,
express_assessment_level_id number(12) NULL,
parent_occupation_id number(12) NULL parent_occupation_id number(12) NULL
); );
......
...@@ -11,6 +11,7 @@ CREATE TABLE tl_client ( ...@@ -11,6 +11,7 @@ CREATE TABLE tl_client (
, ,
client_name varchar(30) NOT NULL, client_name varchar(30) NOT NULL,
client_logo bytea NULL, client_logo bytea NULL,
use_client_details char(1) NULL,
email varchar(100) NULL, email varchar(100) NULL,
contact_name varchar(100) NULL, contact_name varchar(100) NULL,
contact_surname varchar(100) NULL, contact_surname varchar(100) NULL,
......
...@@ -13,7 +13,9 @@ CREATE TABLE tl_occupation ( ...@@ -13,7 +13,9 @@ CREATE TABLE tl_occupation (
name varchar(250) NOT NULL, name varchar(250) NOT NULL,
level varchar(200) NOT NULL, level varchar(200) NOT NULL,
assessment_type varchar(200) NULL, assessment_type varchar(200) NULL,
parttime_assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL, assessment_level_id numeric(12) NULL,
express_assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL parent_occupation_id numeric(12) NULL
); );
......
...@@ -14,6 +14,7 @@ import oneit.utils.filter.Filter; ...@@ -14,6 +14,7 @@ import oneit.utils.filter.Filter;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
import performa.orm.types.AssessmentType; import performa.orm.types.AssessmentType;
import performa.orm.types.CriteriaType; import performa.orm.types.CriteriaType;
import performa.orm.types.JobType;
public class AssessmentCriteriaTemplate extends BaseAssessmentCriteriaTemplate public class AssessmentCriteriaTemplate extends BaseAssessmentCriteriaTemplate
...@@ -102,12 +103,56 @@ public class AssessmentCriteriaTemplate extends BaseAssessmentCriteriaTemplate ...@@ -102,12 +103,56 @@ public class AssessmentCriteriaTemplate extends BaseAssessmentCriteriaTemplate
if(occupation != null) if(occupation != null)
{ {
setOccupation(occupation); setOccupation(occupation);
setLevel(occupation.getAssessmentLevel()); setSuggestedAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setAssessmentType(occupation.getAssessmentType()); setAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setLevel(getAssessmentType() == AssessmentType.COMPREHENSIVE ? occupation.getAssessmentLevel() : occupation.getExpressAssessmentLevel());
} }
super.postILOJobTitleChange(); super.postILOJobTitleChange();
} }
@Override
protected void postJobTypeChange() throws FieldException
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
if(occupation != null)
{
setSuggestedAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setLevel(getAssessmentType() == AssessmentType.COMPREHENSIVE ? occupation.getAssessmentLevel() : occupation.getExpressAssessmentLevel());
}
super.postJobTypeChange();
}
@Override
public AssessmentType getSuggestedAssessmentType()
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
if(occupation != null)
{
return getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType();
}
return super.getSuggestedAssessmentType();
}
@Override
protected void postAssessmentTypeChange() throws FieldException
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
if(occupation != null && getSuggestedAssessmentType() != super.getAssessmentType())
{
setLevel(getAssessmentType() == AssessmentType.COMPREHENSIVE ? occupation.getAssessmentLevel() : occupation.getExpressAssessmentLevel());
}
super.postAssessmentTypeChange();
}
public Occupation displayOccupation() public Occupation displayOccupation()
{ {
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<IMPORT value="performa.orm.types.*"/> <IMPORT value="performa.orm.types.*"/>
<IMPORT value="oneit.security.*"/> <IMPORT value="oneit.security.*"/>
<TRANSIENT name="SuggestedAssessmentType" type="AssessmentType" attribHelper="EnumeratedAttributeHelper"/>
<MULTIPLEREFERENCE name="AssessmentCriterias" type="AssessmentCriteria" backreferenceName="Template" /> <MULTIPLEREFERENCE name="AssessmentCriterias" type="AssessmentCriteria" backreferenceName="Template" />
<MULTIPLEREFERENCE name="WorkFlows" type="WorkFlow" backreferenceName="Template" /> <MULTIPLEREFERENCE name="WorkFlows" type="WorkFlow" backreferenceName="Template" />
......
...@@ -54,6 +54,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -54,6 +54,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
public static final String FIELD_RequireCV = "RequireCV"; public static final String FIELD_RequireCV = "RequireCV";
public static final String FIELD_AssessmentType = "AssessmentType"; public static final String FIELD_AssessmentType = "AssessmentType";
public static final String FIELD_IncludeAssessmentCriteria = "IncludeAssessmentCriteria"; public static final String FIELD_IncludeAssessmentCriteria = "IncludeAssessmentCriteria";
public static final String FIELD_SuggestedAssessmentType = "SuggestedAssessmentType";
public static final String SINGLEREFERENCE_Level = "Level"; public static final String SINGLEREFERENCE_Level = "Level";
public static final String SINGLEREFERENCE_Occupation = "Occupation"; public static final String SINGLEREFERENCE_Occupation = "Occupation";
public static final String SINGLEREFERENCE_JobOwner = "JobOwner"; public static final String SINGLEREFERENCE_JobOwner = "JobOwner";
...@@ -84,6 +85,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -84,6 +85,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
private static final DefaultAttributeHelper<AssessmentCriteriaTemplate> HELPER_RequireCV = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<AssessmentCriteriaTemplate> HELPER_RequireCV = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<AssessmentCriteriaTemplate, AssessmentType> HELPER_AssessmentType = new EnumeratedAttributeHelper<AssessmentCriteriaTemplate, AssessmentType> (AssessmentType.FACTORY_AssessmentType); private static final EnumeratedAttributeHelper<AssessmentCriteriaTemplate, AssessmentType> HELPER_AssessmentType = new EnumeratedAttributeHelper<AssessmentCriteriaTemplate, AssessmentType> (AssessmentType.FACTORY_AssessmentType);
private static final DefaultAttributeHelper<AssessmentCriteriaTemplate> HELPER_IncludeAssessmentCriteria = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<AssessmentCriteriaTemplate> HELPER_IncludeAssessmentCriteria = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<AssessmentCriteriaTemplate, AssessmentType> HELPER_SuggestedAssessmentType = new EnumeratedAttributeHelper<AssessmentCriteriaTemplate, AssessmentType> (AssessmentType.FACTORY_AssessmentType);
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
...@@ -99,6 +101,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -99,6 +101,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
private Boolean _RequireCV; private Boolean _RequireCV;
private AssessmentType _AssessmentType; private AssessmentType _AssessmentType;
private Boolean _IncludeAssessmentCriteria; private Boolean _IncludeAssessmentCriteria;
private AssessmentType _SuggestedAssessmentType;
// Private attributes corresponding to single references // Private attributes corresponding to single references
...@@ -121,6 +124,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -121,6 +124,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
private static final Map ATTRIBUTES_METADATA_AssessmentCriteriaTemplate = new HashMap (); private static final Map ATTRIBUTES_METADATA_AssessmentCriteriaTemplate = new HashMap ();
// Arrays of validators for each attribute // Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_SuggestedAssessmentType_Validators;
private static final AttributeValidator[] FIELD_TemplateName_Validators; private static final AttributeValidator[] FIELD_TemplateName_Validators;
private static final AttributeValidator[] FIELD_JobTitle_Validators; private static final AttributeValidator[] FIELD_JobTitle_Validators;
private static final AttributeValidator[] FIELD_JobDescription_Validators; private static final AttributeValidator[] FIELD_JobDescription_Validators;
...@@ -158,6 +162,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -158,6 +162,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
setupAssocMetaData_HiringTeam(); setupAssocMetaData_HiringTeam();
setupAssocMetaData_CompanyUser(); setupAssocMetaData_CompanyUser();
setupAssocMetaData_ILOJobTitle(); setupAssocMetaData_ILOJobTitle();
FIELD_SuggestedAssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_SuggestedAssessmentType(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_TemplateName_Validators = (AttributeValidator[])setupAttribMetaData_TemplateName(validatorMapping).toArray (new AttributeValidator[0]); FIELD_TemplateName_Validators = (AttributeValidator[])setupAttribMetaData_TemplateName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_JobTitle_Validators = (AttributeValidator[])setupAttribMetaData_JobTitle(validatorMapping).toArray (new AttributeValidator[0]); FIELD_JobTitle_Validators = (AttributeValidator[])setupAttribMetaData_JobTitle(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_JobDescription_Validators = (AttributeValidator[])setupAttribMetaData_JobDescription(validatorMapping).toArray (new AttributeValidator[0]); FIELD_JobDescription_Validators = (AttributeValidator[])setupAttribMetaData_JobDescription(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -330,6 +335,24 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -330,6 +335,24 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_SuggestedAssessmentType(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("name", "SuggestedAssessmentType");
metaInfo.put ("type", "AssessmentType");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for AssessmentCriteriaTemplate.SuggestedAssessmentType:", metaInfo);
ATTRIBUTES_METADATA_AssessmentCriteriaTemplate.put (FIELD_SuggestedAssessmentType, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(AssessmentCriteriaTemplate.class, "SuggestedAssessmentType", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for AssessmentCriteriaTemplate.SuggestedAssessmentType:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_TemplateName(Map validatorMapping) private static List setupAttribMetaData_TemplateName(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -607,6 +630,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -607,6 +630,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
_RequireCV = (Boolean)(Boolean.FALSE); _RequireCV = (Boolean)(Boolean.FALSE);
_AssessmentType = (AssessmentType)(AssessmentType.COMPREHENSIVE); _AssessmentType = (AssessmentType)(AssessmentType.COMPREHENSIVE);
_IncludeAssessmentCriteria = (Boolean)(Boolean.TRUE); _IncludeAssessmentCriteria = (Boolean)(Boolean.TRUE);
_SuggestedAssessmentType = (AssessmentType)(HELPER_SuggestedAssessmentType.initialise (_SuggestedAssessmentType));
} }
...@@ -1835,6 +1859,104 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -1835,6 +1859,104 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
} }
} }
/**
* Get the attribute SuggestedAssessmentType
*/
public AssessmentType getSuggestedAssessmentType ()
{
assertValid();
AssessmentType valToReturn = _SuggestedAssessmentType;
for (AssessmentCriteriaTemplateBehaviourDecorator bhd : AssessmentCriteriaTemplate_BehaviourDecorators)
{
valToReturn = bhd.getSuggestedAssessmentType ((AssessmentCriteriaTemplate)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 preSuggestedAssessmentTypeChange (AssessmentType newSuggestedAssessmentType) 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 postSuggestedAssessmentTypeChange () throws FieldException
{
}
public FieldWriteability getWriteability_SuggestedAssessmentType ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute SuggestedAssessmentType. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setSuggestedAssessmentType (AssessmentType newSuggestedAssessmentType) throws FieldException
{
boolean oldAndNewIdentical = HELPER_SuggestedAssessmentType.compare (_SuggestedAssessmentType, newSuggestedAssessmentType);
try
{
for (AssessmentCriteriaTemplateBehaviourDecorator bhd : AssessmentCriteriaTemplate_BehaviourDecorators)
{
newSuggestedAssessmentType = bhd.setSuggestedAssessmentType ((AssessmentCriteriaTemplate)this, newSuggestedAssessmentType);
oldAndNewIdentical = HELPER_SuggestedAssessmentType.compare (_SuggestedAssessmentType, newSuggestedAssessmentType);
}
if (FIELD_SuggestedAssessmentType_Validators.length > 0)
{
Object newSuggestedAssessmentTypeObj = HELPER_SuggestedAssessmentType.toObject (newSuggestedAssessmentType);
if (newSuggestedAssessmentTypeObj != null)
{
int loopMax = FIELD_SuggestedAssessmentType_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_AssessmentCriteriaTemplate.get (FIELD_SuggestedAssessmentType);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_SuggestedAssessmentType_Validators[v].checkAttribute (this, FIELD_SuggestedAssessmentType, metadata, newSuggestedAssessmentTypeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_SuggestedAssessmentType () != FieldWriteability.FALSE, "Field SuggestedAssessmentType is not writeable");
preSuggestedAssessmentTypeChange (newSuggestedAssessmentType);
markFieldChange (FIELD_SuggestedAssessmentType);
_SuggestedAssessmentType = newSuggestedAssessmentType;
postFieldChange (FIELD_SuggestedAssessmentType);
postSuggestedAssessmentTypeChange ();
}
}
/** /**
...@@ -3455,6 +3577,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -3455,6 +3577,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
_RequireCV = sourceAssessmentCriteriaTemplate._RequireCV; _RequireCV = sourceAssessmentCriteriaTemplate._RequireCV;
_AssessmentType = sourceAssessmentCriteriaTemplate._AssessmentType; _AssessmentType = sourceAssessmentCriteriaTemplate._AssessmentType;
_IncludeAssessmentCriteria = sourceAssessmentCriteriaTemplate._IncludeAssessmentCriteria; _IncludeAssessmentCriteria = sourceAssessmentCriteriaTemplate._IncludeAssessmentCriteria;
_SuggestedAssessmentType = sourceAssessmentCriteriaTemplate._SuggestedAssessmentType;
} }
} }
...@@ -3533,6 +3656,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -3533,6 +3656,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
_RequireCV = (Boolean)(HELPER_RequireCV.readExternal (_RequireCV, vals.get(FIELD_RequireCV))); // _RequireCV = (Boolean)(HELPER_RequireCV.readExternal (_RequireCV, vals.get(FIELD_RequireCV))); //
_AssessmentType = (AssessmentType)(HELPER_AssessmentType.readExternal (_AssessmentType, vals.get(FIELD_AssessmentType))); // _AssessmentType = (AssessmentType)(HELPER_AssessmentType.readExternal (_AssessmentType, vals.get(FIELD_AssessmentType))); //
_IncludeAssessmentCriteria = (Boolean)(HELPER_IncludeAssessmentCriteria.readExternal (_IncludeAssessmentCriteria, vals.get(FIELD_IncludeAssessmentCriteria))); // _IncludeAssessmentCriteria = (Boolean)(HELPER_IncludeAssessmentCriteria.readExternal (_IncludeAssessmentCriteria, vals.get(FIELD_IncludeAssessmentCriteria))); //
_SuggestedAssessmentType = (AssessmentType)(HELPER_SuggestedAssessmentType.readExternal (_SuggestedAssessmentType, vals.get(FIELD_SuggestedAssessmentType))); //
_Level.readExternalData(vals.get(SINGLEREFERENCE_Level)); _Level.readExternalData(vals.get(SINGLEREFERENCE_Level));
_Occupation.readExternalData(vals.get(SINGLEREFERENCE_Occupation)); _Occupation.readExternalData(vals.get(SINGLEREFERENCE_Occupation));
_JobOwner.readExternalData(vals.get(SINGLEREFERENCE_JobOwner)); _JobOwner.readExternalData(vals.get(SINGLEREFERENCE_JobOwner));
...@@ -3566,6 +3690,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -3566,6 +3690,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
vals.put (FIELD_RequireCV, HELPER_RequireCV.writeExternal (_RequireCV)); vals.put (FIELD_RequireCV, HELPER_RequireCV.writeExternal (_RequireCV));
vals.put (FIELD_AssessmentType, HELPER_AssessmentType.writeExternal (_AssessmentType)); vals.put (FIELD_AssessmentType, HELPER_AssessmentType.writeExternal (_AssessmentType));
vals.put (FIELD_IncludeAssessmentCriteria, HELPER_IncludeAssessmentCriteria.writeExternal (_IncludeAssessmentCriteria)); vals.put (FIELD_IncludeAssessmentCriteria, HELPER_IncludeAssessmentCriteria.writeExternal (_IncludeAssessmentCriteria));
vals.put (FIELD_SuggestedAssessmentType, HELPER_SuggestedAssessmentType.writeExternal (_SuggestedAssessmentType));
vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData()); vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData());
vals.put (SINGLEREFERENCE_Occupation, _Occupation.writeExternalData()); vals.put (SINGLEREFERENCE_Occupation, _Occupation.writeExternalData());
vals.put (SINGLEREFERENCE_JobOwner, _JobOwner.writeExternalData()); vals.put (SINGLEREFERENCE_JobOwner, _JobOwner.writeExternalData());
...@@ -3661,6 +3786,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -3661,6 +3786,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
{ {
super.visitAttributes (visitor); super.visitAttributes (visitor);
visitor.visitField(this, FIELD_SuggestedAssessmentType, HELPER_SuggestedAssessmentType.toObject(getSuggestedAssessmentType()));
} }
...@@ -4078,6 +4204,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4078,6 +4204,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
{ {
return HELPER_IncludeAssessmentCriteria.toObject (getIncludeAssessmentCriteria ()); return HELPER_IncludeAssessmentCriteria.toObject (getIncludeAssessmentCriteria ());
} }
else if (attribName.equals (FIELD_SuggestedAssessmentType))
{
return HELPER_SuggestedAssessmentType.toObject (getSuggestedAssessmentType ());
}
else else
{ {
return super.getAttribute (attribName); return super.getAttribute (attribName);
...@@ -4139,6 +4269,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4139,6 +4269,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
{ {
return HELPER_IncludeAssessmentCriteria; return HELPER_IncludeAssessmentCriteria;
} }
else if (attribName.equals (FIELD_SuggestedAssessmentType))
{
return HELPER_SuggestedAssessmentType;
}
else else
{ {
return super.getAttributeHelper (attribName); return super.getAttributeHelper (attribName);
...@@ -4200,6 +4334,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4200,6 +4334,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
{ {
setIncludeAssessmentCriteria ((Boolean)(HELPER_IncludeAssessmentCriteria.fromObject (_IncludeAssessmentCriteria, attribValue))); setIncludeAssessmentCriteria ((Boolean)(HELPER_IncludeAssessmentCriteria.fromObject (_IncludeAssessmentCriteria, attribValue)));
} }
else if (attribName.equals (FIELD_SuggestedAssessmentType))
{
setSuggestedAssessmentType ((AssessmentType)(HELPER_SuggestedAssessmentType.fromObject (_SuggestedAssessmentType, attribValue)));
}
else else
{ {
super.setAttribute (attribName, attribValue); super.setAttribute (attribName, attribValue);
...@@ -4308,6 +4446,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4308,6 +4446,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
{ {
return getWriteability_ILOJobTitle (); return getWriteability_ILOJobTitle ();
} }
else if (fieldName.equals (FIELD_SuggestedAssessmentType))
{
return getWriteability_SuggestedAssessmentType ();
}
else else
{ {
return super.getWriteable (fieldName); return super.getWriteable (fieldName);
...@@ -4378,6 +4520,11 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4378,6 +4520,11 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
fields.add (FIELD_IncludeAssessmentCriteria); fields.add (FIELD_IncludeAssessmentCriteria);
} }
if (getWriteability_SuggestedAssessmentType () != FieldWriteability.TRUE)
{
fields.add (FIELD_SuggestedAssessmentType);
}
super.putUnwriteable (fields); super.putUnwriteable (fields);
} }
...@@ -4399,6 +4546,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4399,6 +4546,7 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
result.add(HELPER_RequireCV.getAttribObject (getClass (), _RequireCV, false, FIELD_RequireCV)); result.add(HELPER_RequireCV.getAttribObject (getClass (), _RequireCV, false, FIELD_RequireCV));
result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, true, FIELD_AssessmentType)); result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, true, FIELD_AssessmentType));
result.add(HELPER_IncludeAssessmentCriteria.getAttribObject (getClass (), _IncludeAssessmentCriteria, true, FIELD_IncludeAssessmentCriteria)); result.add(HELPER_IncludeAssessmentCriteria.getAttribObject (getClass (), _IncludeAssessmentCriteria, true, FIELD_IncludeAssessmentCriteria));
result.add(HELPER_SuggestedAssessmentType.getAttribObject (getClass (), _SuggestedAssessmentType, false, FIELD_SuggestedAssessmentType));
return result; return result;
} }
...@@ -4665,6 +4813,24 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4665,6 +4813,24 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
return newIncludeAssessmentCriteria; return newIncludeAssessmentCriteria;
} }
/**
* Get the attribute SuggestedAssessmentType
*/
public AssessmentType getSuggestedAssessmentType (AssessmentCriteriaTemplate obj, AssessmentType original)
{
return original;
}
/**
* Change the value set for attribute SuggestedAssessmentType.
* May modify the field beforehand
* Occurs before validation.
*/
public AssessmentType setSuggestedAssessmentType (AssessmentCriteriaTemplate obj, AssessmentType newSuggestedAssessmentType) throws FieldException
{
return newSuggestedAssessmentType;
}
} }
...@@ -4717,6 +4883,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4717,6 +4883,10 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
public PipeLine<From, ? extends Object> to(String name) public PipeLine<From, ? extends Object> to(String name)
{ {
if (name.equals ("SuggestedAssessmentType"))
{
return toSuggestedAssessmentType ();
}
if (name.equals ("AssessmentCriterias")) if (name.equals ("AssessmentCriterias"))
{ {
return toAssessmentCriterias (); return toAssessmentCriterias ();
...@@ -4811,6 +4981,8 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4811,6 +4981,8 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
} }
public PipeLine<From, AssessmentType> toSuggestedAssessmentType () { return pipe(new ORMAttributePipe<Me, AssessmentType>(FIELD_SuggestedAssessmentType)); }
public PipeLine<From, String> toTemplateName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_TemplateName)); } public PipeLine<From, String> toTemplateName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_TemplateName)); }
public PipeLine<From, String> toJobTitle () { return pipe(new ORMAttributePipe<Me, String>(FIELD_JobTitle)); } public PipeLine<From, String> toJobTitle () { return pipe(new ORMAttributePipe<Me, String>(FIELD_JobTitle)); }
...@@ -4900,6 +5072,11 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass ...@@ -4900,6 +5072,11 @@ public abstract class BaseAssessmentCriteriaTemplate extends BaseBusinessClass
public boolean isTransientAttrib(String attribName) public boolean isTransientAttrib(String attribName)
{ {
if(CollectionUtils.equals(attribName, "SuggestedAssessmentType"))
{
return true;
}
return super.isTransientAttrib(attribName); return super.isTransientAttrib(attribName);
} }
......
...@@ -44,6 +44,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -44,6 +44,7 @@ public abstract class BaseClient extends BaseBusinessClass
public static final String FIELD_ClientName = "ClientName"; public static final String FIELD_ClientName = "ClientName";
public static final String FIELD_ClientLogo = "ClientLogo"; public static final String FIELD_ClientLogo = "ClientLogo";
public static final String FIELD_UseClientDetails = "UseClientDetails";
public static final String FIELD_Email = "Email"; public static final String FIELD_Email = "Email";
public static final String FIELD_ContactName = "ContactName"; public static final String FIELD_ContactName = "ContactName";
public static final String FIELD_ContactSurname = "ContactSurname"; public static final String FIELD_ContactSurname = "ContactSurname";
...@@ -68,6 +69,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -68,6 +69,7 @@ public abstract class BaseClient extends BaseBusinessClass
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<Client> HELPER_ClientName = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Client> HELPER_ClientName = DefaultAttributeHelper.INSTANCE;
private static final BLOBAttributeHelper HELPER_ClientLogo = BLOBAttributeHelper.INSTANCE; private static final BLOBAttributeHelper HELPER_ClientLogo = BLOBAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Client> HELPER_UseClientDetails = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Client> HELPER_Email = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Client> HELPER_Email = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Client> HELPER_ContactName = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Client> HELPER_ContactName = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Client> HELPER_ContactSurname = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Client> HELPER_ContactSurname = DefaultAttributeHelper.INSTANCE;
...@@ -83,6 +85,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -83,6 +85,7 @@ public abstract class BaseClient extends BaseBusinessClass
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String _ClientName; private String _ClientName;
private BinaryContent _ClientLogo; private BinaryContent _ClientLogo;
private Boolean _UseClientDetails;
private String _Email; private String _Email;
private String _ContactName; private String _ContactName;
private String _ContactSurname; private String _ContactSurname;
...@@ -111,6 +114,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -111,6 +114,7 @@ public abstract class BaseClient extends BaseBusinessClass
private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators; private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators;
private static final AttributeValidator[] FIELD_ClientName_Validators; private static final AttributeValidator[] FIELD_ClientName_Validators;
private static final AttributeValidator[] FIELD_ClientLogo_Validators; private static final AttributeValidator[] FIELD_ClientLogo_Validators;
private static final AttributeValidator[] FIELD_UseClientDetails_Validators;
private static final AttributeValidator[] FIELD_Email_Validators; private static final AttributeValidator[] FIELD_Email_Validators;
private static final AttributeValidator[] FIELD_ContactName_Validators; private static final AttributeValidator[] FIELD_ContactName_Validators;
private static final AttributeValidator[] FIELD_ContactSurname_Validators; private static final AttributeValidator[] FIELD_ContactSurname_Validators;
...@@ -142,6 +146,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -142,6 +146,7 @@ public abstract class BaseClient extends BaseBusinessClass
FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]); FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ClientName_Validators = (AttributeValidator[])setupAttribMetaData_ClientName(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ClientName_Validators = (AttributeValidator[])setupAttribMetaData_ClientName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ClientLogo_Validators = (AttributeValidator[])setupAttribMetaData_ClientLogo(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ClientLogo_Validators = (AttributeValidator[])setupAttribMetaData_ClientLogo(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_UseClientDetails_Validators = (AttributeValidator[])setupAttribMetaData_UseClientDetails(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Email_Validators = (AttributeValidator[])setupAttribMetaData_Email(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Email_Validators = (AttributeValidator[])setupAttribMetaData_Email(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ContactName_Validators = (AttributeValidator[])setupAttribMetaData_ContactName(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ContactName_Validators = (AttributeValidator[])setupAttribMetaData_ContactName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ContactSurname_Validators = (AttributeValidator[])setupAttribMetaData_ContactSurname(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ContactSurname_Validators = (AttributeValidator[])setupAttribMetaData_ContactSurname(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -272,6 +277,26 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -272,6 +277,26 @@ public abstract class BaseClient extends BaseBusinessClass
} }
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_UseClientDetails(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "use_client_details");
metaInfo.put ("defaultValue", "Boolean.TRUE");
metaInfo.put ("mandatory", "false");
metaInfo.put ("name", "UseClientDetails");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Client.UseClientDetails:", metaInfo);
ATTRIBUTES_METADATA_Client.put (FIELD_UseClientDetails, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Client.class, "UseClientDetails", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Client.UseClientDetails:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_Email(Map validatorMapping) private static List setupAttribMetaData_Email(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -483,6 +508,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -483,6 +508,7 @@ public abstract class BaseClient extends BaseBusinessClass
_ClientName = (String)(HELPER_ClientName.initialise (_ClientName)); _ClientName = (String)(HELPER_ClientName.initialise (_ClientName));
_ClientLogo = (BinaryContent)(HELPER_ClientLogo.initialise (_ClientLogo)); _ClientLogo = (BinaryContent)(HELPER_ClientLogo.initialise (_ClientLogo));
_UseClientDetails = (Boolean)(Boolean.TRUE);
_Email = (String)(HELPER_Email.initialise (_Email)); _Email = (String)(HELPER_Email.initialise (_Email));
_ContactName = (String)(HELPER_ContactName.initialise (_ContactName)); _ContactName = (String)(HELPER_ContactName.initialise (_ContactName));
_ContactSurname = (String)(HELPER_ContactSurname.initialise (_ContactSurname)); _ContactSurname = (String)(HELPER_ContactSurname.initialise (_ContactSurname));
...@@ -721,6 +747,104 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -721,6 +747,104 @@ public abstract class BaseClient extends BaseBusinessClass
} }
/** /**
* Get the attribute UseClientDetails
*/
public Boolean getUseClientDetails ()
{
assertValid();
Boolean valToReturn = _UseClientDetails;
for (ClientBehaviourDecorator bhd : Client_BehaviourDecorators)
{
valToReturn = bhd.getUseClientDetails ((Client)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 preUseClientDetailsChange (Boolean newUseClientDetails) 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 postUseClientDetailsChange () throws FieldException
{
}
public FieldWriteability getWriteability_UseClientDetails ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute UseClientDetails. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setUseClientDetails (Boolean newUseClientDetails) throws FieldException
{
boolean oldAndNewIdentical = HELPER_UseClientDetails.compare (_UseClientDetails, newUseClientDetails);
try
{
for (ClientBehaviourDecorator bhd : Client_BehaviourDecorators)
{
newUseClientDetails = bhd.setUseClientDetails ((Client)this, newUseClientDetails);
oldAndNewIdentical = HELPER_UseClientDetails.compare (_UseClientDetails, newUseClientDetails);
}
if (FIELD_UseClientDetails_Validators.length > 0)
{
Object newUseClientDetailsObj = HELPER_UseClientDetails.toObject (newUseClientDetails);
if (newUseClientDetailsObj != null)
{
int loopMax = FIELD_UseClientDetails_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Client.get (FIELD_UseClientDetails);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_UseClientDetails_Validators[v].checkAttribute (this, FIELD_UseClientDetails, metadata, newUseClientDetailsObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_UseClientDetails () != FieldWriteability.FALSE, "Field UseClientDetails is not writeable");
preUseClientDetailsChange (newUseClientDetails);
markFieldChange (FIELD_UseClientDetails);
_UseClientDetails = newUseClientDetails;
postFieldChange (FIELD_UseClientDetails);
postUseClientDetailsChange ();
}
}
/**
* Get the attribute Email * Get the attribute Email
*/ */
public String getEmail () public String getEmail ()
...@@ -2365,6 +2489,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2365,6 +2489,7 @@ public abstract class BaseClient extends BaseBusinessClass
tl_clientPSet.setAttrib (FIELD_ObjectID, myID); tl_clientPSet.setAttrib (FIELD_ObjectID, myID);
tl_clientPSet.setAttrib (FIELD_ClientName, HELPER_ClientName.toObject (_ClientName)); // tl_clientPSet.setAttrib (FIELD_ClientName, HELPER_ClientName.toObject (_ClientName)); //
tl_clientPSet.setAttrib (FIELD_ClientLogo, HELPER_ClientLogo.toObject (_ClientLogo)); // tl_clientPSet.setAttrib (FIELD_ClientLogo, HELPER_ClientLogo.toObject (_ClientLogo)); //
tl_clientPSet.setAttrib (FIELD_UseClientDetails, HELPER_UseClientDetails.toObject (_UseClientDetails)); //
tl_clientPSet.setAttrib (FIELD_Email, HELPER_Email.toObject (_Email)); // tl_clientPSet.setAttrib (FIELD_Email, HELPER_Email.toObject (_Email)); //
tl_clientPSet.setAttrib (FIELD_ContactName, HELPER_ContactName.toObject (_ContactName)); // tl_clientPSet.setAttrib (FIELD_ContactName, HELPER_ContactName.toObject (_ContactName)); //
tl_clientPSet.setAttrib (FIELD_ContactSurname, HELPER_ContactSurname.toObject (_ContactSurname)); // tl_clientPSet.setAttrib (FIELD_ContactSurname, HELPER_ContactSurname.toObject (_ContactSurname)); //
...@@ -2392,6 +2517,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2392,6 +2517,7 @@ public abstract class BaseClient extends BaseBusinessClass
_ClientName = (String)(HELPER_ClientName.fromObject (_ClientName, tl_clientPSet.getAttrib (FIELD_ClientName))); // _ClientName = (String)(HELPER_ClientName.fromObject (_ClientName, tl_clientPSet.getAttrib (FIELD_ClientName))); //
_ClientLogo = (BinaryContent)(HELPER_ClientLogo.fromObject (_ClientLogo, tl_clientPSet.getAttrib (FIELD_ClientLogo))); // _ClientLogo = (BinaryContent)(HELPER_ClientLogo.fromObject (_ClientLogo, tl_clientPSet.getAttrib (FIELD_ClientLogo))); //
_UseClientDetails = (Boolean)(HELPER_UseClientDetails.fromObject (_UseClientDetails, tl_clientPSet.getAttrib (FIELD_UseClientDetails))); //
_Email = (String)(HELPER_Email.fromObject (_Email, tl_clientPSet.getAttrib (FIELD_Email))); // _Email = (String)(HELPER_Email.fromObject (_Email, tl_clientPSet.getAttrib (FIELD_Email))); //
_ContactName = (String)(HELPER_ContactName.fromObject (_ContactName, tl_clientPSet.getAttrib (FIELD_ContactName))); // _ContactName = (String)(HELPER_ContactName.fromObject (_ContactName, tl_clientPSet.getAttrib (FIELD_ContactName))); //
_ContactSurname = (String)(HELPER_ContactSurname.fromObject (_ContactSurname, tl_clientPSet.getAttrib (FIELD_ContactSurname))); // _ContactSurname = (String)(HELPER_ContactSurname.fromObject (_ContactSurname, tl_clientPSet.getAttrib (FIELD_ContactSurname))); //
...@@ -2438,6 +2564,15 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2438,6 +2564,15 @@ public abstract class BaseClient extends BaseBusinessClass
try try
{ {
setUseClientDetails (otherClient.getUseClientDetails ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setEmail (otherClient.getEmail ()); setEmail (otherClient.getEmail ());
} }
catch (FieldException ex) catch (FieldException ex)
...@@ -2534,6 +2669,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2534,6 +2669,7 @@ public abstract class BaseClient extends BaseBusinessClass
_ClientName = sourceClient._ClientName; _ClientName = sourceClient._ClientName;
_ClientLogo = sourceClient._ClientLogo; _ClientLogo = sourceClient._ClientLogo;
_UseClientDetails = sourceClient._UseClientDetails;
_Email = sourceClient._Email; _Email = sourceClient._Email;
_ContactName = sourceClient._ContactName; _ContactName = sourceClient._ContactName;
_ContactSurname = sourceClient._ContactSurname; _ContactSurname = sourceClient._ContactSurname;
...@@ -2603,6 +2739,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2603,6 +2739,7 @@ public abstract class BaseClient extends BaseBusinessClass
_ClientName = (String)(HELPER_ClientName.readExternal (_ClientName, vals.get(FIELD_ClientName))); // _ClientName = (String)(HELPER_ClientName.readExternal (_ClientName, vals.get(FIELD_ClientName))); //
_ClientLogo = (BinaryContent)(HELPER_ClientLogo.readExternal (_ClientLogo, vals.get(FIELD_ClientLogo))); // _ClientLogo = (BinaryContent)(HELPER_ClientLogo.readExternal (_ClientLogo, vals.get(FIELD_ClientLogo))); //
_UseClientDetails = (Boolean)(HELPER_UseClientDetails.readExternal (_UseClientDetails, vals.get(FIELD_UseClientDetails))); //
_Email = (String)(HELPER_Email.readExternal (_Email, vals.get(FIELD_Email))); // _Email = (String)(HELPER_Email.readExternal (_Email, vals.get(FIELD_Email))); //
_ContactName = (String)(HELPER_ContactName.readExternal (_ContactName, vals.get(FIELD_ContactName))); // _ContactName = (String)(HELPER_ContactName.readExternal (_ContactName, vals.get(FIELD_ContactName))); //
_ContactSurname = (String)(HELPER_ContactSurname.readExternal (_ContactSurname, vals.get(FIELD_ContactSurname))); // _ContactSurname = (String)(HELPER_ContactSurname.readExternal (_ContactSurname, vals.get(FIELD_ContactSurname))); //
...@@ -2629,6 +2766,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2629,6 +2766,7 @@ public abstract class BaseClient extends BaseBusinessClass
vals.put (FIELD_ClientName, HELPER_ClientName.writeExternal (_ClientName)); vals.put (FIELD_ClientName, HELPER_ClientName.writeExternal (_ClientName));
vals.put (FIELD_ClientLogo, HELPER_ClientLogo.writeExternal (_ClientLogo)); vals.put (FIELD_ClientLogo, HELPER_ClientLogo.writeExternal (_ClientLogo));
vals.put (FIELD_UseClientDetails, HELPER_UseClientDetails.writeExternal (_UseClientDetails));
vals.put (FIELD_Email, HELPER_Email.writeExternal (_Email)); vals.put (FIELD_Email, HELPER_Email.writeExternal (_Email));
vals.put (FIELD_ContactName, HELPER_ContactName.writeExternal (_ContactName)); vals.put (FIELD_ContactName, HELPER_ContactName.writeExternal (_ContactName));
vals.put (FIELD_ContactSurname, HELPER_ContactSurname.writeExternal (_ContactSurname)); vals.put (FIELD_ContactSurname, HELPER_ContactSurname.writeExternal (_ContactSurname));
...@@ -2663,6 +2801,10 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2663,6 +2801,10 @@ public abstract class BaseClient extends BaseBusinessClass
{ {
listener.notifyFieldChange(this, other, FIELD_ClientLogo, HELPER_ClientLogo.toObject(this._ClientLogo), HELPER_ClientLogo.toObject(otherClient._ClientLogo)); listener.notifyFieldChange(this, other, FIELD_ClientLogo, HELPER_ClientLogo.toObject(this._ClientLogo), HELPER_ClientLogo.toObject(otherClient._ClientLogo));
} }
if (!HELPER_UseClientDetails.compare(this._UseClientDetails, otherClient._UseClientDetails))
{
listener.notifyFieldChange(this, other, FIELD_UseClientDetails, HELPER_UseClientDetails.toObject(this._UseClientDetails), HELPER_UseClientDetails.toObject(otherClient._UseClientDetails));
}
if (!HELPER_Email.compare(this._Email, otherClient._Email)) if (!HELPER_Email.compare(this._Email, otherClient._Email))
{ {
listener.notifyFieldChange(this, other, FIELD_Email, HELPER_Email.toObject(this._Email), HELPER_Email.toObject(otherClient._Email)); listener.notifyFieldChange(this, other, FIELD_Email, HELPER_Email.toObject(this._Email), HELPER_Email.toObject(otherClient._Email));
...@@ -2727,6 +2869,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2727,6 +2869,7 @@ public abstract class BaseClient extends BaseBusinessClass
visitor.visitField(this, FIELD_ClientName, HELPER_ClientName.toObject(getClientName())); visitor.visitField(this, FIELD_ClientName, HELPER_ClientName.toObject(getClientName()));
visitor.visitField(this, FIELD_ClientLogo, HELPER_ClientLogo.toObject(getClientLogo())); visitor.visitField(this, FIELD_ClientLogo, HELPER_ClientLogo.toObject(getClientLogo()));
visitor.visitField(this, FIELD_UseClientDetails, HELPER_UseClientDetails.toObject(getUseClientDetails()));
visitor.visitField(this, FIELD_Email, HELPER_Email.toObject(getEmail())); visitor.visitField(this, FIELD_Email, HELPER_Email.toObject(getEmail()));
visitor.visitField(this, FIELD_ContactName, HELPER_ContactName.toObject(getContactName())); visitor.visitField(this, FIELD_ContactName, HELPER_ContactName.toObject(getContactName()));
visitor.visitField(this, FIELD_ContactSurname, HELPER_ContactSurname.toObject(getContactSurname())); visitor.visitField(this, FIELD_ContactSurname, HELPER_ContactSurname.toObject(getContactSurname()));
...@@ -2792,6 +2935,10 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2792,6 +2935,10 @@ public abstract class BaseClient extends BaseBusinessClass
{ {
return filter.matches (getClientLogo ()); return filter.matches (getClientLogo ());
} }
else if (attribName.equals (FIELD_UseClientDetails))
{
return filter.matches (getUseClientDetails ());
}
else if (attribName.equals (FIELD_Email)) else if (attribName.equals (FIELD_Email))
{ {
return filter.matches (getEmail ()); return filter.matches (getEmail ());
...@@ -2879,6 +3026,12 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2879,6 +3026,12 @@ public abstract class BaseClient extends BaseBusinessClass
return this; return this;
} }
public SearchAll andUseClientDetails (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_client.use_client_details", "UseClientDetails");
return this;
}
public SearchAll andEmail (QueryFilter<String> filter) public SearchAll andEmail (QueryFilter<String> filter)
{ {
filter.addFilter (context, "tl_client.email", "Email"); filter.addFilter (context, "tl_client.email", "Email");
...@@ -2988,6 +3141,10 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -2988,6 +3141,10 @@ public abstract class BaseClient extends BaseBusinessClass
{ {
return HELPER_ClientLogo.toObject (getClientLogo ()); return HELPER_ClientLogo.toObject (getClientLogo ());
} }
else if (attribName.equals (FIELD_UseClientDetails))
{
return HELPER_UseClientDetails.toObject (getUseClientDetails ());
}
else if (attribName.equals (FIELD_Email)) else if (attribName.equals (FIELD_Email))
{ {
return HELPER_Email.toObject (getEmail ()); return HELPER_Email.toObject (getEmail ());
...@@ -3049,6 +3206,10 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3049,6 +3206,10 @@ public abstract class BaseClient extends BaseBusinessClass
{ {
return HELPER_ClientLogo; return HELPER_ClientLogo;
} }
else if (attribName.equals (FIELD_UseClientDetails))
{
return HELPER_UseClientDetails;
}
else if (attribName.equals (FIELD_Email)) else if (attribName.equals (FIELD_Email))
{ {
return HELPER_Email; return HELPER_Email;
...@@ -3110,6 +3271,10 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3110,6 +3271,10 @@ public abstract class BaseClient extends BaseBusinessClass
{ {
setClientLogo ((BinaryContent)(HELPER_ClientLogo.fromObject (_ClientLogo, attribValue))); setClientLogo ((BinaryContent)(HELPER_ClientLogo.fromObject (_ClientLogo, attribValue)));
} }
else if (attribName.equals (FIELD_UseClientDetails))
{
setUseClientDetails ((Boolean)(HELPER_UseClientDetails.fromObject (_UseClientDetails, attribValue)));
}
else if (attribName.equals (FIELD_Email)) else if (attribName.equals (FIELD_Email))
{ {
setEmail ((String)(HELPER_Email.fromObject (_Email, attribValue))); setEmail ((String)(HELPER_Email.fromObject (_Email, attribValue)));
...@@ -3178,6 +3343,10 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3178,6 +3343,10 @@ public abstract class BaseClient extends BaseBusinessClass
{ {
return getWriteability_ClientLogo (); return getWriteability_ClientLogo ();
} }
else if (fieldName.equals (FIELD_UseClientDetails))
{
return getWriteability_UseClientDetails ();
}
else if (fieldName.equals (FIELD_Email)) else if (fieldName.equals (FIELD_Email))
{ {
return getWriteability_Email (); return getWriteability_Email ();
...@@ -3250,6 +3419,11 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3250,6 +3419,11 @@ public abstract class BaseClient extends BaseBusinessClass
fields.add (FIELD_ClientLogo); fields.add (FIELD_ClientLogo);
} }
if (getWriteability_UseClientDetails () != FieldWriteability.TRUE)
{
fields.add (FIELD_UseClientDetails);
}
if (getWriteability_Email () != FieldWriteability.TRUE) if (getWriteability_Email () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_Email); fields.add (FIELD_Email);
...@@ -3311,6 +3485,7 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3311,6 +3485,7 @@ public abstract class BaseClient extends BaseBusinessClass
result.add(HELPER_ClientName.getAttribObject (getClass (), _ClientName, true, FIELD_ClientName)); result.add(HELPER_ClientName.getAttribObject (getClass (), _ClientName, true, FIELD_ClientName));
result.add(HELPER_ClientLogo.getAttribObject (getClass (), _ClientLogo, false, FIELD_ClientLogo)); result.add(HELPER_ClientLogo.getAttribObject (getClass (), _ClientLogo, false, FIELD_ClientLogo));
result.add(HELPER_UseClientDetails.getAttribObject (getClass (), _UseClientDetails, false, FIELD_UseClientDetails));
result.add(HELPER_Email.getAttribObject (getClass (), _Email, false, FIELD_Email)); result.add(HELPER_Email.getAttribObject (getClass (), _Email, false, FIELD_Email));
result.add(HELPER_ContactName.getAttribObject (getClass (), _ContactName, false, FIELD_ContactName)); result.add(HELPER_ContactName.getAttribObject (getClass (), _ContactName, false, FIELD_ContactName));
result.add(HELPER_ContactSurname.getAttribObject (getClass (), _ContactSurname, false, FIELD_ContactSurname)); result.add(HELPER_ContactSurname.getAttribObject (getClass (), _ContactSurname, false, FIELD_ContactSurname));
...@@ -3426,6 +3601,24 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3426,6 +3601,24 @@ public abstract class BaseClient extends BaseBusinessClass
} }
/** /**
* Get the attribute UseClientDetails
*/
public Boolean getUseClientDetails (Client obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute UseClientDetails.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setUseClientDetails (Client obj, Boolean newUseClientDetails) throws FieldException
{
return newUseClientDetails;
}
/**
* Get the attribute Email * Get the attribute Email
*/ */
public String getEmail (Client obj, String original) public String getEmail (Client obj, String original)
...@@ -3673,6 +3866,10 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3673,6 +3866,10 @@ public abstract class BaseClient extends BaseBusinessClass
{ {
return toClientLogo (); return toClientLogo ();
} }
if (name.equals ("UseClientDetails"))
{
return toUseClientDetails ();
}
if (name.equals ("Email")) if (name.equals ("Email"))
{ {
return toEmail (); return toEmail ();
...@@ -3729,6 +3926,8 @@ public abstract class BaseClient extends BaseBusinessClass ...@@ -3729,6 +3926,8 @@ public abstract class BaseClient extends BaseBusinessClass
public PipeLine<From, BinaryContent> toClientLogo () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_ClientLogo)); } public PipeLine<From, BinaryContent> toClientLogo () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_ClientLogo)); }
public PipeLine<From, Boolean> toUseClientDetails () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_UseClientDetails)); }
public PipeLine<From, String> toEmail () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Email)); } public PipeLine<From, String> toEmail () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Email)); }
public PipeLine<From, String> toContactName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_ContactName)); } public PipeLine<From, String> toContactName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_ContactName)); }
......
...@@ -81,6 +81,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -81,6 +81,7 @@ public abstract class BaseJob extends BaseBusinessClass
public static final String FIELD_AssessmentTemplateName = "AssessmentTemplateName"; public static final String FIELD_AssessmentTemplateName = "AssessmentTemplateName";
public static final String FIELD_CultureTemplateName = "CultureTemplateName"; public static final String FIELD_CultureTemplateName = "CultureTemplateName";
public static final String FIELD_AppProcessOption = "AppProcessOption"; public static final String FIELD_AppProcessOption = "AppProcessOption";
public static final String FIELD_SuggestedAssessmentType = "SuggestedAssessmentType";
public static final String FIELD_RankingCompleted = "RankingCompleted"; public static final String FIELD_RankingCompleted = "RankingCompleted";
public static final String SINGLEREFERENCE_CultureTemplate = "CultureTemplate"; public static final String SINGLEREFERENCE_CultureTemplate = "CultureTemplate";
public static final String SINGLEREFERENCE_JobTemplate = "JobTemplate"; public static final String SINGLEREFERENCE_JobTemplate = "JobTemplate";
...@@ -151,6 +152,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -151,6 +152,7 @@ public abstract class BaseJob extends BaseBusinessClass
private static final DefaultAttributeHelper<Job> HELPER_AssessmentTemplateName = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Job> HELPER_AssessmentTemplateName = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Job> HELPER_CultureTemplateName = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Job> HELPER_CultureTemplateName = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<Job, AppProcessOption> HELPER_AppProcessOption = new EnumeratedAttributeHelper<Job, AppProcessOption> (AppProcessOption.FACTORY_AppProcessOption); private static final EnumeratedAttributeHelper<Job, AppProcessOption> HELPER_AppProcessOption = new EnumeratedAttributeHelper<Job, AppProcessOption> (AppProcessOption.FACTORY_AppProcessOption);
private static final EnumeratedAttributeHelper<Job, AssessmentType> HELPER_SuggestedAssessmentType = new EnumeratedAttributeHelper<Job, AssessmentType> (AssessmentType.FACTORY_AssessmentType);
private static final DefaultAttributeHelper<Job> HELPER_RankingCompleted = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Job> HELPER_RankingCompleted = DefaultAttributeHelper.INSTANCE;
...@@ -194,6 +196,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -194,6 +196,7 @@ public abstract class BaseJob extends BaseBusinessClass
private String _AssessmentTemplateName; private String _AssessmentTemplateName;
private String _CultureTemplateName; private String _CultureTemplateName;
private AppProcessOption _AppProcessOption; private AppProcessOption _AppProcessOption;
private AssessmentType _SuggestedAssessmentType;
private Boolean _RankingCompleted; private Boolean _RankingCompleted;
...@@ -236,6 +239,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -236,6 +239,7 @@ public abstract class BaseJob extends BaseBusinessClass
private static final AttributeValidator[] FIELD_AssessmentTemplateName_Validators; private static final AttributeValidator[] FIELD_AssessmentTemplateName_Validators;
private static final AttributeValidator[] FIELD_CultureTemplateName_Validators; private static final AttributeValidator[] FIELD_CultureTemplateName_Validators;
private static final AttributeValidator[] FIELD_AppProcessOption_Validators; private static final AttributeValidator[] FIELD_AppProcessOption_Validators;
private static final AttributeValidator[] FIELD_SuggestedAssessmentType_Validators;
private static final AttributeValidator[] FIELD_RankingCompleted_Validators; private static final AttributeValidator[] FIELD_RankingCompleted_Validators;
private static final AttributeValidator[] FIELD_JobTitle_Validators; private static final AttributeValidator[] FIELD_JobTitle_Validators;
private static final AttributeValidator[] FIELD_JobDescription_Validators; private static final AttributeValidator[] FIELD_JobDescription_Validators;
...@@ -310,6 +314,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -310,6 +314,7 @@ public abstract class BaseJob extends BaseBusinessClass
FIELD_AssessmentTemplateName_Validators = (AttributeValidator[])setupAttribMetaData_AssessmentTemplateName(validatorMapping).toArray (new AttributeValidator[0]); FIELD_AssessmentTemplateName_Validators = (AttributeValidator[])setupAttribMetaData_AssessmentTemplateName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CultureTemplateName_Validators = (AttributeValidator[])setupAttribMetaData_CultureTemplateName(validatorMapping).toArray (new AttributeValidator[0]); FIELD_CultureTemplateName_Validators = (AttributeValidator[])setupAttribMetaData_CultureTemplateName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_AppProcessOption_Validators = (AttributeValidator[])setupAttribMetaData_AppProcessOption(validatorMapping).toArray (new AttributeValidator[0]); FIELD_AppProcessOption_Validators = (AttributeValidator[])setupAttribMetaData_AppProcessOption(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_SuggestedAssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_SuggestedAssessmentType(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_RankingCompleted_Validators = (AttributeValidator[])setupAttribMetaData_RankingCompleted(validatorMapping).toArray (new AttributeValidator[0]); FIELD_RankingCompleted_Validators = (AttributeValidator[])setupAttribMetaData_RankingCompleted(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_JobTitle_Validators = (AttributeValidator[])setupAttribMetaData_JobTitle(validatorMapping).toArray (new AttributeValidator[0]); FIELD_JobTitle_Validators = (AttributeValidator[])setupAttribMetaData_JobTitle(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_JobDescription_Validators = (AttributeValidator[])setupAttribMetaData_JobDescription(validatorMapping).toArray (new AttributeValidator[0]); FIELD_JobDescription_Validators = (AttributeValidator[])setupAttribMetaData_JobDescription(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -807,6 +812,24 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -807,6 +812,24 @@ public abstract class BaseJob extends BaseBusinessClass
} }
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_SuggestedAssessmentType(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("name", "SuggestedAssessmentType");
metaInfo.put ("type", "AssessmentType");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.SuggestedAssessmentType:", metaInfo);
ATTRIBUTES_METADATA_Job.put (FIELD_SuggestedAssessmentType, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Job.class, "SuggestedAssessmentType", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Job.SuggestedAssessmentType:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_RankingCompleted(Map validatorMapping) private static List setupAttribMetaData_RankingCompleted(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -1393,6 +1416,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -1393,6 +1416,7 @@ public abstract class BaseJob extends BaseBusinessClass
_AssessmentTemplateName = (String)(HELPER_AssessmentTemplateName.initialise (_AssessmentTemplateName)); _AssessmentTemplateName = (String)(HELPER_AssessmentTemplateName.initialise (_AssessmentTemplateName));
_CultureTemplateName = (String)(HELPER_CultureTemplateName.initialise (_CultureTemplateName)); _CultureTemplateName = (String)(HELPER_CultureTemplateName.initialise (_CultureTemplateName));
_AppProcessOption = (AppProcessOption)(HELPER_AppProcessOption.initialise (_AppProcessOption)); _AppProcessOption = (AppProcessOption)(HELPER_AppProcessOption.initialise (_AppProcessOption));
_SuggestedAssessmentType = (AssessmentType)(HELPER_SuggestedAssessmentType.initialise (_SuggestedAssessmentType));
_RankingCompleted = (Boolean)(HELPER_RankingCompleted.initialise (_RankingCompleted)); _RankingCompleted = (Boolean)(HELPER_RankingCompleted.initialise (_RankingCompleted));
} }
...@@ -5283,6 +5307,104 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -5283,6 +5307,104 @@ public abstract class BaseJob extends BaseBusinessClass
} }
/** /**
* Get the attribute SuggestedAssessmentType
*/
public AssessmentType getSuggestedAssessmentType ()
{
assertValid();
AssessmentType valToReturn = _SuggestedAssessmentType;
for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
{
valToReturn = bhd.getSuggestedAssessmentType ((Job)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 preSuggestedAssessmentTypeChange (AssessmentType newSuggestedAssessmentType) 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 postSuggestedAssessmentTypeChange () throws FieldException
{
}
public FieldWriteability getWriteability_SuggestedAssessmentType ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute SuggestedAssessmentType. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setSuggestedAssessmentType (AssessmentType newSuggestedAssessmentType) throws FieldException
{
boolean oldAndNewIdentical = HELPER_SuggestedAssessmentType.compare (_SuggestedAssessmentType, newSuggestedAssessmentType);
try
{
for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
{
newSuggestedAssessmentType = bhd.setSuggestedAssessmentType ((Job)this, newSuggestedAssessmentType);
oldAndNewIdentical = HELPER_SuggestedAssessmentType.compare (_SuggestedAssessmentType, newSuggestedAssessmentType);
}
if (FIELD_SuggestedAssessmentType_Validators.length > 0)
{
Object newSuggestedAssessmentTypeObj = HELPER_SuggestedAssessmentType.toObject (newSuggestedAssessmentType);
if (newSuggestedAssessmentTypeObj != null)
{
int loopMax = FIELD_SuggestedAssessmentType_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_SuggestedAssessmentType);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_SuggestedAssessmentType_Validators[v].checkAttribute (this, FIELD_SuggestedAssessmentType, metadata, newSuggestedAssessmentTypeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_SuggestedAssessmentType () != FieldWriteability.FALSE, "Field SuggestedAssessmentType is not writeable");
preSuggestedAssessmentTypeChange (newSuggestedAssessmentType);
markFieldChange (FIELD_SuggestedAssessmentType);
_SuggestedAssessmentType = newSuggestedAssessmentType;
postFieldChange (FIELD_SuggestedAssessmentType);
postSuggestedAssessmentTypeChange ();
}
}
/**
* Get the attribute RankingCompleted * Get the attribute RankingCompleted
*/ */
public Boolean getRankingCompleted () public Boolean getRankingCompleted ()
...@@ -7901,6 +8023,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -7901,6 +8023,7 @@ public abstract class BaseJob extends BaseBusinessClass
_AssessmentTemplateName = sourceJob._AssessmentTemplateName; _AssessmentTemplateName = sourceJob._AssessmentTemplateName;
_CultureTemplateName = sourceJob._CultureTemplateName; _CultureTemplateName = sourceJob._CultureTemplateName;
_AppProcessOption = sourceJob._AppProcessOption; _AppProcessOption = sourceJob._AppProcessOption;
_SuggestedAssessmentType = sourceJob._SuggestedAssessmentType;
_RankingCompleted = sourceJob._RankingCompleted; _RankingCompleted = sourceJob._RankingCompleted;
} }
...@@ -8013,6 +8136,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -8013,6 +8136,7 @@ public abstract class BaseJob extends BaseBusinessClass
_AssessmentTemplateName = (String)(HELPER_AssessmentTemplateName.readExternal (_AssessmentTemplateName, vals.get(FIELD_AssessmentTemplateName))); // _AssessmentTemplateName = (String)(HELPER_AssessmentTemplateName.readExternal (_AssessmentTemplateName, vals.get(FIELD_AssessmentTemplateName))); //
_CultureTemplateName = (String)(HELPER_CultureTemplateName.readExternal (_CultureTemplateName, vals.get(FIELD_CultureTemplateName))); // _CultureTemplateName = (String)(HELPER_CultureTemplateName.readExternal (_CultureTemplateName, vals.get(FIELD_CultureTemplateName))); //
_AppProcessOption = (AppProcessOption)(HELPER_AppProcessOption.readExternal (_AppProcessOption, vals.get(FIELD_AppProcessOption))); // _AppProcessOption = (AppProcessOption)(HELPER_AppProcessOption.readExternal (_AppProcessOption, vals.get(FIELD_AppProcessOption))); //
_SuggestedAssessmentType = (AssessmentType)(HELPER_SuggestedAssessmentType.readExternal (_SuggestedAssessmentType, vals.get(FIELD_SuggestedAssessmentType))); //
_RankingCompleted = (Boolean)(HELPER_RankingCompleted.readExternal (_RankingCompleted, vals.get(FIELD_RankingCompleted))); // _RankingCompleted = (Boolean)(HELPER_RankingCompleted.readExternal (_RankingCompleted, vals.get(FIELD_RankingCompleted))); //
_CultureTemplate.readExternalData(vals.get(SINGLEREFERENCE_CultureTemplate)); _CultureTemplate.readExternalData(vals.get(SINGLEREFERENCE_CultureTemplate));
_JobTemplate.readExternalData(vals.get(SINGLEREFERENCE_JobTemplate)); _JobTemplate.readExternalData(vals.get(SINGLEREFERENCE_JobTemplate));
...@@ -8080,6 +8204,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -8080,6 +8204,7 @@ public abstract class BaseJob extends BaseBusinessClass
vals.put (FIELD_AssessmentTemplateName, HELPER_AssessmentTemplateName.writeExternal (_AssessmentTemplateName)); vals.put (FIELD_AssessmentTemplateName, HELPER_AssessmentTemplateName.writeExternal (_AssessmentTemplateName));
vals.put (FIELD_CultureTemplateName, HELPER_CultureTemplateName.writeExternal (_CultureTemplateName)); vals.put (FIELD_CultureTemplateName, HELPER_CultureTemplateName.writeExternal (_CultureTemplateName));
vals.put (FIELD_AppProcessOption, HELPER_AppProcessOption.writeExternal (_AppProcessOption)); vals.put (FIELD_AppProcessOption, HELPER_AppProcessOption.writeExternal (_AppProcessOption));
vals.put (FIELD_SuggestedAssessmentType, HELPER_SuggestedAssessmentType.writeExternal (_SuggestedAssessmentType));
vals.put (FIELD_RankingCompleted, HELPER_RankingCompleted.writeExternal (_RankingCompleted)); vals.put (FIELD_RankingCompleted, HELPER_RankingCompleted.writeExternal (_RankingCompleted));
vals.put (SINGLEREFERENCE_CultureTemplate, _CultureTemplate.writeExternalData()); vals.put (SINGLEREFERENCE_CultureTemplate, _CultureTemplate.writeExternalData());
vals.put (SINGLEREFERENCE_JobTemplate, _JobTemplate.writeExternalData()); vals.put (SINGLEREFERENCE_JobTemplate, _JobTemplate.writeExternalData());
...@@ -8257,6 +8382,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -8257,6 +8382,7 @@ public abstract class BaseJob extends BaseBusinessClass
visitor.visitField(this, FIELD_AssessmentTemplateName, HELPER_AssessmentTemplateName.toObject(getAssessmentTemplateName())); visitor.visitField(this, FIELD_AssessmentTemplateName, HELPER_AssessmentTemplateName.toObject(getAssessmentTemplateName()));
visitor.visitField(this, FIELD_CultureTemplateName, HELPER_CultureTemplateName.toObject(getCultureTemplateName())); visitor.visitField(this, FIELD_CultureTemplateName, HELPER_CultureTemplateName.toObject(getCultureTemplateName()));
visitor.visitField(this, FIELD_AppProcessOption, HELPER_AppProcessOption.toObject(getAppProcessOption())); visitor.visitField(this, FIELD_AppProcessOption, HELPER_AppProcessOption.toObject(getAppProcessOption()));
visitor.visitField(this, FIELD_SuggestedAssessmentType, HELPER_SuggestedAssessmentType.toObject(getSuggestedAssessmentType()));
visitor.visitField(this, FIELD_RankingCompleted, HELPER_RankingCompleted.toObject(getRankingCompleted())); visitor.visitField(this, FIELD_RankingCompleted, HELPER_RankingCompleted.toObject(getRankingCompleted()));
} }
...@@ -9786,6 +9912,10 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -9786,6 +9912,10 @@ public abstract class BaseJob extends BaseBusinessClass
{ {
return HELPER_AppProcessOption.toObject (getAppProcessOption ()); return HELPER_AppProcessOption.toObject (getAppProcessOption ());
} }
else if (attribName.equals (FIELD_SuggestedAssessmentType))
{
return HELPER_SuggestedAssessmentType.toObject (getSuggestedAssessmentType ());
}
else if (attribName.equals (FIELD_RankingCompleted)) else if (attribName.equals (FIELD_RankingCompleted))
{ {
return HELPER_RankingCompleted.toObject (getRankingCompleted ()); return HELPER_RankingCompleted.toObject (getRankingCompleted ());
...@@ -9959,6 +10089,10 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -9959,6 +10089,10 @@ public abstract class BaseJob extends BaseBusinessClass
{ {
return HELPER_AppProcessOption; return HELPER_AppProcessOption;
} }
else if (attribName.equals (FIELD_SuggestedAssessmentType))
{
return HELPER_SuggestedAssessmentType;
}
else if (attribName.equals (FIELD_RankingCompleted)) else if (attribName.equals (FIELD_RankingCompleted))
{ {
return HELPER_RankingCompleted; return HELPER_RankingCompleted;
...@@ -10132,6 +10266,10 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -10132,6 +10266,10 @@ public abstract class BaseJob extends BaseBusinessClass
{ {
setAppProcessOption ((AppProcessOption)(HELPER_AppProcessOption.fromObject (_AppProcessOption, attribValue))); setAppProcessOption ((AppProcessOption)(HELPER_AppProcessOption.fromObject (_AppProcessOption, attribValue)));
} }
else if (attribName.equals (FIELD_SuggestedAssessmentType))
{
setSuggestedAssessmentType ((AssessmentType)(HELPER_SuggestedAssessmentType.fromObject (_SuggestedAssessmentType, attribValue)));
}
else if (attribName.equals (FIELD_RankingCompleted)) else if (attribName.equals (FIELD_RankingCompleted))
{ {
setRankingCompleted ((Boolean)(HELPER_RankingCompleted.fromObject (_RankingCompleted, attribValue))); setRankingCompleted ((Boolean)(HELPER_RankingCompleted.fromObject (_RankingCompleted, attribValue)));
...@@ -10364,6 +10502,10 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -10364,6 +10502,10 @@ public abstract class BaseJob extends BaseBusinessClass
{ {
return getWriteability_AppProcessOption (); return getWriteability_AppProcessOption ();
} }
else if (fieldName.equals (FIELD_SuggestedAssessmentType))
{
return getWriteability_SuggestedAssessmentType ();
}
else if (fieldName.equals (FIELD_RankingCompleted)) else if (fieldName.equals (FIELD_RankingCompleted))
{ {
return getWriteability_RankingCompleted (); return getWriteability_RankingCompleted ();
...@@ -10585,6 +10727,11 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -10585,6 +10727,11 @@ public abstract class BaseJob extends BaseBusinessClass
fields.add (FIELD_AppProcessOption); fields.add (FIELD_AppProcessOption);
} }
if (getWriteability_SuggestedAssessmentType () != FieldWriteability.TRUE)
{
fields.add (FIELD_SuggestedAssessmentType);
}
if (getWriteability_RankingCompleted () != FieldWriteability.TRUE) if (getWriteability_RankingCompleted () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_RankingCompleted); fields.add (FIELD_RankingCompleted);
...@@ -10638,6 +10785,7 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -10638,6 +10785,7 @@ public abstract class BaseJob extends BaseBusinessClass
result.add(HELPER_AssessmentTemplateName.getAttribObject (getClass (), _AssessmentTemplateName, false, FIELD_AssessmentTemplateName)); result.add(HELPER_AssessmentTemplateName.getAttribObject (getClass (), _AssessmentTemplateName, false, FIELD_AssessmentTemplateName));
result.add(HELPER_CultureTemplateName.getAttribObject (getClass (), _CultureTemplateName, false, FIELD_CultureTemplateName)); result.add(HELPER_CultureTemplateName.getAttribObject (getClass (), _CultureTemplateName, false, FIELD_CultureTemplateName));
result.add(HELPER_AppProcessOption.getAttribObject (getClass (), _AppProcessOption, false, FIELD_AppProcessOption)); result.add(HELPER_AppProcessOption.getAttribObject (getClass (), _AppProcessOption, false, FIELD_AppProcessOption));
result.add(HELPER_SuggestedAssessmentType.getAttribObject (getClass (), _SuggestedAssessmentType, false, FIELD_SuggestedAssessmentType));
result.add(HELPER_RankingCompleted.getAttribObject (getClass (), _RankingCompleted, false, FIELD_RankingCompleted)); result.add(HELPER_RankingCompleted.getAttribObject (getClass (), _RankingCompleted, false, FIELD_RankingCompleted));
return result; return result;
...@@ -11392,6 +11540,24 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -11392,6 +11540,24 @@ public abstract class BaseJob extends BaseBusinessClass
} }
/** /**
* Get the attribute SuggestedAssessmentType
*/
public AssessmentType getSuggestedAssessmentType (Job obj, AssessmentType original)
{
return original;
}
/**
* Change the value set for attribute SuggestedAssessmentType.
* May modify the field beforehand
* Occurs before validation.
*/
public AssessmentType setSuggestedAssessmentType (Job obj, AssessmentType newSuggestedAssessmentType) throws FieldException
{
return newSuggestedAssessmentType;
}
/**
* Get the attribute RankingCompleted * Get the attribute RankingCompleted
*/ */
public Boolean getRankingCompleted (Job obj, Boolean original) public Boolean getRankingCompleted (Job obj, Boolean original)
...@@ -11529,6 +11695,10 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -11529,6 +11695,10 @@ public abstract class BaseJob extends BaseBusinessClass
{ {
return toAppProcessOption (); return toAppProcessOption ();
} }
if (name.equals ("SuggestedAssessmentType"))
{
return toSuggestedAssessmentType ();
}
if (name.equals ("RankingCompleted")) if (name.equals ("RankingCompleted"))
{ {
return toRankingCompleted (); return toRankingCompleted ();
...@@ -11717,6 +11887,8 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -11717,6 +11887,8 @@ public abstract class BaseJob extends BaseBusinessClass
public PipeLine<From, AppProcessOption> toAppProcessOption () { return pipe(new ORMAttributePipe<Me, AppProcessOption>(FIELD_AppProcessOption)); } public PipeLine<From, AppProcessOption> toAppProcessOption () { return pipe(new ORMAttributePipe<Me, AppProcessOption>(FIELD_AppProcessOption)); }
public PipeLine<From, AssessmentType> toSuggestedAssessmentType () { return pipe(new ORMAttributePipe<Me, AssessmentType>(FIELD_SuggestedAssessmentType)); }
public PipeLine<From, Boolean> toRankingCompleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_RankingCompleted)); } public PipeLine<From, Boolean> toRankingCompleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_RankingCompleted)); }
public PipeLine<From, String> toJobTitle () { return pipe(new ORMAttributePipe<Me, String>(FIELD_JobTitle)); } public PipeLine<From, String> toJobTitle () { return pipe(new ORMAttributePipe<Me, String>(FIELD_JobTitle)); }
...@@ -11937,6 +12109,11 @@ public abstract class BaseJob extends BaseBusinessClass ...@@ -11937,6 +12109,11 @@ public abstract class BaseJob extends BaseBusinessClass
return true; return true;
} }
if(CollectionUtils.equals(attribName, "SuggestedAssessmentType"))
{
return true;
}
if(CollectionUtils.equals(attribName, "RankingCompleted")) if(CollectionUtils.equals(attribName, "RankingCompleted"))
{ {
return true; return true;
......
...@@ -44,7 +44,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -44,7 +44,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
public static final String FIELD_Name = "Name"; public static final String FIELD_Name = "Name";
public static final String FIELD_Level = "Level"; public static final String FIELD_Level = "Level";
public static final String FIELD_AssessmentType = "AssessmentType"; public static final String FIELD_AssessmentType = "AssessmentType";
public static final String FIELD_PartTimeAssessmentType = "PartTimeAssessmentType";
public static final String SINGLEREFERENCE_AssessmentLevel = "AssessmentLevel"; public static final String SINGLEREFERENCE_AssessmentLevel = "AssessmentLevel";
public static final String SINGLEREFERENCE_ExpressAssessmentLevel = "ExpressAssessmentLevel";
public static final String SINGLEREFERENCE_ParentOccupation = "ParentOccupation"; public static final String SINGLEREFERENCE_ParentOccupation = "ParentOccupation";
public static final String BACKREF_ParentOccupation = ""; public static final String BACKREF_ParentOccupation = "";
public static final String MULTIPLEREFERENCE_ChildOccupations = "ChildOccupations"; public static final String MULTIPLEREFERENCE_ChildOccupations = "ChildOccupations";
...@@ -59,6 +61,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -59,6 +61,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
private static final DefaultAttributeHelper<Occupation> HELPER_Name = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Occupation> HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<Occupation, OccupationLevel> HELPER_Level = new EnumeratedAttributeHelper<Occupation, OccupationLevel> (OccupationLevel.FACTORY_OccupationLevel); private static final EnumeratedAttributeHelper<Occupation, OccupationLevel> HELPER_Level = new EnumeratedAttributeHelper<Occupation, OccupationLevel> (OccupationLevel.FACTORY_OccupationLevel);
private static final EnumeratedAttributeHelper<Occupation, AssessmentType> HELPER_AssessmentType = new EnumeratedAttributeHelper<Occupation, AssessmentType> (AssessmentType.FACTORY_AssessmentType); private static final EnumeratedAttributeHelper<Occupation, AssessmentType> HELPER_AssessmentType = new EnumeratedAttributeHelper<Occupation, AssessmentType> (AssessmentType.FACTORY_AssessmentType);
private static final EnumeratedAttributeHelper<Occupation, AssessmentType> HELPER_PartTimeAssessmentType = new EnumeratedAttributeHelper<Occupation, AssessmentType> (AssessmentType.FACTORY_AssessmentType);
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
...@@ -66,10 +69,12 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -66,10 +69,12 @@ public abstract class BaseOccupation extends BaseBusinessClass
private String _Name; private String _Name;
private OccupationLevel _Level; private OccupationLevel _Level;
private AssessmentType _AssessmentType; private AssessmentType _AssessmentType;
private AssessmentType _PartTimeAssessmentType;
// Private attributes corresponding to single references // Private attributes corresponding to single references
private SingleAssociation<Occupation, Level> _AssessmentLevel; private SingleAssociation<Occupation, Level> _AssessmentLevel;
private SingleAssociation<Occupation, Level> _ExpressAssessmentLevel;
private SingleAssociation<Occupation, Occupation> _ParentOccupation; private SingleAssociation<Occupation, Occupation> _ParentOccupation;
...@@ -85,6 +90,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -85,6 +90,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
private static final AttributeValidator[] FIELD_Name_Validators; private static final AttributeValidator[] FIELD_Name_Validators;
private static final AttributeValidator[] FIELD_Level_Validators; private static final AttributeValidator[] FIELD_Level_Validators;
private static final AttributeValidator[] FIELD_AssessmentType_Validators; private static final AttributeValidator[] FIELD_AssessmentType_Validators;
private static final AttributeValidator[] FIELD_PartTimeAssessmentType_Validators;
// Arrays of behaviour decorators // Arrays of behaviour decorators
...@@ -102,11 +108,13 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -102,11 +108,13 @@ public abstract class BaseOccupation extends BaseBusinessClass
setupAssocMetaData_ChildOccupations(); setupAssocMetaData_ChildOccupations();
setupAssocMetaData_AssessmentLevel(); setupAssocMetaData_AssessmentLevel();
setupAssocMetaData_ExpressAssessmentLevel();
setupAssocMetaData_ParentOccupation(); setupAssocMetaData_ParentOccupation();
FIELD_Code_Validators = (AttributeValidator[])setupAttribMetaData_Code(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Code_Validators = (AttributeValidator[])setupAttribMetaData_Code(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Name_Validators = (AttributeValidator[])setupAttribMetaData_Name(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Name_Validators = (AttributeValidator[])setupAttribMetaData_Name(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Level_Validators = (AttributeValidator[])setupAttribMetaData_Level(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Level_Validators = (AttributeValidator[])setupAttribMetaData_Level(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_AssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_AssessmentType(validatorMapping).toArray (new AttributeValidator[0]); FIELD_AssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_AssessmentType(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_PartTimeAssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_PartTimeAssessmentType(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_Occupation.initialiseReference (); REFERENCE_Occupation.initialiseReference ();
...@@ -150,6 +158,20 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -150,6 +158,20 @@ public abstract class BaseOccupation extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static void setupAssocMetaData_ExpressAssessmentLevel()
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "express_assessment_level_id");
metaInfo.put ("name", "ExpressAssessmentLevel");
metaInfo.put ("type", "Level");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.ExpressAssessmentLevel:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (SINGLEREFERENCE_ExpressAssessmentLevel, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_ParentOccupation() private static void setupAssocMetaData_ParentOccupation()
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -244,6 +266,25 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -244,6 +266,25 @@ public abstract class BaseOccupation extends BaseBusinessClass
return validators; return validators;
} }
// Meta Info setup
private static List setupAttribMetaData_PartTimeAssessmentType(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "parttime_assessment_type");
metaInfo.put ("name", "PartTimeAssessmentType");
metaInfo.put ("type", "AssessmentType");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.PartTimeAssessmentType:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (FIELD_PartTimeAssessmentType, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Occupation.class, "PartTimeAssessmentType", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Occupation.PartTimeAssessmentType:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION // END OF STATIC METADATA DEFINITION
...@@ -275,6 +316,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -275,6 +316,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Name = (String)(HELPER_Name.initialise (_Name)); _Name = (String)(HELPER_Name.initialise (_Name));
_Level = (OccupationLevel)(HELPER_Level.initialise (_Level)); _Level = (OccupationLevel)(HELPER_Level.initialise (_Level));
_AssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (_AssessmentType)); _AssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (_AssessmentType));
_PartTimeAssessmentType = (AssessmentType)(HELPER_PartTimeAssessmentType.initialise (_PartTimeAssessmentType));
} }
...@@ -284,6 +326,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -284,6 +326,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
super._initialiseAssociations (); super._initialiseAssociations ();
_AssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_AssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation"); _AssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_AssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation");
_ExpressAssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_ExpressAssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation");
_ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation"); _ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation");
_ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation); _ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation);
...@@ -296,6 +339,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -296,6 +339,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
super.initialiseReference (); super.initialiseReference ();
_AssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_AssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation"); _AssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_AssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation");
_ExpressAssessmentLevel = new SingleAssociation<Occupation, Level> (this, SINGLEREFERENCE_ExpressAssessmentLevel, null, Level.REFERENCE_Level, "tl_occupation");
_ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation"); _ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation");
_ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation); _ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation);
...@@ -700,6 +744,104 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -700,6 +744,104 @@ public abstract class BaseOccupation extends BaseBusinessClass
} }
} }
/**
* Get the attribute PartTimeAssessmentType
*/
public AssessmentType getPartTimeAssessmentType ()
{
assertValid();
AssessmentType valToReturn = _PartTimeAssessmentType;
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
valToReturn = bhd.getPartTimeAssessmentType ((Occupation)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void prePartTimeAssessmentTypeChange (AssessmentType newPartTimeAssessmentType) 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 postPartTimeAssessmentTypeChange () throws FieldException
{
}
public FieldWriteability getWriteability_PartTimeAssessmentType ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute PartTimeAssessmentType. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setPartTimeAssessmentType (AssessmentType newPartTimeAssessmentType) throws FieldException
{
boolean oldAndNewIdentical = HELPER_PartTimeAssessmentType.compare (_PartTimeAssessmentType, newPartTimeAssessmentType);
try
{
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
newPartTimeAssessmentType = bhd.setPartTimeAssessmentType ((Occupation)this, newPartTimeAssessmentType);
oldAndNewIdentical = HELPER_PartTimeAssessmentType.compare (_PartTimeAssessmentType, newPartTimeAssessmentType);
}
if (FIELD_PartTimeAssessmentType_Validators.length > 0)
{
Object newPartTimeAssessmentTypeObj = HELPER_PartTimeAssessmentType.toObject (newPartTimeAssessmentType);
if (newPartTimeAssessmentTypeObj != null)
{
int loopMax = FIELD_PartTimeAssessmentType_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Occupation.get (FIELD_PartTimeAssessmentType);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_PartTimeAssessmentType_Validators[v].checkAttribute (this, FIELD_PartTimeAssessmentType, metadata, newPartTimeAssessmentTypeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_PartTimeAssessmentType () != FieldWriteability.FALSE, "Field PartTimeAssessmentType is not writeable");
prePartTimeAssessmentTypeChange (newPartTimeAssessmentType);
markFieldChange (FIELD_PartTimeAssessmentType);
_PartTimeAssessmentType = newPartTimeAssessmentType;
postFieldChange (FIELD_PartTimeAssessmentType);
postPartTimeAssessmentTypeChange ();
}
}
/** /**
...@@ -712,6 +854,8 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -712,6 +854,8 @@ public abstract class BaseOccupation extends BaseBusinessClass
result.add("AssessmentLevel"); result.add("AssessmentLevel");
result.add("ExpressAssessmentLevel");
result.add("ParentOccupation"); result.add("ParentOccupation");
...@@ -728,6 +872,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -728,6 +872,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{ {
return _AssessmentLevel.getReferencedType (); return _AssessmentLevel.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
return _ExpressAssessmentLevel.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) }else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return _ParentOccupation.getReferencedType (); return _ParentOccupation.getReferencedType ();
...@@ -748,6 +895,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -748,6 +895,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{ {
return null ; return null ;
}else if (assocName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
return null ;
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) }else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return Occupation.MULTIPLEREFERENCE_ChildOccupations ; return Occupation.MULTIPLEREFERENCE_ChildOccupations ;
...@@ -768,6 +918,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -768,6 +918,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{ {
return getAssessmentLevel (); return getAssessmentLevel ();
}else if (assocName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
return getExpressAssessmentLevel ();
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) }else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getParentOccupation (); return getParentOccupation ();
...@@ -788,6 +941,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -788,6 +941,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{ {
return getAssessmentLevel (getType); return getAssessmentLevel (getType);
}else if (assocName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
return getExpressAssessmentLevel (getType);
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) }else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getParentOccupation (getType); return getParentOccupation (getType);
...@@ -808,6 +964,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -808,6 +964,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{ {
return getAssessmentLevelID (); return getAssessmentLevelID ();
}else if (assocName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
return getExpressAssessmentLevelID ();
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) }else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getParentOccupationID (); return getParentOccupationID ();
...@@ -828,6 +987,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -828,6 +987,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel)) else if (assocName.equals (SINGLEREFERENCE_AssessmentLevel))
{ {
setAssessmentLevel ((Level)(newValue)); setAssessmentLevel ((Level)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
setExpressAssessmentLevel ((Level)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_ParentOccupation)) }else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
setParentOccupation ((Occupation)(newValue)); setParentOccupation ((Occupation)(newValue));
...@@ -935,6 +1097,100 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -935,6 +1097,100 @@ public abstract class BaseOccupation extends BaseBusinessClass
} }
/** /**
* Get the reference ExpressAssessmentLevel
*/
public Level getExpressAssessmentLevel () throws StorageException
{
assertValid();
try
{
return (Level)(_ExpressAssessmentLevel.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Occupation:", this.getObjectID (), ", was trying to get Level:", getExpressAssessmentLevelID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _ExpressAssessmentLevel.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Level getExpressAssessmentLevel (Get getType) throws StorageException
{
assertValid();
return _ExpressAssessmentLevel.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getExpressAssessmentLevelID ()
{
assertValid();
if (_ExpressAssessmentLevel == null)
{
return null;
}
else
{
return _ExpressAssessmentLevel.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 preExpressAssessmentLevelChange (Level newExpressAssessmentLevel) 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 postExpressAssessmentLevelChange () throws FieldException
{
}
public FieldWriteability getWriteability_ExpressAssessmentLevel ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference ExpressAssessmentLevel. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setExpressAssessmentLevel (Level newExpressAssessmentLevel) throws StorageException, FieldException
{
if (_ExpressAssessmentLevel.wouldReferencedChange (newExpressAssessmentLevel))
{
assertValid();
Debug.assertion (getWriteability_ExpressAssessmentLevel () != FieldWriteability.FALSE, "Assoc ExpressAssessmentLevel is not writeable");
preExpressAssessmentLevelChange (newExpressAssessmentLevel);
_ExpressAssessmentLevel.set (newExpressAssessmentLevel);
postExpressAssessmentLevelChange ();
}
}
/**
* Get the reference ParentOccupation * Get the reference ParentOccupation
*/ */
public Occupation getParentOccupation () throws StorageException public Occupation getParentOccupation () throws StorageException
...@@ -1339,7 +1595,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1339,7 +1595,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
tl_occupationPSet.setAttrib (FIELD_Name, HELPER_Name.toObject (_Name)); // tl_occupationPSet.setAttrib (FIELD_Name, HELPER_Name.toObject (_Name)); //
tl_occupationPSet.setAttrib (FIELD_Level, HELPER_Level.toObject (_Level)); // tl_occupationPSet.setAttrib (FIELD_Level, HELPER_Level.toObject (_Level)); //
tl_occupationPSet.setAttrib (FIELD_AssessmentType, HELPER_AssessmentType.toObject (_AssessmentType)); // tl_occupationPSet.setAttrib (FIELD_AssessmentType, HELPER_AssessmentType.toObject (_AssessmentType)); //
tl_occupationPSet.setAttrib (FIELD_PartTimeAssessmentType, HELPER_PartTimeAssessmentType.toObject (_PartTimeAssessmentType)); //
_AssessmentLevel.getPersistentSets (allSets); _AssessmentLevel.getPersistentSets (allSets);
_ExpressAssessmentLevel.getPersistentSets (allSets);
_ParentOccupation.getPersistentSets (allSets); _ParentOccupation.getPersistentSets (allSets);
} }
...@@ -1359,7 +1617,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1359,7 +1617,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Name = (String)(HELPER_Name.fromObject (_Name, tl_occupationPSet.getAttrib (FIELD_Name))); // _Name = (String)(HELPER_Name.fromObject (_Name, tl_occupationPSet.getAttrib (FIELD_Name))); //
_Level = (OccupationLevel)(HELPER_Level.fromObject (_Level, tl_occupationPSet.getAttrib (FIELD_Level))); // _Level = (OccupationLevel)(HELPER_Level.fromObject (_Level, tl_occupationPSet.getAttrib (FIELD_Level))); //
_AssessmentType = (AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, tl_occupationPSet.getAttrib (FIELD_AssessmentType))); // _AssessmentType = (AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, tl_occupationPSet.getAttrib (FIELD_AssessmentType))); //
_PartTimeAssessmentType = (AssessmentType)(HELPER_PartTimeAssessmentType.fromObject (_PartTimeAssessmentType, tl_occupationPSet.getAttrib (FIELD_PartTimeAssessmentType))); //
_AssessmentLevel.setFromPersistentSets (objectID, allSets); _AssessmentLevel.setFromPersistentSets (objectID, allSets);
_ExpressAssessmentLevel.setFromPersistentSets (objectID, allSets);
_ParentOccupation.setFromPersistentSets (objectID, allSets); _ParentOccupation.setFromPersistentSets (objectID, allSets);
} }
...@@ -1412,6 +1672,15 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1412,6 +1672,15 @@ public abstract class BaseOccupation extends BaseBusinessClass
e.addException (ex); e.addException (ex);
} }
try
{
setPartTimeAssessmentType (otherOccupation.getPartTimeAssessmentType ());
}
catch (FieldException ex)
{
e.addException (ex);
}
} }
} }
...@@ -1431,6 +1700,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1431,6 +1700,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Name = sourceOccupation._Name; _Name = sourceOccupation._Name;
_Level = sourceOccupation._Level; _Level = sourceOccupation._Level;
_AssessmentType = sourceOccupation._AssessmentType; _AssessmentType = sourceOccupation._AssessmentType;
_PartTimeAssessmentType = sourceOccupation._PartTimeAssessmentType;
} }
} }
...@@ -1448,6 +1718,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1448,6 +1718,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
BaseOccupation sourceOccupation = (BaseOccupation)(source); BaseOccupation sourceOccupation = (BaseOccupation)(source);
_AssessmentLevel.copyFrom (sourceOccupation._AssessmentLevel, linkToGhosts); _AssessmentLevel.copyFrom (sourceOccupation._AssessmentLevel, linkToGhosts);
_ExpressAssessmentLevel.copyFrom (sourceOccupation._ExpressAssessmentLevel, linkToGhosts);
_ParentOccupation.copyFrom (sourceOccupation._ParentOccupation, linkToGhosts); _ParentOccupation.copyFrom (sourceOccupation._ParentOccupation, linkToGhosts);
} }
...@@ -1490,7 +1761,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1490,7 +1761,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
_Name = (String)(HELPER_Name.readExternal (_Name, vals.get(FIELD_Name))); // _Name = (String)(HELPER_Name.readExternal (_Name, vals.get(FIELD_Name))); //
_Level = (OccupationLevel)(HELPER_Level.readExternal (_Level, vals.get(FIELD_Level))); // _Level = (OccupationLevel)(HELPER_Level.readExternal (_Level, vals.get(FIELD_Level))); //
_AssessmentType = (AssessmentType)(HELPER_AssessmentType.readExternal (_AssessmentType, vals.get(FIELD_AssessmentType))); // _AssessmentType = (AssessmentType)(HELPER_AssessmentType.readExternal (_AssessmentType, vals.get(FIELD_AssessmentType))); //
_PartTimeAssessmentType = (AssessmentType)(HELPER_PartTimeAssessmentType.readExternal (_PartTimeAssessmentType, vals.get(FIELD_PartTimeAssessmentType))); //
_AssessmentLevel.readExternalData(vals.get(SINGLEREFERENCE_AssessmentLevel)); _AssessmentLevel.readExternalData(vals.get(SINGLEREFERENCE_AssessmentLevel));
_ExpressAssessmentLevel.readExternalData(vals.get(SINGLEREFERENCE_ExpressAssessmentLevel));
_ParentOccupation.readExternalData(vals.get(SINGLEREFERENCE_ParentOccupation)); _ParentOccupation.readExternalData(vals.get(SINGLEREFERENCE_ParentOccupation));
_ChildOccupations.readExternalData(vals.get(MULTIPLEREFERENCE_ChildOccupations)); _ChildOccupations.readExternalData(vals.get(MULTIPLEREFERENCE_ChildOccupations));
...@@ -1508,7 +1781,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1508,7 +1781,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
vals.put (FIELD_Name, HELPER_Name.writeExternal (_Name)); vals.put (FIELD_Name, HELPER_Name.writeExternal (_Name));
vals.put (FIELD_Level, HELPER_Level.writeExternal (_Level)); vals.put (FIELD_Level, HELPER_Level.writeExternal (_Level));
vals.put (FIELD_AssessmentType, HELPER_AssessmentType.writeExternal (_AssessmentType)); vals.put (FIELD_AssessmentType, HELPER_AssessmentType.writeExternal (_AssessmentType));
vals.put (FIELD_PartTimeAssessmentType, HELPER_PartTimeAssessmentType.writeExternal (_PartTimeAssessmentType));
vals.put (SINGLEREFERENCE_AssessmentLevel, _AssessmentLevel.writeExternalData()); vals.put (SINGLEREFERENCE_AssessmentLevel, _AssessmentLevel.writeExternalData());
vals.put (SINGLEREFERENCE_ExpressAssessmentLevel, _ExpressAssessmentLevel.writeExternalData());
vals.put (SINGLEREFERENCE_ParentOccupation, _ParentOccupation.writeExternalData()); vals.put (SINGLEREFERENCE_ParentOccupation, _ParentOccupation.writeExternalData());
vals.put (MULTIPLEREFERENCE_ChildOccupations, _ChildOccupations.writeExternalData()); vals.put (MULTIPLEREFERENCE_ChildOccupations, _ChildOccupations.writeExternalData());
...@@ -1540,9 +1815,14 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1540,9 +1815,14 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
listener.notifyFieldChange(this, other, FIELD_AssessmentType, HELPER_AssessmentType.toObject(this._AssessmentType), HELPER_AssessmentType.toObject(otherOccupation._AssessmentType)); listener.notifyFieldChange(this, other, FIELD_AssessmentType, HELPER_AssessmentType.toObject(this._AssessmentType), HELPER_AssessmentType.toObject(otherOccupation._AssessmentType));
} }
if (!HELPER_PartTimeAssessmentType.compare(this._PartTimeAssessmentType, otherOccupation._PartTimeAssessmentType))
{
listener.notifyFieldChange(this, other, FIELD_PartTimeAssessmentType, HELPER_PartTimeAssessmentType.toObject(this._PartTimeAssessmentType), HELPER_PartTimeAssessmentType.toObject(otherOccupation._PartTimeAssessmentType));
}
// Compare single assocs // Compare single assocs
_AssessmentLevel.compare (otherOccupation._AssessmentLevel, listener); _AssessmentLevel.compare (otherOccupation._AssessmentLevel, listener);
_ExpressAssessmentLevel.compare (otherOccupation._ExpressAssessmentLevel, listener);
_ParentOccupation.compare (otherOccupation._ParentOccupation, listener); _ParentOccupation.compare (otherOccupation._ParentOccupation, listener);
...@@ -1569,7 +1849,9 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1569,7 +1849,9 @@ public abstract class BaseOccupation extends BaseBusinessClass
visitor.visitField(this, FIELD_Name, HELPER_Name.toObject(getName())); visitor.visitField(this, FIELD_Name, HELPER_Name.toObject(getName()));
visitor.visitField(this, FIELD_Level, HELPER_Level.toObject(getLevel())); visitor.visitField(this, FIELD_Level, HELPER_Level.toObject(getLevel()));
visitor.visitField(this, FIELD_AssessmentType, HELPER_AssessmentType.toObject(getAssessmentType())); visitor.visitField(this, FIELD_AssessmentType, HELPER_AssessmentType.toObject(getAssessmentType()));
visitor.visitField(this, FIELD_PartTimeAssessmentType, HELPER_PartTimeAssessmentType.toObject(getPartTimeAssessmentType()));
visitor.visitAssociation (_AssessmentLevel); visitor.visitAssociation (_AssessmentLevel);
visitor.visitAssociation (_ExpressAssessmentLevel);
visitor.visitAssociation (_ParentOccupation); visitor.visitAssociation (_ParentOccupation);
visitor.visitAssociation (_ChildOccupations); visitor.visitAssociation (_ChildOccupations);
...@@ -1584,6 +1866,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1584,6 +1866,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
visitor.visit (_AssessmentLevel); visitor.visit (_AssessmentLevel);
} }
if (scope.includes (_ExpressAssessmentLevel))
{
visitor.visit (_ExpressAssessmentLevel);
}
if (scope.includes (_ParentOccupation)) if (scope.includes (_ParentOccupation))
{ {
visitor.visit (_ParentOccupation); visitor.visit (_ParentOccupation);
...@@ -1633,10 +1919,18 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1633,10 +1919,18 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return filter.matches (getAssessmentType ()); return filter.matches (getAssessmentType ());
} }
else if (attribName.equals (FIELD_PartTimeAssessmentType))
{
return filter.matches (getPartTimeAssessmentType ());
}
else if (attribName.equals (SINGLEREFERENCE_AssessmentLevel)) else if (attribName.equals (SINGLEREFERENCE_AssessmentLevel))
{ {
return filter.matches (getAssessmentLevel ()); return filter.matches (getAssessmentLevel ());
} }
else if (attribName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
return filter.matches (getExpressAssessmentLevel ());
}
else if (attribName.equals (SINGLEREFERENCE_ParentOccupation)) else if (attribName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return filter.matches (getParentOccupation ()); return filter.matches (getParentOccupation ());
...@@ -1696,12 +1990,24 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1696,12 +1990,24 @@ public abstract class BaseOccupation extends BaseBusinessClass
return this; return this;
} }
public SearchAll andPartTimeAssessmentType (QueryFilter<AssessmentType> filter)
{
filter.addFilter (context, "tl_occupation.parttime_assessment_type", "PartTimeAssessmentType");
return this;
}
public SearchAll andAssessmentLevel (QueryFilter<Level> filter) public SearchAll andAssessmentLevel (QueryFilter<Level> filter)
{ {
filter.addFilter (context, "tl_occupation.assessment_level_id", "AssessmentLevel"); filter.addFilter (context, "tl_occupation.assessment_level_id", "AssessmentLevel");
return this; return this;
} }
public SearchAll andExpressAssessmentLevel (QueryFilter<Level> filter)
{
filter.addFilter (context, "tl_occupation.express_assessment_level_id", "ExpressAssessmentLevel");
return this;
}
public SearchAll andParentOccupation (QueryFilter<Occupation> filter) public SearchAll andParentOccupation (QueryFilter<Occupation> filter)
{ {
filter.addFilter (context, "tl_occupation.parent_occupation_id", "ParentOccupation"); filter.addFilter (context, "tl_occupation.parent_occupation_id", "ParentOccupation");
...@@ -1759,6 +2065,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1759,6 +2065,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return HELPER_AssessmentType.toObject (getAssessmentType ()); return HELPER_AssessmentType.toObject (getAssessmentType ());
} }
else if (attribName.equals (FIELD_PartTimeAssessmentType))
{
return HELPER_PartTimeAssessmentType.toObject (getPartTimeAssessmentType ());
}
else else
{ {
return super.getAttribute (attribName); return super.getAttribute (attribName);
...@@ -1788,6 +2098,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1788,6 +2098,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return HELPER_AssessmentType; return HELPER_AssessmentType;
} }
else if (attribName.equals (FIELD_PartTimeAssessmentType))
{
return HELPER_PartTimeAssessmentType;
}
else else
{ {
return super.getAttributeHelper (attribName); return super.getAttributeHelper (attribName);
...@@ -1817,6 +2131,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1817,6 +2131,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
setAssessmentType ((AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, attribValue))); setAssessmentType ((AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, attribValue)));
} }
else if (attribName.equals (FIELD_PartTimeAssessmentType))
{
setPartTimeAssessmentType ((AssessmentType)(HELPER_PartTimeAssessmentType.fromObject (_PartTimeAssessmentType, attribValue)));
}
else else
{ {
super.setAttribute (attribName, attribValue); super.setAttribute (attribName, attribValue);
...@@ -1853,6 +2171,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1853,6 +2171,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return getWriteability_AssessmentType (); return getWriteability_AssessmentType ();
} }
else if (fieldName.equals (FIELD_PartTimeAssessmentType))
{
return getWriteability_PartTimeAssessmentType ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_ChildOccupations)) else if (fieldName.equals (MULTIPLEREFERENCE_ChildOccupations))
{ {
return getWriteability_ChildOccupations (); return getWriteability_ChildOccupations ();
...@@ -1861,6 +2183,10 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1861,6 +2183,10 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return getWriteability_AssessmentLevel (); return getWriteability_AssessmentLevel ();
} }
else if (fieldName.equals (SINGLEREFERENCE_ExpressAssessmentLevel))
{
return getWriteability_ExpressAssessmentLevel ();
}
else if (fieldName.equals (SINGLEREFERENCE_ParentOccupation)) else if (fieldName.equals (SINGLEREFERENCE_ParentOccupation))
{ {
return getWriteability_ParentOccupation (); return getWriteability_ParentOccupation ();
...@@ -1895,6 +2221,11 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1895,6 +2221,11 @@ public abstract class BaseOccupation extends BaseBusinessClass
fields.add (FIELD_AssessmentType); fields.add (FIELD_AssessmentType);
} }
if (getWriteability_PartTimeAssessmentType () != FieldWriteability.TRUE)
{
fields.add (FIELD_PartTimeAssessmentType);
}
super.putUnwriteable (fields); super.putUnwriteable (fields);
} }
...@@ -1908,6 +2239,7 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -1908,6 +2239,7 @@ public abstract class BaseOccupation extends BaseBusinessClass
result.add(HELPER_Name.getAttribObject (getClass (), _Name, true, FIELD_Name)); result.add(HELPER_Name.getAttribObject (getClass (), _Name, true, FIELD_Name));
result.add(HELPER_Level.getAttribObject (getClass (), _Level, true, FIELD_Level)); result.add(HELPER_Level.getAttribObject (getClass (), _Level, true, FIELD_Level));
result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, false, FIELD_AssessmentType)); result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, false, FIELD_AssessmentType));
result.add(HELPER_PartTimeAssessmentType.getAttribObject (getClass (), _PartTimeAssessmentType, false, FIELD_PartTimeAssessmentType));
return result; return result;
} }
...@@ -2030,6 +2362,24 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -2030,6 +2362,24 @@ public abstract class BaseOccupation extends BaseBusinessClass
return newAssessmentType; return newAssessmentType;
} }
/**
* Get the attribute PartTimeAssessmentType
*/
public AssessmentType getPartTimeAssessmentType (Occupation obj, AssessmentType original)
{
return original;
}
/**
* Change the value set for attribute PartTimeAssessmentType.
* May modify the field beforehand
* Occurs before validation.
*/
public AssessmentType setPartTimeAssessmentType (Occupation obj, AssessmentType newPartTimeAssessmentType) throws FieldException
{
return newPartTimeAssessmentType;
}
} }
...@@ -2102,10 +2452,18 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -2102,10 +2452,18 @@ public abstract class BaseOccupation extends BaseBusinessClass
{ {
return toAssessmentType (); return toAssessmentType ();
} }
if (name.equals ("PartTimeAssessmentType"))
{
return toPartTimeAssessmentType ();
}
if (name.equals ("AssessmentLevel")) if (name.equals ("AssessmentLevel"))
{ {
return toAssessmentLevel (); return toAssessmentLevel ();
} }
if (name.equals ("ExpressAssessmentLevel"))
{
return toExpressAssessmentLevel ();
}
if (name.equals ("ParentOccupation")) if (name.equals ("ParentOccupation"))
{ {
return toParentOccupation (); return toParentOccupation ();
...@@ -2123,12 +2481,20 @@ public abstract class BaseOccupation extends BaseBusinessClass ...@@ -2123,12 +2481,20 @@ public abstract class BaseOccupation extends BaseBusinessClass
public PipeLine<From, OccupationLevel> toLevel () { return pipe(new ORMAttributePipe<Me, OccupationLevel>(FIELD_Level)); } public PipeLine<From, OccupationLevel> toLevel () { return pipe(new ORMAttributePipe<Me, OccupationLevel>(FIELD_Level)); }
public PipeLine<From, AssessmentType> toAssessmentType () { return pipe(new ORMAttributePipe<Me, AssessmentType>(FIELD_AssessmentType)); } public PipeLine<From, AssessmentType> toAssessmentType () { return pipe(new ORMAttributePipe<Me, AssessmentType>(FIELD_AssessmentType)); }
public PipeLine<From, AssessmentType> toPartTimeAssessmentType () { return pipe(new ORMAttributePipe<Me, AssessmentType>(FIELD_PartTimeAssessmentType)); }
public Level.LevelPipeLineFactory<From, Level> toAssessmentLevel () { return toAssessmentLevel (Filter.ALL); } public Level.LevelPipeLineFactory<From, Level> toAssessmentLevel () { return toAssessmentLevel (Filter.ALL); }
public Level.LevelPipeLineFactory<From, Level> toAssessmentLevel (Filter<Level> filter) public Level.LevelPipeLineFactory<From, Level> toAssessmentLevel (Filter<Level> filter)
{ {
return Level.REFERENCE_Level.new LevelPipeLineFactory<From, Level> (this, new ORMSingleAssocPipe<Me, Level>(SINGLEREFERENCE_AssessmentLevel, filter)); return Level.REFERENCE_Level.new LevelPipeLineFactory<From, Level> (this, new ORMSingleAssocPipe<Me, Level>(SINGLEREFERENCE_AssessmentLevel, filter));
} }
public Level.LevelPipeLineFactory<From, Level> toExpressAssessmentLevel () { return toExpressAssessmentLevel (Filter.ALL); }
public Level.LevelPipeLineFactory<From, Level> toExpressAssessmentLevel (Filter<Level> filter)
{
return Level.REFERENCE_Level.new LevelPipeLineFactory<From, Level> (this, new ORMSingleAssocPipe<Me, Level>(SINGLEREFERENCE_ExpressAssessmentLevel, filter));
}
public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation () { return toParentOccupation (Filter.ALL); } public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation () { return toParentOccupation (Filter.ALL); }
public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation (Filter<Occupation> filter) public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation (Filter<Occupation> filter)
...@@ -2186,6 +2552,20 @@ class DummyOccupation extends Occupation ...@@ -2186,6 +2552,20 @@ class DummyOccupation extends Occupation
return Level.DUMMY_Level.getObjectID(); return Level.DUMMY_Level.getObjectID();
} }
public Level getExpressAssessmentLevel () throws StorageException
{
return (Level)(Level.DUMMY_Level);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getExpressAssessmentLevelID ()
{
return Level.DUMMY_Level.getObjectID();
}
public Occupation getParentOccupation () throws StorageException public Occupation getParentOccupation () throws StorageException
{ {
return (Occupation)(Occupation.DUMMY_Occupation); return (Occupation)(Occupation.DUMMY_Occupation);
......
...@@ -32,4 +32,9 @@ public class Client extends BaseClient ...@@ -32,4 +32,9 @@ public class Client extends BaseClient
{ {
return StringUtils.subNulls(getClientName(), super.getToString()); return StringUtils.subNulls(getClientName(), super.getToString());
} }
public boolean showUseClientDetails()
{
return isTrue(getUseClientDetails());
}
} }
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<ATTRIB name="ClientName" type="String" dbcol="client_name" mandatory="true" length="30"/> <ATTRIB name="ClientName" type="String" dbcol="client_name" mandatory="true" length="30"/>
<ATTRIB name="ClientLogo" type="BinaryContent" dbcol="client_logo" mandatory="false" binaryHandler="loggedin" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE" /> <ATTRIB name="ClientLogo" type="BinaryContent" dbcol="client_logo" mandatory="false" binaryHandler="loggedin" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE" />
<ATTRIB name="UseClientDetails" type="Boolean" dbcol="use_client_details" mandatory="false" defaultValue="Boolean.TRUE" />
<ATTRIB name="Email" type="String" dbcol="email" mandatory="false" length="100" validators="Email" /> <ATTRIB name="Email" type="String" dbcol="email" mandatory="false" length="100" validators="Email" />
<ATTRIB name="ContactName" type="String" dbcol="contact_name" mandatory="false" length="100"/> <ATTRIB name="ContactName" type="String" dbcol="contact_name" mandatory="false" length="100"/>
<ATTRIB name="ContactSurname" type="String" dbcol="contact_surname" mandatory="false" length="100"/> <ATTRIB name="ContactSurname" type="String" dbcol="contact_surname" mandatory="false" length="100"/>
......
...@@ -30,6 +30,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -30,6 +30,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String dummyClientName; private String dummyClientName;
private BinaryContent dummyClientLogo; private BinaryContent dummyClientLogo;
private Boolean dummyUseClientDetails;
private String dummyEmail; private String dummyEmail;
private String dummyContactName; private String dummyContactName;
private String dummyContactSurname; private String dummyContactSurname;
...@@ -44,6 +45,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -44,6 +45,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_ClientName = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_ClientName = DefaultAttributeHelper.INSTANCE;
private static final BLOBAttributeHelper HELPER_ClientLogo = BLOBAttributeHelper.INSTANCE; private static final BLOBAttributeHelper HELPER_ClientLogo = BLOBAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_UseClientDetails = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_Email = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Email = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_ContactName = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_ContactName = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_ContactSurname = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_ContactSurname = DefaultAttributeHelper.INSTANCE;
...@@ -61,6 +63,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -61,6 +63,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
{ {
dummyClientName = (String)(HELPER_ClientName.initialise (dummyClientName)); dummyClientName = (String)(HELPER_ClientName.initialise (dummyClientName));
dummyClientLogo = (BinaryContent)(HELPER_ClientLogo.initialise (dummyClientLogo)); dummyClientLogo = (BinaryContent)(HELPER_ClientLogo.initialise (dummyClientLogo));
dummyUseClientDetails = (Boolean)(HELPER_UseClientDetails.initialise (dummyUseClientDetails));
dummyEmail = (String)(HELPER_Email.initialise (dummyEmail)); dummyEmail = (String)(HELPER_Email.initialise (dummyEmail));
dummyContactName = (String)(HELPER_ContactName.initialise (dummyContactName)); dummyContactName = (String)(HELPER_ContactName.initialise (dummyContactName));
dummyContactSurname = (String)(HELPER_ContactSurname.initialise (dummyContactSurname)); dummyContactSurname = (String)(HELPER_ContactSurname.initialise (dummyContactSurname));
...@@ -73,7 +76,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -73,7 +76,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
} }
private String SELECT_COLUMNS = "{PREFIX}tl_client.object_id as id, {PREFIX}tl_client.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_client.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_client.client_name, {PREFIX}tl_client.client_logo, {PREFIX}tl_client.email, {PREFIX}tl_client.contact_name, {PREFIX}tl_client.contact_surname, {PREFIX}tl_client.phone, {PREFIX}tl_client.state, {PREFIX}tl_client.country, {PREFIX}tl_client.post_code, {PREFIX}tl_client.city, {PREFIX}tl_client.time_zone, {PREFIX}tl_client.hiring_team_id, {PREFIX}tl_client.company_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_client.object_id as id, {PREFIX}tl_client.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_client.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_client.client_name, {PREFIX}tl_client.client_logo, {PREFIX}tl_client.use_client_details, {PREFIX}tl_client.email, {PREFIX}tl_client.contact_name, {PREFIX}tl_client.contact_surname, {PREFIX}tl_client.phone, {PREFIX}tl_client.state, {PREFIX}tl_client.country, {PREFIX}tl_client.post_code, {PREFIX}tl_client.city, {PREFIX}tl_client.time_zone, {PREFIX}tl_client.hiring_team_id, {PREFIX}tl_client.company_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -126,6 +129,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -126,6 +129,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
if (false || !tl_clientPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) || if (false || !tl_clientPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_clientPSet.containsAttrib(Client.FIELD_ClientName)|| !tl_clientPSet.containsAttrib(Client.FIELD_ClientName)||
!tl_clientPSet.containsAttrib(Client.FIELD_ClientLogo)|| !tl_clientPSet.containsAttrib(Client.FIELD_ClientLogo)||
!tl_clientPSet.containsAttrib(Client.FIELD_UseClientDetails)||
!tl_clientPSet.containsAttrib(Client.FIELD_Email)|| !tl_clientPSet.containsAttrib(Client.FIELD_Email)||
!tl_clientPSet.containsAttrib(Client.FIELD_ContactName)|| !tl_clientPSet.containsAttrib(Client.FIELD_ContactName)||
!tl_clientPSet.containsAttrib(Client.FIELD_ContactSurname)|| !tl_clientPSet.containsAttrib(Client.FIELD_ContactSurname)||
...@@ -226,10 +230,10 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -226,10 +230,10 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_client " + "UPDATE {PREFIX}tl_client " +
"SET client_name = ?, client_logo = ?, email = ?, contact_name = ?, contact_surname = ?, phone = ?, state = ?, country = ?, post_code = ?, city = ?, time_zone = ?, hiring_team_id = ? , company_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET client_name = ?, client_logo = ?, use_client_details = ?, email = ?, contact_name = ?, contact_surname = ?, phone = ?, state = ?, country = ?, post_code = ?, city = ?, time_zone = ?, hiring_team_id = ? , company_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_client.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_client.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_ClientName.getForSQL(dummyClientName, tl_clientPSet.getAttrib (Client.FIELD_ClientName))).listEntry (HELPER_ClientLogo.getForSQL(dummyClientLogo, tl_clientPSet.getAttrib (Client.FIELD_ClientLogo))).listEntry (HELPER_Email.getForSQL(dummyEmail, tl_clientPSet.getAttrib (Client.FIELD_Email))).listEntry (HELPER_ContactName.getForSQL(dummyContactName, tl_clientPSet.getAttrib (Client.FIELD_ContactName))).listEntry (HELPER_ContactSurname.getForSQL(dummyContactSurname, tl_clientPSet.getAttrib (Client.FIELD_ContactSurname))).listEntry (HELPER_Phone.getForSQL(dummyPhone, tl_clientPSet.getAttrib (Client.FIELD_Phone))).listEntry (HELPER_State.getForSQL(dummyState, tl_clientPSet.getAttrib (Client.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_clientPSet.getAttrib (Client.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_clientPSet.getAttrib (Client.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_clientPSet.getAttrib (Client.FIELD_City))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_clientPSet.getAttrib (Client.FIELD_TimeZone))).listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_Company)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_ClientName.getForSQL(dummyClientName, tl_clientPSet.getAttrib (Client.FIELD_ClientName))).listEntry (HELPER_ClientLogo.getForSQL(dummyClientLogo, tl_clientPSet.getAttrib (Client.FIELD_ClientLogo))).listEntry (HELPER_UseClientDetails.getForSQL(dummyUseClientDetails, tl_clientPSet.getAttrib (Client.FIELD_UseClientDetails))).listEntry (HELPER_Email.getForSQL(dummyEmail, tl_clientPSet.getAttrib (Client.FIELD_Email))).listEntry (HELPER_ContactName.getForSQL(dummyContactName, tl_clientPSet.getAttrib (Client.FIELD_ContactName))).listEntry (HELPER_ContactSurname.getForSQL(dummyContactSurname, tl_clientPSet.getAttrib (Client.FIELD_ContactSurname))).listEntry (HELPER_Phone.getForSQL(dummyPhone, tl_clientPSet.getAttrib (Client.FIELD_Phone))).listEntry (HELPER_State.getForSQL(dummyState, tl_clientPSet.getAttrib (Client.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_clientPSet.getAttrib (Client.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_clientPSet.getAttrib (Client.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_clientPSet.getAttrib (Client.FIELD_City))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_clientPSet.getAttrib (Client.FIELD_TimeZone))).listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_Company)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -487,6 +491,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -487,6 +491,7 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
tl_clientPSet.setAttrib(Client.FIELD_ClientName, HELPER_ClientName.getFromRS(dummyClientName, r, "client_name")); tl_clientPSet.setAttrib(Client.FIELD_ClientName, HELPER_ClientName.getFromRS(dummyClientName, r, "client_name"));
tl_clientPSet.setAttrib(Client.FIELD_ClientLogo, HELPER_ClientLogo.getFromRS(dummyClientLogo, r, "client_logo")); tl_clientPSet.setAttrib(Client.FIELD_ClientLogo, HELPER_ClientLogo.getFromRS(dummyClientLogo, r, "client_logo"));
tl_clientPSet.setAttrib(Client.FIELD_UseClientDetails, HELPER_UseClientDetails.getFromRS(dummyUseClientDetails, r, "use_client_details"));
tl_clientPSet.setAttrib(Client.FIELD_Email, HELPER_Email.getFromRS(dummyEmail, r, "email")); tl_clientPSet.setAttrib(Client.FIELD_Email, HELPER_Email.getFromRS(dummyEmail, r, "email"));
tl_clientPSet.setAttrib(Client.FIELD_ContactName, HELPER_ContactName.getFromRS(dummyContactName, r, "contact_name")); tl_clientPSet.setAttrib(Client.FIELD_ContactName, HELPER_ContactName.getFromRS(dummyContactName, r, "contact_name"));
tl_clientPSet.setAttrib(Client.FIELD_ContactSurname, HELPER_ContactSurname.getFromRS(dummyContactSurname, r, "contact_surname")); tl_clientPSet.setAttrib(Client.FIELD_ContactSurname, HELPER_ContactSurname.getFromRS(dummyContactSurname, r, "contact_surname"));
...@@ -515,10 +520,10 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr ...@@ -515,10 +520,10 @@ public class ClientPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_client " + "INSERT INTO {PREFIX}tl_client " +
" (client_name, client_logo, email, contact_name, contact_surname, phone, state, country, post_code, city, time_zone, hiring_team_id, company_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (client_name, client_logo, use_client_details, email, contact_name, contact_surname, phone, state, country, post_code, city, time_zone, hiring_team_id, company_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_ClientName.getForSQL(dummyClientName, tl_clientPSet.getAttrib (Client.FIELD_ClientName))).listEntry (HELPER_ClientLogo.getForSQL(dummyClientLogo, tl_clientPSet.getAttrib (Client.FIELD_ClientLogo))).listEntry (HELPER_Email.getForSQL(dummyEmail, tl_clientPSet.getAttrib (Client.FIELD_Email))).listEntry (HELPER_ContactName.getForSQL(dummyContactName, tl_clientPSet.getAttrib (Client.FIELD_ContactName))).listEntry (HELPER_ContactSurname.getForSQL(dummyContactSurname, tl_clientPSet.getAttrib (Client.FIELD_ContactSurname))).listEntry (HELPER_Phone.getForSQL(dummyPhone, tl_clientPSet.getAttrib (Client.FIELD_Phone))).listEntry (HELPER_State.getForSQL(dummyState, tl_clientPSet.getAttrib (Client.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_clientPSet.getAttrib (Client.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_clientPSet.getAttrib (Client.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_clientPSet.getAttrib (Client.FIELD_City))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_clientPSet.getAttrib (Client.FIELD_TimeZone))) .listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_Company)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_ClientName.getForSQL(dummyClientName, tl_clientPSet.getAttrib (Client.FIELD_ClientName))).listEntry (HELPER_ClientLogo.getForSQL(dummyClientLogo, tl_clientPSet.getAttrib (Client.FIELD_ClientLogo))).listEntry (HELPER_UseClientDetails.getForSQL(dummyUseClientDetails, tl_clientPSet.getAttrib (Client.FIELD_UseClientDetails))).listEntry (HELPER_Email.getForSQL(dummyEmail, tl_clientPSet.getAttrib (Client.FIELD_Email))).listEntry (HELPER_ContactName.getForSQL(dummyContactName, tl_clientPSet.getAttrib (Client.FIELD_ContactName))).listEntry (HELPER_ContactSurname.getForSQL(dummyContactSurname, tl_clientPSet.getAttrib (Client.FIELD_ContactSurname))).listEntry (HELPER_Phone.getForSQL(dummyPhone, tl_clientPSet.getAttrib (Client.FIELD_Phone))).listEntry (HELPER_State.getForSQL(dummyState, tl_clientPSet.getAttrib (Client.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_clientPSet.getAttrib (Client.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_clientPSet.getAttrib (Client.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_clientPSet.getAttrib (Client.FIELD_City))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_clientPSet.getAttrib (Client.FIELD_TimeZone))) .listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_HiringTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_clientPSet.getAttrib (Client.SINGLEREFERENCE_Company)))) .listEntry (objectID.longID ()).toList().toArray());
tl_clientPSet.setStatus (PersistentSetStatus.PROCESSED); tl_clientPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
package performa.orm; package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.utils.*; import oneit.utils.*;
import performa.orm.types.*;
public class ILOJobTitle extends BaseILOJobTitle public class ILOJobTitle extends BaseILOJobTitle
{ {
...@@ -31,5 +19,4 @@ public class ILOJobTitle extends BaseILOJobTitle ...@@ -31,5 +19,4 @@ public class ILOJobTitle extends BaseILOJobTitle
return StringUtils.subNulls(getJobTitle(), super.getToString()); return StringUtils.subNulls(getJobTitle(), super.getToString());
} }
} }
\ No newline at end of file
...@@ -472,7 +472,7 @@ public class Job extends BaseJob ...@@ -472,7 +472,7 @@ public class Job extends BaseJob
title.append("Matchd - "); title.append("Matchd - ");
if(isClientAvailable()) if(isClientAvailable() && getClient().showUseClientDetails())
{ {
title.append(getClient()).append(" - "); title.append(getClient()).append(" - ");
} }
...@@ -559,30 +559,23 @@ public class Job extends BaseJob ...@@ -559,30 +559,23 @@ public class Job extends BaseJob
public BinaryContent getLogo() public BinaryContent getLogo()
{ {
if(isClientAvailable() && getClient().getClientLogo() != null) if(isClientAvailable() && getClient().showUseClientDetails())
{ {
return getClient().getClientLogo(); return getClient().getClientLogo();
} }
else if(getHiringTeam() != null)
{
return getHiringTeam().getHiringTeamLogo();
}
return null; return getHiringTeam() != null ? getHiringTeam().getHiringTeamLogo() : null;
} }
public String getTeamName() public String getTeamName()
{ {
if(isClientAvailable()) if(isClientAvailable() && getClient().showUseClientDetails())
{ {
return getClient().getClientName(); return getClient().getClientName();
} }
else if(getHiringTeam() != null)
{
return getHiringTeam().getHiringTeamName();
}
return ""; return getHiringTeam() != null ? getHiringTeam().getHiringTeamName() : "";
} }
...@@ -751,12 +744,57 @@ public class Job extends BaseJob ...@@ -751,12 +744,57 @@ public class Job extends BaseJob
if(occupation != null) if(occupation != null)
{ {
setOccupation(occupation); setOccupation(occupation);
setLevel(occupation.getAssessmentLevel()); setSuggestedAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setAssessmentType(occupation.getAssessmentType()); setAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setLevel(getAssessmentType() == AssessmentType.COMPREHENSIVE ? occupation.getAssessmentLevel() : occupation.getExpressAssessmentLevel());
} }
super.postILOJobTitleChange(); super.postILOJobTitleChange();
} }
@Override
protected void postJobTypeChange() throws FieldException
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
if(occupation != null)
{
setSuggestedAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setAssessmentType(getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType());
setLevel(getAssessmentType() == AssessmentType.COMPREHENSIVE ? occupation.getAssessmentLevel() : occupation.getExpressAssessmentLevel());
}
super.postJobTypeChange();
}
@Override
protected void postAssessmentTypeChange() throws FieldException
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
if(occupation != null && getSuggestedAssessmentType() != super.getAssessmentType())
{
setLevel(getAssessmentType() == AssessmentType.COMPREHENSIVE ? occupation.getAssessmentLevel() : occupation.getExpressAssessmentLevel());
}
super.postAssessmentTypeChange();
}
@Override
public AssessmentType getSuggestedAssessmentType()
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
if(occupation != null)
{
return getJobType() == JobType.FULL_TIME ? occupation.getAssessmentType() : occupation.getPartTimeAssessmentType();
}
return super.getSuggestedAssessmentType();
}
public Occupation displayOccupation() public Occupation displayOccupation()
{ {
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<TRANSIENT name="AssessmentTemplateName" type="String"/> <TRANSIENT name="AssessmentTemplateName" type="String"/>
<TRANSIENT name="CultureTemplateName" type="String"/> <TRANSIENT name="CultureTemplateName" type="String"/>
<TRANSIENT name="AppProcessOption" type="AppProcessOption" attribHelper="EnumeratedAttributeHelper"/> <TRANSIENT name="AppProcessOption" type="AppProcessOption" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="SuggestedAssessmentType" type="AssessmentType" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="RankingCompleted" type="Boolean" /> <TRANSIENT name="RankingCompleted" type="Boolean" />
<TRANSIENTSINGLE name="CultureTemplate" type="CultureCriteriaTemplate" /> <TRANSIENTSINGLE name="CultureTemplate" type="CultureCriteriaTemplate" />
......
...@@ -9,13 +9,15 @@ ...@@ -9,13 +9,15 @@
<MULTIPLEREFERENCE name="ChildOccupations" type="Occupation" backreferenceName="ParentOccupation" /> <MULTIPLEREFERENCE name="ChildOccupations" type="Occupation" backreferenceName="ParentOccupation" />
<TABLE name="tl_occupation" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_occupation" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Code" type="String" dbcol="code" length="4" mandatory="true" isUnique="true"/> <ATTRIB name="Code" type="String" dbcol="code" length="4" mandatory="true" isUnique="true"/>
<ATTRIB name="Name" type="String" dbcol="name" length="250" mandatory="true"/> <ATTRIB name="Name" type="String" dbcol="name" length="250" mandatory="true"/>
<ATTRIB name="Level" type="OccupationLevel" dbcol="level" attribHelper="EnumeratedAttributeHelper" mandatory="true"/> <ATTRIB name="Level" type="OccupationLevel" dbcol="level" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" /> <ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" />
<ATTRIB name="PartTimeAssessmentType" type="AssessmentType" dbcol="parttime_assessment_type" attribHelper="EnumeratedAttributeHelper" />
<SINGLEREFERENCE name="AssessmentLevel" type="Level" dbcol="assessment_level_id" />
<SINGLEREFERENCE name="ParentOccupation" type="Occupation" dbcol="parent_occupation_id" backreferenceName="ChildOccupations"/> <SINGLEREFERENCE name="AssessmentLevel" type="Level" dbcol="assessment_level_id" />
<SINGLEREFERENCE name="ExpressAssessmentLevel" type="Level" dbcol="express_assessment_level_id" />
<SINGLEREFERENCE name="ParentOccupation" type="Occupation" dbcol="parent_occupation_id" backreferenceName="ChildOccupations"/>
</TABLE> </TABLE>
<SEARCH type="All" paramFilter="object_id is not null" orderBy="object_id"/> <SEARCH type="All" paramFilter="object_id is not null" orderBy="object_id"/>
......
...@@ -31,6 +31,7 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -31,6 +31,7 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
private String dummyName; private String dummyName;
private OccupationLevel dummyLevel; private OccupationLevel dummyLevel;
private AssessmentType dummyAssessmentType; private AssessmentType dummyAssessmentType;
private AssessmentType dummyPartTimeAssessmentType;
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
...@@ -38,6 +39,7 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -38,6 +39,7 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
private static final DefaultAttributeHelper HELPER_Name = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_Level = new EnumeratedAttributeHelper (OccupationLevel.FACTORY_OccupationLevel); private static final EnumeratedAttributeHelper HELPER_Level = new EnumeratedAttributeHelper (OccupationLevel.FACTORY_OccupationLevel);
private static final EnumeratedAttributeHelper HELPER_AssessmentType = new EnumeratedAttributeHelper (AssessmentType.FACTORY_AssessmentType); private static final EnumeratedAttributeHelper HELPER_AssessmentType = new EnumeratedAttributeHelper (AssessmentType.FACTORY_AssessmentType);
private static final EnumeratedAttributeHelper HELPER_PartTimeAssessmentType = new EnumeratedAttributeHelper (AssessmentType.FACTORY_AssessmentType);
...@@ -48,10 +50,11 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -48,10 +50,11 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
dummyName = (String)(HELPER_Name.initialise (dummyName)); dummyName = (String)(HELPER_Name.initialise (dummyName));
dummyLevel = (OccupationLevel)(HELPER_Level.initialise (dummyLevel)); dummyLevel = (OccupationLevel)(HELPER_Level.initialise (dummyLevel));
dummyAssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (dummyAssessmentType)); dummyAssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (dummyAssessmentType));
dummyPartTimeAssessmentType = (AssessmentType)(HELPER_PartTimeAssessmentType.initialise (dummyPartTimeAssessmentType));
} }
private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.assessment_type, {PREFIX}tl_occupation.assessment_level_id, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.assessment_type, {PREFIX}tl_occupation.parttime_assessment_type, {PREFIX}tl_occupation.assessment_level_id, {PREFIX}tl_occupation.express_assessment_level_id, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -106,7 +109,9 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -106,7 +109,9 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Name)|| !tl_occupationPSet.containsAttrib(Occupation.FIELD_Name)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Level)|| !tl_occupationPSet.containsAttrib(Occupation.FIELD_Level)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_AssessmentType)|| !tl_occupationPSet.containsAttrib(Occupation.FIELD_AssessmentType)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_PartTimeAssessmentType)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel)|| !tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ExpressAssessmentLevel)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ParentOccupation)) !tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ParentOccupation))
{ {
// We will need to retrieve it // We will need to retrieve it
...@@ -187,10 +192,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -187,10 +192,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_occupation " + "UPDATE {PREFIX}tl_occupation " +
"SET code = ?, name = ?, level = ?, assessment_type = ?, assessment_level_id = ? , parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET code = ?, name = ?, level = ?, assessment_type = ?, parttime_assessment_type = ?, assessment_level_id = ? , express_assessment_level_id = ? , parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_occupation.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_occupation.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))).listEntry (HELPER_PartTimeAssessmentType.getForSQL(dummyPartTimeAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_PartTimeAssessmentType))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ExpressAssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -450,8 +455,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -450,8 +455,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
tl_occupationPSet.setAttrib(Occupation.FIELD_Name, HELPER_Name.getFromRS(dummyName, r, "name")); tl_occupationPSet.setAttrib(Occupation.FIELD_Name, HELPER_Name.getFromRS(dummyName, r, "name"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Level, HELPER_Level.getFromRS(dummyLevel, r, "level")); tl_occupationPSet.setAttrib(Occupation.FIELD_Level, HELPER_Level.getFromRS(dummyLevel, r, "level"));
tl_occupationPSet.setAttrib(Occupation.FIELD_AssessmentType, HELPER_AssessmentType.getFromRS(dummyAssessmentType, r, "assessment_type")); tl_occupationPSet.setAttrib(Occupation.FIELD_AssessmentType, HELPER_AssessmentType.getFromRS(dummyAssessmentType, r, "assessment_type"));
tl_occupationPSet.setAttrib(Occupation.FIELD_PartTimeAssessmentType, HELPER_PartTimeAssessmentType.getFromRS(dummyPartTimeAssessmentType, r, "parttime_assessment_type"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel, r.getObject ("assessment_level_id")); tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel, r.getObject ("assessment_level_id"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ExpressAssessmentLevel, r.getObject ("express_assessment_level_id"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ParentOccupation, r.getObject ("parent_occupation_id")); tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ParentOccupation, r.getObject ("parent_occupation_id"));
} }
...@@ -469,10 +476,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr ...@@ -469,10 +476,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_occupation " + "INSERT INTO {PREFIX}tl_occupation " +
" (code, name, level, assessment_type, assessment_level_id, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (code, name, level, assessment_type, parttime_assessment_type, assessment_level_id, express_assessment_level_id, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))).listEntry (HELPER_PartTimeAssessmentType.getForSQL(dummyPartTimeAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_PartTimeAssessmentType))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ExpressAssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray());
tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED); tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
package performa.utils;
import oneit.utils.FormatterFactory;
import performa.orm.AssessmentCriteriaTemplate;
import performa.orm.Job;
import performa.orm.types.AssessmentType;
public class AssessmentTypeEnumFormatter implements FormatterFactory
{
private Job job;
private AssessmentCriteriaTemplate template;
public AssessmentTypeEnumFormatter(Job job)
{
this.job = job;
}
public AssessmentTypeEnumFormatter(AssessmentCriteriaTemplate template)
{
this.template = template;
}
@Override
public Object getFormatterFor(Object objectToFormat)
{
AssessmentType assessmentType = ((AssessmentType) objectToFormat);
AssessmentType suggestedType = job != null ? job.getSuggestedAssessmentType() : template.getSuggestedAssessmentType();
if(suggestedType == assessmentType)
{
return assessmentType.getDescription() + " (Suggested)";
}
return assessmentType.getDescription();
}
}
\ No newline at end of file
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
<INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/> <INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/>
</NODE> </NODE>
<NODE name="assessment_type_selector_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/>
</NODE>
<NODE name="signin_jsp" factory="Participant"> <NODE name="signin_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/> <INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/>
......
...@@ -72,7 +72,18 @@ ...@@ -72,7 +72,18 @@
</span> </span>
</div> </div>
</div> </div>
<div class="form-group">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= client %>" id="use-client-details" attributeName="UseClientDetails" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="client.showUseClientDetails() ? 'checked': 'unchecked'" client="<%= client %>">
<label for="use-client-details">
<oneit:ormlabel obj="<%= client %>" field="UseClientDetails" />
</label>
</oneit:recalcClass>
</div>
</div>
</div>
<div class="form-brack-line-sub"></div> <div class="form-brack-line-sub"></div>
<div class="form-group"> <div class="form-group">
......
...@@ -44,13 +44,31 @@ ...@@ -44,13 +44,31 @@
var scrolldiv = null ; var scrolldiv = null ;
$(document).ready(function() $(document).ready(function()
{ {
setupRecalc ($("form#editJobTemplate"), {'recalcOnError':true}); setupRecalc ($("form#editJob"), {'recalcOnError':true});
$("select[name$='JobTemplate']").change(function() $("select[name$='JobTemplate']").change(function()
{ {
$("button[name$='loadJobFromTemplate']").click(); $("button[name$='loadJobFromTemplate']").click();
}); });
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').change(function()
{
$("#assessment_type").empty();
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/assessment_type_selector.jsp", "#assessment_type", {jobTitleID : $('input[type="hidden"][id$="JobTitle"]').val()}, function (theHTML_JQ) {
$("#assessment_type").append (theHTML_JQ);
});
});
$("select[name$='JobType']").change(function()
{
$("#assessment_type").empty();
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/assessment_type_selector.jsp", "#assessment_type", {jobTypeName : $(this).val()}, function (theHTML_JQ) {
$("#assessment_type").append (theHTML_JQ);
});
});
if ($("#select-occupation-id").val()) { if ($("#select-occupation-id").val()) {
lastclickedOccid = $("#select-occupation-id").val(); lastclickedOccid = $("#select-occupation-id").val();
}else { }else {
...@@ -164,6 +182,14 @@ ...@@ -164,6 +182,14 @@
$("#occupation span").addClass("form-control"); $("#occupation span").addClass("form-control");
$("#occupation span").css({"padding":"15px","display":"inline-table"}); $("#occupation span").css({"padding":"15px","display":"inline-table"});
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/assessment_type_selector.jsp", "#assessment_type", {}, function (theHTML_JQ) {
$("#assessment_type").append (theHTML_JQ);
});
addPostAjaxAddHTMLModifiers (function () {
$( "select[name$='AssessmentType']" ).select2({minimumResultsForSearch: Infinity});
}, true);
}); });
...@@ -277,7 +303,7 @@ ...@@ -277,7 +303,7 @@
<oneit:script src="/scripts/google_address.js"/> <oneit:script src="/scripts/google_address.js"/>
</oneit:script> </oneit:script>
<oneit:form name="editJobTemplate" method="post" enctype="multipart/form-data"> <oneit:form name="editJob" method="post" enctype="multipart/form-data">
<h1 class="page-title page-title-with-arrow edit-template"> <h1 class="page-title page-title-with-arrow edit-template">
<oneit:button cssClass="arrow-btn-blue" name="gotoPage" value=" " skin="link" <oneit:button cssClass="arrow-btn-blue" name="gotoPage" value=" " skin="link"
...@@ -401,7 +427,12 @@ ...@@ -401,7 +427,12 @@
<oneit:ormEnum obj="<%= template %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/> <oneit:ormEnum obj="<%= template %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
</div> </div>
</div> </div>
<div class="form-group row">
<div class="col-md-6">
<label><oneit:label GUIName="Assessment Length" /></label>
<div id="assessment_type"></div>
</div>
</div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-12"> <div class="col-md-12">
<div class="styled_checkboxes"> <div class="styled_checkboxes">
......
<%@ page extends="oneit.servlets.process.AJAXProcessJSP" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%@ include file="/inc/std_imports.jsp" %>
<%! protected String getName (ServletConfig config) { return "assessment_type_selector_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
Job job = (Job) process.getAttribute("Job");
AssessmentCriteriaTemplate template = (AssessmentCriteriaTemplate) process.getAttribute("AssessmentCriteriaTemplate");
Long jobTitleID = request.getParameter("jobTitleID") != null ? Long.valueOf(request.getParameter("jobTitleID")) : null;
String jobTypeName = request.getParameter("jobTypeName");
AssessmentTypeEnumFormatter formatter = null;
if(jobTypeName != null)
{
JobType jobType = JobType.forName(jobTypeName);
if(job != null)
{
job.setJobType(jobType);
}
else
{
template.setJobType(jobType);
}
}
if(jobTitleID != null)
{
ILOJobTitle jobTitle = ILOJobTitle.getILOJobTitleByID(objTran, jobTitleID);
if(job != null)
{
job.setILOJobTitle(jobTitle);
}
else
{
template.setILOJobTitle(jobTitle);
}
}
if(job != null)
{
formatter = new AssessmentTypeEnumFormatter(job);
}
else
{
formatter = new AssessmentTypeEnumFormatter(template);
}
%>
<oneit:form name="editJob" method="POST">
<oneit:evalBody buffer="<%= getBuffer(request) %>">
<oneit:ormEnum obj="<%= job != null ? job : template %>" attributeName="AssessmentType" cssClass="form-control" enumFormatter="<%= formatter %>"/>
</oneit:evalBody>
</oneit:form>
...@@ -46,6 +46,24 @@ ...@@ -46,6 +46,24 @@
$("button[name$='loadJobFromTemplate']").click(); $("button[name$='loadJobFromTemplate']").click();
}); });
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').change(function()
{
$("#assessment_type").empty();
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/assessment_type_selector.jsp", "#assessment_type", {jobTitleID : $('input[type="hidden"][id$="JobTitle"]').val()}, function (theHTML_JQ) {
$("#assessment_type").append (theHTML_JQ);
});
});
$("select[name$='JobType']").change(function()
{
$("#assessment_type").empty();
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/assessment_type_selector.jsp", "#assessment_type", {jobTypeName : $(this).val()}, function (theHTML_JQ) {
$("#assessment_type").append (theHTML_JQ);
});
});
if ($("#select-occupation-id").val()) { if ($("#select-occupation-id").val()) {
lastclickedOccid = $("#select-occupation-id").val(); lastclickedOccid = $("#select-occupation-id").val();
}else { }else {
...@@ -164,6 +182,14 @@ ...@@ -164,6 +182,14 @@
$("#occupation span").addClass("form-control"); $("#occupation span").addClass("form-control");
$("#occupation span").css({"padding":"15px","display":"inline-table"}); $("#occupation span").css({"padding":"15px","display":"inline-table"});
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/assessment_type_selector.jsp", "#assessment_type", {}, function (theHTML_JQ) {
$("#assessment_type").append (theHTML_JQ);
});
addPostAjaxAddHTMLModifiers (function () {
$( "select[name$='AssessmentType']" ).select2({minimumResultsForSearch: Infinity});
}, true);
}); });
...@@ -249,7 +275,7 @@ ...@@ -249,7 +275,7 @@
return false; return false;
} }
(function($) { (function($) {
$.fn.hasScrollBar = function() { $.fn.hasScrollBar = function() {
return this.get(0).scrollHeight > this.height(); return this.get(0).scrollHeight > this.height();
} }
...@@ -335,32 +361,6 @@ ...@@ -335,32 +361,6 @@
<label class="label-16">Job Location</label> <label class="label-16">Job Location</label>
</div> </div>
</div> </div>
<%--
<div class="form-group row">
<div class="col-md-6">
<label><oneit:ormlabel obj="<%= job %>" field="Country" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="Country" cssClass="form-control"/>
</div>
<div class="col-md-6">
<label><oneit:label GUIName="State or Province"/></label>
<oneit:ormEnum obj="<%= job %>" attributeName="State" cssClass="form-control"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<label><oneit:label GUIName="City or Town"/></label>
<oneit:ormInput obj="<%= job %>" type="text" attributeName="City" cssClass="form-control" />
</div>
<div class="col-md-4">
<label><oneit:label GUIName="Zip / Post Code"/></label>
<oneit:ormInput obj="<%= job %>" type="text" attributeName="PostCode" cssClass="form-control" />
</div>
<div class="col-md-4">
<label><oneit:label GUIName="Expected Candidate Radius"/></label>
<oneit:ormEnum obj="<%= job %>" attributeName="ExpectedCandidateRadius" cssClass="form-control"/>
</div>
</div>
--%>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-8"> <div class="col-md-8">
<label><oneit:label GUIName="Google Location"/></label> <label><oneit:label GUIName="Google Location"/></label>
...@@ -403,7 +403,6 @@ ...@@ -403,7 +403,6 @@
<oneit:recalc mode="EscapeHTML" script="job.displayOccupation()" job="<%= job %>"/> <oneit:recalc mode="EscapeHTML" script="job.displayOccupation()" job="<%= job %>"/>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
<label><oneit:label GUIName="Job Type" /></label> <label><oneit:label GUIName="Job Type" /></label>
...@@ -415,6 +414,13 @@ ...@@ -415,6 +414,13 @@
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6">
<label><oneit:label GUIName="Assessment Length" /></label>
<div id="assessment_type"></div>
</div>
</div>
<div class="form-group row">
<div class="col-md-12"> <div class="col-md-12">
<div class="styled_checkboxes"> <div class="styled_checkboxes">
<div class="checkbox checkbox-primary"> <div class="checkbox checkbox-primary">
......
...@@ -33,6 +33,7 @@ Client.ContactName = Contact First Name ...@@ -33,6 +33,7 @@ Client.ContactName = Contact First Name
Client.ContactSurname = Contact Last Name Client.ContactSurname = Contact Last Name
Client.ClientLogo = Client Logo Client.ClientLogo = Client Logo
Client.State = State or Province Client.State = State or Province
Client.UseClientDetails = Display client name and logo for job applicants (if No, then use Hiring Team details)
Company.TimeZone = Time zone Company.TimeZone = Time zone
Company.HasClientSupport = We help clients with hiring Company.HasClientSupport = We help clients with hiring
......
<?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_client</tableName>
<column name="use_client_details" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_occupation</tableName>
<column name="parttime_assessment_type" type="String" nullable="true" length="200"/>
<column name="express_assessment_level_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
update tl_narrative set graphic_notes = 'Tends to focus on non-personal issues, displaying a limited concern for others'' welfare.' where narrative_code = 'W10ALV4';
update tl_narrative set graphic_notes = 'Tends to focus on professional issues, displaying a limited concern for others'' welfare.' where narrative_code = '10ALV4';
update tl_narrative set graphic_notes = 'Highly considerate of others'' welfare, but may find it difficult to remain objective when making strategic decisions.' where narrative_code = '10AVHV4';
update tl_narrative set graphic_notes = 'Highly considerate of others'' welfare, but may find it difficult to remain objective when making strategic decisions.' where narrative_code = 'M10AVHV4';
update tl_narrative set graphic_notes = 'Tends to focus on non-personal issues, displaying a limited concern for others'' welfare.' where narrative_code = 'M10ALV4';
update tl_narrative set graphic_notes = 'Tends to focus on non-personal issues, displaying a limited concern for others'' welfare.' where narrative_code = 'VW10ALV4';
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
$(document).ready(function(){ $(document).ready(function(){
recalcFunction = setupRecalc ($("form#editJob"), {'recalcOnError':true}); recalcFunction = setupRecalc ($("form#editJob"), {'recalcOnError':true});
$(".switch input[type='checkbox']").change(function() { $(".switch input[name$='IncludeCulture'] ").change(function() {
$("button[name$='changeCultureCriteria']").click(); $("button[name$='changeCultureCriteria']").click();
}); });
}); });
......
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