Commit cb5d7130 by Harsh Shah

View Application - Area Of Concern section for Role/Culture

parent a2fe4a0b
......@@ -9,7 +9,7 @@
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="score_number" type="Long" nullable="true"/>
<column name="color_rank" type="Long" nullable="true"/>
<column name="color_code" type="String" nullable="true" length="200"/>
<column name="wghtd_score" type="Long" nullable="true"/>
<column name="test_analysis_id" type="Long" length="11" nullable="true"/>
<column name="factor_number" type="Long" length="11" nullable="true"/>
......
......@@ -9,7 +9,7 @@ CREATE TABLE tl_score (
object_created_date datetime DEFAULT getdate() NOT NULL
,
score_number numeric(12) NULL,
color_rank numeric(12) NULL,
color_code varchar(200) NULL,
wghtd_score numeric(12) NULL,
test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL,
......
......@@ -10,7 +10,7 @@ CREATE TABLE tl_score (
object_created_date date DEFAULT SYSDATE NOT NULL
,
score_number number(12) NULL,
color_rank number(12) NULL,
color_code varchar2(200) NULL,
wghtd_score number(12) NULL,
test_analysis_id number(12) NULL,
factor_number number(12) NULL,
......
......@@ -10,7 +10,7 @@ CREATE TABLE tl_score (
object_created_date timestamp DEFAULT NOW() NOT NULL
,
score_number numeric(12) NULL,
color_rank numeric(12) NULL,
color_code varchar(200) NULL,
wghtd_score numeric(12) NULL,
test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL,
......
......@@ -41,9 +41,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
// Static constants corresponding to field names
public static final String FIELD_Score = "Score";
public static final String FIELD_ColorRank = "ColorRank";
public static final String FIELD_WghtdScore = "WghtdScore";
public static final String FIELD_ColorCode = "ColorCode";
public static final String FIELD_WghtdScore = "WghtdScore";
public static final String SINGLEREFERENCE_TestAnalysis = "TestAnalysis";
public static final String BACKREF_TestAnalysis = "";
public static final String SINGLEREFERENCE_Factor = "Factor";
......@@ -57,16 +56,14 @@ public abstract class BaseFactorScore extends BaseBusinessClass
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<FactorScore> HELPER_Score = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<FactorScore> HELPER_ColorRank = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<FactorScore> HELPER_WghtdScore = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<FactorScore, ColorCode> HELPER_ColorCode = new EnumeratedAttributeHelper<FactorScore, ColorCode> (ColorCode.FACTORY_ColorCode);
private static final DefaultAttributeHelper<FactorScore> HELPER_WghtdScore = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
private Integer _Score;
private Integer _ColorRank;
private Integer _WghtdScore;
private ColorCode _ColorCode;
private Integer _WghtdScore;
// Private attributes corresponding to single references
......@@ -83,9 +80,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
private static final Map ATTRIBUTES_METADATA_FactorScore = new HashMap ();
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_ColorCode_Validators;
private static final AttributeValidator[] FIELD_Score_Validators;
private static final AttributeValidator[] FIELD_ColorRank_Validators;
private static final AttributeValidator[] FIELD_ColorCode_Validators;
private static final AttributeValidator[] FIELD_WghtdScore_Validators;
......@@ -106,9 +102,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
setupAssocMetaData_Factor();
setupAssocMetaData_Level();
setupAssocMetaData_Narrative();
FIELD_ColorCode_Validators = (AttributeValidator[])setupAttribMetaData_ColorCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Score_Validators = (AttributeValidator[])setupAttribMetaData_Score(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ColorRank_Validators = (AttributeValidator[])setupAttribMetaData_ColorRank(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ColorCode_Validators = (AttributeValidator[])setupAttribMetaData_ColorCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_WghtdScore_Validators = (AttributeValidator[])setupAttribMetaData_WghtdScore(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -183,24 +178,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
// Meta Info setup
private static List setupAttribMetaData_ColorCode(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("name", "ColorCode");
metaInfo.put ("type", "ColorCode");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for FactorScore.ColorCode:", metaInfo);
ATTRIBUTES_METADATA_FactorScore.put (FIELD_ColorCode, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(FactorScore.class, "ColorCode", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for FactorScore.ColorCode:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_Score(Map validatorMapping)
{
Map metaInfo = new HashMap ();
......@@ -219,19 +196,20 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}
// Meta Info setup
private static List setupAttribMetaData_ColorRank(Map validatorMapping)
private static List setupAttribMetaData_ColorCode(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "color_rank");
metaInfo.put ("name", "ColorRank");
metaInfo.put ("type", "Integer");
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "color_code");
metaInfo.put ("name", "ColorCode");
metaInfo.put ("type", "ColorCode");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for FactorScore.ColorRank:", metaInfo);
ATTRIBUTES_METADATA_FactorScore.put (FIELD_ColorRank, Collections.unmodifiableMap (metaInfo));
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for FactorScore.ColorCode:", metaInfo);
ATTRIBUTES_METADATA_FactorScore.put (FIELD_ColorCode, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(FactorScore.class, "ColorRank", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for FactorScore.ColorRank:", validators);
List validators = BaseBusinessClass.getAttribValidators(FactorScore.class, "ColorCode", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for FactorScore.ColorCode:", validators);
return validators;
}
......@@ -282,9 +260,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Score = (Integer)(HELPER_Score.initialise (_Score));
_ColorRank = (Integer)(HELPER_ColorRank.initialise (_ColorRank));
_WghtdScore = (Integer)(HELPER_WghtdScore.initialise (_WghtdScore));
_ColorCode = (ColorCode)(HELPER_ColorCode.initialise (_ColorCode));
_WghtdScore = (Integer)(HELPER_WghtdScore.initialise (_WghtdScore));
}
......@@ -416,16 +393,16 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}
/**
* Get the attribute ColorRank
* Get the attribute ColorCode
*/
public Integer getColorRank ()
public ColorCode getColorCode ()
{
assertValid();
Integer valToReturn = _ColorRank;
ColorCode valToReturn = _ColorCode;
for (FactorScoreBehaviourDecorator bhd : FactorScore_BehaviourDecorators)
{
valToReturn = bhd.getColorRank ((FactorScore)this, valToReturn);
valToReturn = bhd.getColorCode ((FactorScore)this, valToReturn);
}
return valToReturn;
......@@ -437,7 +414,7 @@ public abstract class BaseFactorScore extends BaseBusinessClass
* 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 preColorRankChange (Integer newColorRank) throws FieldException
protected void preColorCodeChange (ColorCode newColorCode) throws FieldException
{
}
......@@ -447,46 +424,46 @@ public abstract class BaseFactorScore extends BaseBusinessClass
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postColorRankChange () throws FieldException
protected void postColorCodeChange () throws FieldException
{
}
public FieldWriteability getWriteability_ColorRank ()
public FieldWriteability getWriteability_ColorCode ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute ColorRank. Checks to ensure a new value
* Set the attribute ColorCode. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setColorRank (Integer newColorRank) throws FieldException
public void setColorCode (ColorCode newColorCode) throws FieldException
{
boolean oldAndNewIdentical = HELPER_ColorRank.compare (_ColorRank, newColorRank);
boolean oldAndNewIdentical = HELPER_ColorCode.compare (_ColorCode, newColorCode);
try
{
for (FactorScoreBehaviourDecorator bhd : FactorScore_BehaviourDecorators)
{
newColorRank = bhd.setColorRank ((FactorScore)this, newColorRank);
oldAndNewIdentical = HELPER_ColorRank.compare (_ColorRank, newColorRank);
newColorCode = bhd.setColorCode ((FactorScore)this, newColorCode);
oldAndNewIdentical = HELPER_ColorCode.compare (_ColorCode, newColorCode);
}
if (FIELD_ColorRank_Validators.length > 0)
if (FIELD_ColorCode_Validators.length > 0)
{
Object newColorRankObj = HELPER_ColorRank.toObject (newColorRank);
Object newColorCodeObj = HELPER_ColorCode.toObject (newColorCode);
if (newColorRankObj != null)
if (newColorCodeObj != null)
{
int loopMax = FIELD_ColorRank_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_FactorScore.get (FIELD_ColorRank);
int loopMax = FIELD_ColorCode_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_FactorScore.get (FIELD_ColorCode);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_ColorRank_Validators[v].checkAttribute (this, FIELD_ColorRank, metadata, newColorRankObj);
FIELD_ColorCode_Validators[v].checkAttribute (this, FIELD_ColorCode, metadata, newColorCodeObj);
}
}
}
......@@ -504,12 +481,12 @@ public abstract class BaseFactorScore extends BaseBusinessClass
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_ColorRank () != FieldWriteability.FALSE, "Field ColorRank is not writeable");
preColorRankChange (newColorRank);
markFieldChange (FIELD_ColorRank);
_ColorRank = newColorRank;
postFieldChange (FIELD_ColorRank);
postColorRankChange ();
Debug.assertion (getWriteability_ColorCode () != FieldWriteability.FALSE, "Field ColorCode is not writeable");
preColorCodeChange (newColorCode);
markFieldChange (FIELD_ColorCode);
_ColorCode = newColorCode;
postFieldChange (FIELD_ColorCode);
postColorCodeChange ();
}
}
......@@ -611,104 +588,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}
}
/**
* Get the attribute ColorCode
*/
public ColorCode getColorCode ()
{
assertValid();
ColorCode valToReturn = _ColorCode;
for (FactorScoreBehaviourDecorator bhd : FactorScore_BehaviourDecorators)
{
valToReturn = bhd.getColorCode ((FactorScore)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 preColorCodeChange (ColorCode newColorCode) 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 postColorCodeChange () throws FieldException
{
}
public FieldWriteability getWriteability_ColorCode ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute ColorCode. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setColorCode (ColorCode newColorCode) throws FieldException
{
boolean oldAndNewIdentical = HELPER_ColorCode.compare (_ColorCode, newColorCode);
try
{
for (FactorScoreBehaviourDecorator bhd : FactorScore_BehaviourDecorators)
{
newColorCode = bhd.setColorCode ((FactorScore)this, newColorCode);
oldAndNewIdentical = HELPER_ColorCode.compare (_ColorCode, newColorCode);
}
if (FIELD_ColorCode_Validators.length > 0)
{
Object newColorCodeObj = HELPER_ColorCode.toObject (newColorCode);
if (newColorCodeObj != null)
{
int loopMax = FIELD_ColorCode_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_FactorScore.get (FIELD_ColorCode);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_ColorCode_Validators[v].checkAttribute (this, FIELD_ColorCode, metadata, newColorCodeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_ColorCode () != FieldWriteability.FALSE, "Field ColorCode is not writeable");
preColorCodeChange (newColorCode);
markFieldChange (FIELD_ColorCode);
_ColorCode = newColorCode;
postFieldChange (FIELD_ColorCode);
postColorCodeChange ();
}
}
/**
......@@ -1478,7 +1357,7 @@ public abstract class BaseFactorScore extends BaseBusinessClass
tl_scorePSet.setAttrib (FIELD_ObjectID, myID);
tl_scorePSet.setAttrib (FIELD_Score, HELPER_Score.toObject (_Score)); //
tl_scorePSet.setAttrib (FIELD_ColorRank, HELPER_ColorRank.toObject (_ColorRank)); //
tl_scorePSet.setAttrib (FIELD_ColorCode, HELPER_ColorCode.toObject (_ColorCode)); //
tl_scorePSet.setAttrib (FIELD_WghtdScore, HELPER_WghtdScore.toObject (_WghtdScore)); //
_TestAnalysis.getPersistentSets (allSets);
_Factor.getPersistentSets (allSets);
......@@ -1499,7 +1378,7 @@ public abstract class BaseFactorScore extends BaseBusinessClass
PersistentSet tl_scorePSet = allSets.getPersistentSet (objectID, "tl_score");
_Score = (Integer)(HELPER_Score.fromObject (_Score, tl_scorePSet.getAttrib (FIELD_Score))); //
_ColorRank = (Integer)(HELPER_ColorRank.fromObject (_ColorRank, tl_scorePSet.getAttrib (FIELD_ColorRank))); //
_ColorCode = (ColorCode)(HELPER_ColorCode.fromObject (_ColorCode, tl_scorePSet.getAttrib (FIELD_ColorCode))); //
_WghtdScore = (Integer)(HELPER_WghtdScore.fromObject (_WghtdScore, tl_scorePSet.getAttrib (FIELD_WghtdScore))); //
_TestAnalysis.setFromPersistentSets (objectID, allSets);
_Factor.setFromPersistentSets (objectID, allSets);
......@@ -1531,7 +1410,7 @@ public abstract class BaseFactorScore extends BaseBusinessClass
try
{
setColorRank (otherFactorScore.getColorRank ());
setColorCode (otherFactorScore.getColorCode ());
}
catch (FieldException ex)
{
......@@ -1563,9 +1442,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
BaseFactorScore sourceFactorScore = (BaseFactorScore)(source);
_Score = sourceFactorScore._Score;
_ColorRank = sourceFactorScore._ColorRank;
_WghtdScore = sourceFactorScore._WghtdScore;
_ColorCode = sourceFactorScore._ColorCode;
_WghtdScore = sourceFactorScore._WghtdScore;
}
}
......@@ -1623,9 +1501,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
super.readExternalData(vals);
_Score = (Integer)(HELPER_Score.readExternal (_Score, vals.get(FIELD_Score))); //
_ColorRank = (Integer)(HELPER_ColorRank.readExternal (_ColorRank, vals.get(FIELD_ColorRank))); //
_WghtdScore = (Integer)(HELPER_WghtdScore.readExternal (_WghtdScore, vals.get(FIELD_WghtdScore))); //
_ColorCode = (ColorCode)(HELPER_ColorCode.readExternal (_ColorCode, vals.get(FIELD_ColorCode))); //
_WghtdScore = (Integer)(HELPER_WghtdScore.readExternal (_WghtdScore, vals.get(FIELD_WghtdScore))); //
_TestAnalysis.readExternalData(vals.get(SINGLEREFERENCE_TestAnalysis));
_Factor.readExternalData(vals.get(SINGLEREFERENCE_Factor));
_Level.readExternalData(vals.get(SINGLEREFERENCE_Level));
......@@ -1642,9 +1519,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
super.writeExternalData(vals);
vals.put (FIELD_Score, HELPER_Score.writeExternal (_Score));
vals.put (FIELD_ColorRank, HELPER_ColorRank.writeExternal (_ColorRank));
vals.put (FIELD_WghtdScore, HELPER_WghtdScore.writeExternal (_WghtdScore));
vals.put (FIELD_ColorCode, HELPER_ColorCode.writeExternal (_ColorCode));
vals.put (FIELD_WghtdScore, HELPER_WghtdScore.writeExternal (_WghtdScore));
vals.put (SINGLEREFERENCE_TestAnalysis, _TestAnalysis.writeExternalData());
vals.put (SINGLEREFERENCE_Factor, _Factor.writeExternalData());
vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData());
......@@ -1666,9 +1542,9 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
listener.notifyFieldChange(this, other, FIELD_Score, HELPER_Score.toObject(this._Score), HELPER_Score.toObject(otherFactorScore._Score));
}
if (!HELPER_ColorRank.compare(this._ColorRank, otherFactorScore._ColorRank))
if (!HELPER_ColorCode.compare(this._ColorCode, otherFactorScore._ColorCode))
{
listener.notifyFieldChange(this, other, FIELD_ColorRank, HELPER_ColorRank.toObject(this._ColorRank), HELPER_ColorRank.toObject(otherFactorScore._ColorRank));
listener.notifyFieldChange(this, other, FIELD_ColorCode, HELPER_ColorCode.toObject(this._ColorCode), HELPER_ColorCode.toObject(otherFactorScore._ColorCode));
}
if (!HELPER_WghtdScore.compare(this._WghtdScore, otherFactorScore._WghtdScore))
{
......@@ -1692,7 +1568,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_ColorCode, HELPER_ColorCode.toObject(getColorCode()));
}
......@@ -1702,7 +1577,7 @@ public abstract class BaseFactorScore extends BaseBusinessClass
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_Score, HELPER_Score.toObject(getScore()));
visitor.visitField(this, FIELD_ColorRank, HELPER_ColorRank.toObject(getColorRank()));
visitor.visitField(this, FIELD_ColorCode, HELPER_ColorCode.toObject(getColorCode()));
visitor.visitField(this, FIELD_WghtdScore, HELPER_WghtdScore.toObject(getWghtdScore()));
visitor.visitAssociation (_TestAnalysis);
visitor.visitAssociation (_Factor);
......@@ -1761,9 +1636,9 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
return filter.matches (getScore ());
}
else if (attribName.equals (FIELD_ColorRank))
else if (attribName.equals (FIELD_ColorCode))
{
return filter.matches (getColorRank ());
return filter.matches (getColorCode ());
}
else if (attribName.equals (FIELD_WghtdScore))
{
......@@ -1822,9 +1697,9 @@ public abstract class BaseFactorScore extends BaseBusinessClass
return this;
}
public SearchAll andColorRank (QueryFilter<Integer> filter)
public SearchAll andColorCode (QueryFilter<ColorCode> filter)
{
filter.addFilter (context, "tl_score.color_rank", "ColorRank");
filter.addFilter (context, "tl_score.color_code", "ColorCode");
return this;
}
......@@ -1897,18 +1772,14 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
return HELPER_Score.toObject (getScore ());
}
else if (attribName.equals (FIELD_ColorRank))
else if (attribName.equals (FIELD_ColorCode))
{
return HELPER_ColorRank.toObject (getColorRank ());
return HELPER_ColorCode.toObject (getColorCode ());
}
else if (attribName.equals (FIELD_WghtdScore))
{
return HELPER_WghtdScore.toObject (getWghtdScore ());
}
else if (attribName.equals (FIELD_ColorCode))
{
return HELPER_ColorCode.toObject (getColorCode ());
}
else
{
return super.getAttribute (attribName);
......@@ -1926,18 +1797,14 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
return HELPER_Score;
}
else if (attribName.equals (FIELD_ColorRank))
else if (attribName.equals (FIELD_ColorCode))
{
return HELPER_ColorRank;
return HELPER_ColorCode;
}
else if (attribName.equals (FIELD_WghtdScore))
{
return HELPER_WghtdScore;
}
else if (attribName.equals (FIELD_ColorCode))
{
return HELPER_ColorCode;
}
else
{
return super.getAttributeHelper (attribName);
......@@ -1955,18 +1822,14 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
setScore ((Integer)(HELPER_Score.fromObject (_Score, attribValue)));
}
else if (attribName.equals (FIELD_ColorRank))
else if (attribName.equals (FIELD_ColorCode))
{
setColorRank ((Integer)(HELPER_ColorRank.fromObject (_ColorRank, attribValue)));
setColorCode ((ColorCode)(HELPER_ColorCode.fromObject (_ColorCode, attribValue)));
}
else if (attribName.equals (FIELD_WghtdScore))
{
setWghtdScore ((Integer)(HELPER_WghtdScore.fromObject (_WghtdScore, attribValue)));
}
else if (attribName.equals (FIELD_ColorCode))
{
setColorCode ((ColorCode)(HELPER_ColorCode.fromObject (_ColorCode, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
......@@ -1991,9 +1854,9 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
return getWriteability_Score ();
}
else if (fieldName.equals (FIELD_ColorRank))
else if (fieldName.equals (FIELD_ColorCode))
{
return getWriteability_ColorRank ();
return getWriteability_ColorCode ();
}
else if (fieldName.equals (FIELD_WghtdScore))
{
......@@ -2015,10 +1878,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{
return getWriteability_Narrative ();
}
else if (fieldName.equals (FIELD_ColorCode))
{
return getWriteability_ColorCode ();
}
else
{
return super.getWriteable (fieldName);
......@@ -2034,9 +1893,9 @@ public abstract class BaseFactorScore extends BaseBusinessClass
fields.add (FIELD_Score);
}
if (getWriteability_ColorRank () != FieldWriteability.TRUE)
if (getWriteability_ColorCode () != FieldWriteability.TRUE)
{
fields.add (FIELD_ColorRank);
fields.add (FIELD_ColorCode);
}
if (getWriteability_WghtdScore () != FieldWriteability.TRUE)
......@@ -2044,11 +1903,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
fields.add (FIELD_WghtdScore);
}
if (getWriteability_ColorCode () != FieldWriteability.TRUE)
{
fields.add (FIELD_ColorCode);
}
super.putUnwriteable (fields);
}
......@@ -2059,9 +1913,8 @@ public abstract class BaseFactorScore extends BaseBusinessClass
result.add(HELPER_Score.getAttribObject (getClass (), _Score, false, FIELD_Score));
result.add(HELPER_ColorRank.getAttribObject (getClass (), _ColorRank, false, FIELD_ColorRank));
result.add(HELPER_WghtdScore.getAttribObject (getClass (), _WghtdScore, false, FIELD_WghtdScore));
result.add(HELPER_ColorCode.getAttribObject (getClass (), _ColorCode, false, FIELD_ColorCode));
result.add(HELPER_WghtdScore.getAttribObject (getClass (), _WghtdScore, false, FIELD_WghtdScore));
return result;
}
......@@ -2131,21 +1984,21 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}
/**
* Get the attribute ColorRank
* Get the attribute ColorCode
*/
public Integer getColorRank (FactorScore obj, Integer original)
public ColorCode getColorCode (FactorScore obj, ColorCode original)
{
return original;
}
/**
* Change the value set for attribute ColorRank.
* Change the value set for attribute ColorCode.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setColorRank (FactorScore obj, Integer newColorRank) throws FieldException
public ColorCode setColorCode (FactorScore obj, ColorCode newColorCode) throws FieldException
{
return newColorRank;
return newColorCode;
}
/**
......@@ -2166,24 +2019,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
return newWghtdScore;
}
/**
* Get the attribute ColorCode
*/
public ColorCode getColorCode (FactorScore obj, ColorCode original)
{
return original;
}
/**
* Change the value set for attribute ColorCode.
* May modify the field beforehand
* Occurs before validation.
*/
public ColorCode setColorCode (FactorScore obj, ColorCode newColorCode) throws FieldException
{
return newColorCode;
}
}
......@@ -2236,17 +2071,13 @@ public abstract class BaseFactorScore extends BaseBusinessClass
public PipeLine<From, ? extends Object> to(String name)
{
if (name.equals ("ColorCode"))
{
return toColorCode ();
}
if (name.equals ("Score"))
{
return toScore ();
}
if (name.equals ("ColorRank"))
if (name.equals ("ColorCode"))
{
return toColorRank ();
return toColorCode ();
}
if (name.equals ("WghtdScore"))
{
......@@ -2274,11 +2105,9 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}
public PipeLine<From, ColorCode> toColorCode () { return pipe(new ORMAttributePipe<Me, ColorCode>(FIELD_ColorCode)); }
public PipeLine<From, Integer> toScore () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_Score)); }
public PipeLine<From, Integer> toColorRank () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_ColorRank)); }
public PipeLine<From, ColorCode> toColorCode () { return pipe(new ORMAttributePipe<Me, ColorCode>(FIELD_ColorCode)); }
public PipeLine<From, Integer> toWghtdScore () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_WghtdScore)); }
public TestAnalysis.TestAnalysisPipeLineFactory<From, TestAnalysis> toTestAnalysis () { return toTestAnalysis (Filter.ALL); }
......@@ -2311,11 +2140,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
public boolean isTransientAttrib(String attribName)
{
if(CollectionUtils.equals(attribName, "ColorCode"))
{
return true;
}
return super.isTransientAttrib(attribName);
}
......
......@@ -48,6 +48,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public static final String FIELD_RoleFit = "RoleFit";
public static final String FIELD_RequirementFit = "RequirementFit";
public static final String FIELD_CultureFit = "CultureFit";
public static final String FIELD_FactorScoreDetails = "FactorScoreDetails";
public static final String SINGLEREFERENCE_Candidate = "Candidate";
public static final String BACKREF_Candidate = "";
public static final String SINGLEREFERENCE_Job = "Job";
......@@ -69,6 +70,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
private static final BLOBAttributeHelper HELPER_RoleFit = BLOBAttributeHelper.INSTANCE;
private static final BLOBAttributeHelper HELPER_RequirementFit = BLOBAttributeHelper.INSTANCE;
private static final BLOBAttributeHelper HELPER_CultureFit = BLOBAttributeHelper.INSTANCE;
private static final BLOBAttributeHelper HELPER_FactorScoreDetails = BLOBAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
......@@ -80,6 +82,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
private Map _RoleFit;
private Map _RequirementFit;
private Map _CultureFit;
private Map _FactorScoreDetails;
// Private attributes corresponding to single references
......@@ -100,6 +103,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
private static final AttributeValidator[] FIELD_RoleFit_Validators;
private static final AttributeValidator[] FIELD_RequirementFit_Validators;
private static final AttributeValidator[] FIELD_CultureFit_Validators;
private static final AttributeValidator[] FIELD_FactorScoreDetails_Validators;
private static final AttributeValidator[] FIELD_CV_Validators;
private static final AttributeValidator[] FIELD_ApplicationStatus_Validators;
private static final AttributeValidator[] FIELD_SubmittedDate_Validators;
......@@ -127,6 +131,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
FIELD_RoleFit_Validators = (AttributeValidator[])setupAttribMetaData_RoleFit(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_RequirementFit_Validators = (AttributeValidator[])setupAttribMetaData_RequirementFit(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CultureFit_Validators = (AttributeValidator[])setupAttribMetaData_CultureFit(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_FactorScoreDetails_Validators = (AttributeValidator[])setupAttribMetaData_FactorScoreDetails(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CV_Validators = (AttributeValidator[])setupAttribMetaData_CV(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ApplicationStatus_Validators = (AttributeValidator[])setupAttribMetaData_ApplicationStatus(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_SubmittedDate_Validators = (AttributeValidator[])setupAttribMetaData_SubmittedDate(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -283,6 +288,25 @@ public abstract class BaseJobApplication extends BaseBusinessClass
}
// Meta Info setup
private static List setupAttribMetaData_FactorScoreDetails(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "BLOBAttributeHelper");
metaInfo.put ("attribHelperInstance", "BLOBAttributeHelper.INSTANCE");
metaInfo.put ("name", "FactorScoreDetails");
metaInfo.put ("type", "Map");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for JobApplication.FactorScoreDetails:", metaInfo);
ATTRIBUTES_METADATA_JobApplication.put (FIELD_FactorScoreDetails, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(JobApplication.class, "FactorScoreDetails", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for JobApplication.FactorScoreDetails:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_CV(Map validatorMapping)
{
Map metaInfo = new HashMap ();
......@@ -378,6 +402,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_RoleFit = (Map)(HELPER_RoleFit.initialise (_RoleFit));
_RequirementFit = (Map)(HELPER_RequirementFit.initialise (_RequirementFit));
_CultureFit = (Map)(HELPER_CultureFit.initialise (_CultureFit));
_FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.initialise (_FactorScoreDetails));
}
......@@ -1193,6 +1218,104 @@ public abstract class BaseJobApplication extends BaseBusinessClass
}
}
/**
* Get the attribute FactorScoreDetails
*/
public Map getFactorScoreDetails ()
{
assertValid();
Map valToReturn = _FactorScoreDetails;
for (JobApplicationBehaviourDecorator bhd : JobApplication_BehaviourDecorators)
{
valToReturn = bhd.getFactorScoreDetails ((JobApplication)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preFactorScoreDetailsChange (Map newFactorScoreDetails) 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 postFactorScoreDetailsChange () throws FieldException
{
}
public FieldWriteability getWriteability_FactorScoreDetails ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute FactorScoreDetails. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setFactorScoreDetails (Map newFactorScoreDetails) throws FieldException
{
boolean oldAndNewIdentical = HELPER_FactorScoreDetails.compare (_FactorScoreDetails, newFactorScoreDetails);
try
{
for (JobApplicationBehaviourDecorator bhd : JobApplication_BehaviourDecorators)
{
newFactorScoreDetails = bhd.setFactorScoreDetails ((JobApplication)this, newFactorScoreDetails);
oldAndNewIdentical = HELPER_FactorScoreDetails.compare (_FactorScoreDetails, newFactorScoreDetails);
}
if (FIELD_FactorScoreDetails_Validators.length > 0)
{
Object newFactorScoreDetailsObj = HELPER_FactorScoreDetails.toObject (newFactorScoreDetails);
if (newFactorScoreDetailsObj != null)
{
int loopMax = FIELD_FactorScoreDetails_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_JobApplication.get (FIELD_FactorScoreDetails);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_FactorScoreDetails_Validators[v].checkAttribute (this, FIELD_FactorScoreDetails, metadata, newFactorScoreDetailsObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_FactorScoreDetails () != FieldWriteability.FALSE, "Field FactorScoreDetails is not writeable");
preFactorScoreDetailsChange (newFactorScoreDetails);
markFieldChange (FIELD_FactorScoreDetails);
_FactorScoreDetails = newFactorScoreDetails;
postFieldChange (FIELD_FactorScoreDetails);
postFactorScoreDetailsChange ();
}
}
/**
......@@ -1946,6 +2069,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_RoleFit = sourceJobApplication._RoleFit;
_RequirementFit = sourceJobApplication._RequirementFit;
_CultureFit = sourceJobApplication._CultureFit;
_FactorScoreDetails = sourceJobApplication._FactorScoreDetails;
}
}
......@@ -2013,6 +2137,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_RoleFit = (Map)(HELPER_RoleFit.readExternal (_RoleFit, vals.get(FIELD_RoleFit))); //
_RequirementFit = (Map)(HELPER_RequirementFit.readExternal (_RequirementFit, vals.get(FIELD_RequirementFit))); //
_CultureFit = (Map)(HELPER_CultureFit.readExternal (_CultureFit, vals.get(FIELD_CultureFit))); //
_FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.readExternal (_FactorScoreDetails, vals.get(FIELD_FactorScoreDetails))); //
_Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate));
_Job.readExternalData(vals.get(SINGLEREFERENCE_Job));
_AssessmentCriteriaAnswers.readExternalData(vals.get(MULTIPLEREFERENCE_AssessmentCriteriaAnswers));
......@@ -2035,6 +2160,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
vals.put (FIELD_RoleFit, HELPER_RoleFit.writeExternal (_RoleFit));
vals.put (FIELD_RequirementFit, HELPER_RequirementFit.writeExternal (_RequirementFit));
vals.put (FIELD_CultureFit, HELPER_CultureFit.writeExternal (_CultureFit));
vals.put (FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.writeExternal (_FactorScoreDetails));
vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData());
vals.put (SINGLEREFERENCE_Job, _Job.writeExternalData());
vals.put (MULTIPLEREFERENCE_AssessmentCriteriaAnswers, _AssessmentCriteriaAnswers.writeExternalData());
......@@ -2085,6 +2211,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
visitor.visitField(this, FIELD_RoleFit, HELPER_RoleFit.toObject(getRoleFit()));
visitor.visitField(this, FIELD_RequirementFit, HELPER_RequirementFit.toObject(getRequirementFit()));
visitor.visitField(this, FIELD_CultureFit, HELPER_CultureFit.toObject(getCultureFit()));
visitor.visitField(this, FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.toObject(getFactorScoreDetails()));
}
......@@ -2411,6 +2538,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{
return HELPER_CultureFit.toObject (getCultureFit ());
}
else if (attribName.equals (FIELD_FactorScoreDetails))
{
return HELPER_FactorScoreDetails.toObject (getFactorScoreDetails ());
}
else
{
return super.getAttribute (attribName);
......@@ -2456,6 +2587,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{
return HELPER_CultureFit;
}
else if (attribName.equals (FIELD_FactorScoreDetails))
{
return HELPER_FactorScoreDetails;
}
else
{
return super.getAttributeHelper (attribName);
......@@ -2501,6 +2636,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{
setCultureFit ((Map)(HELPER_CultureFit.fromObject (_CultureFit, attribValue)));
}
else if (attribName.equals (FIELD_FactorScoreDetails))
{
setFactorScoreDetails ((Map)(HELPER_FactorScoreDetails.fromObject (_FactorScoreDetails, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
......@@ -2565,6 +2704,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{
return getWriteability_CultureFit ();
}
else if (fieldName.equals (FIELD_FactorScoreDetails))
{
return getWriteability_FactorScoreDetails ();
}
else
{
return super.getWriteable (fieldName);
......@@ -2615,6 +2758,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
fields.add (FIELD_CultureFit);
}
if (getWriteability_FactorScoreDetails () != FieldWriteability.TRUE)
{
fields.add (FIELD_FactorScoreDetails);
}
super.putUnwriteable (fields);
}
......@@ -2632,6 +2780,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
result.add(HELPER_RoleFit.getAttribObject (getClass (), _RoleFit, false, FIELD_RoleFit));
result.add(HELPER_RequirementFit.getAttribObject (getClass (), _RequirementFit, false, FIELD_RequirementFit));
result.add(HELPER_CultureFit.getAttribObject (getClass (), _CultureFit, false, FIELD_CultureFit));
result.add(HELPER_FactorScoreDetails.getAttribObject (getClass (), _FactorScoreDetails, false, FIELD_FactorScoreDetails));
return result;
}
......@@ -2844,6 +2993,24 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return newCultureFit;
}
/**
* Get the attribute FactorScoreDetails
*/
public Map getFactorScoreDetails (JobApplication obj, Map original)
{
return original;
}
/**
* Change the value set for attribute FactorScoreDetails.
* May modify the field beforehand
* Occurs before validation.
*/
public Map setFactorScoreDetails (JobApplication obj, Map newFactorScoreDetails) throws FieldException
{
return newFactorScoreDetails;
}
}
......@@ -2920,6 +3087,10 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{
return toCultureFit ();
}
if (name.equals ("FactorScoreDetails"))
{
return toFactorScoreDetails ();
}
if (name.equals ("CV"))
{
return toCV ();
......@@ -2956,6 +3127,8 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public PipeLine<From, Map> toCultureFit () { return pipe(new ORMAttributePipe<Me, Map>(FIELD_CultureFit)); }
public PipeLine<From, Map> toFactorScoreDetails () { return pipe(new ORMAttributePipe<Me, Map>(FIELD_FactorScoreDetails)); }
public PipeLine<From, BinaryContent> toCV () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_CV)); }
public PipeLine<From, ApplicationStatus> toApplicationStatus () { return pipe(new ORMAttributePipe<Me, ApplicationStatus>(FIELD_ApplicationStatus)); }
......@@ -3010,6 +3183,11 @@ public abstract class BaseJobApplication extends BaseBusinessClass
return true;
}
if(CollectionUtils.equals(attribName, "FactorScoreDetails"))
{
return true;
}
return super.isTransientAttrib(attribName);
}
......
......@@ -16,4 +16,9 @@ public class FactorScore extends BaseFactorScore
{
return "FactorScore";
}
public Integer getColorRank()
{
return getColorCode() != null ? getColorCode().getColorRank() : 0;
}
}
\ No newline at end of file
......@@ -6,13 +6,11 @@
<IMPORT value="performa.orm.types.*"/>
<TRANSIENT name="ColorCode" type="ColorCode" attribHelper="EnumeratedAttributeHelper"/>
<TABLE name="tl_score" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Score" type="Integer" dbcol="score_number"/>
<ATTRIB name="ColorRank" type="Integer" dbcol="color_rank" />
<ATTRIB name="WghtdScore" type="Integer" dbcol="wghtd_score" />
<ATTRIB name="Score" type="Integer" dbcol="score_number"/>
<ATTRIB name="ColorCode" type="ColorCode" dbcol="color_code" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="WghtdScore" type="Integer" dbcol="wghtd_score" />
<SINGLEREFERENCE name="TestAnalysis" type="TestAnalysis" dbcol="test_analysis_id" backreferenceName="FactorScores"/>
<SINGLEREFERENCE name="Factor" type="Factor" dbcol="factor_number"/>
......
......@@ -28,13 +28,13 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
// Private attributes corresponding to business object data
private Integer dummyScore;
private Integer dummyColorRank;
private ColorCode dummyColorCode;
private Integer dummyWghtdScore;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Score = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_ColorRank = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_ColorCode = new EnumeratedAttributeHelper (ColorCode.FACTORY_ColorCode);
private static final DefaultAttributeHelper HELPER_WghtdScore = DefaultAttributeHelper.INSTANCE;
......@@ -43,12 +43,12 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
public FactorScorePersistenceMgr ()
{
dummyScore = (Integer)(HELPER_Score.initialise (dummyScore));
dummyColorRank = (Integer)(HELPER_ColorRank.initialise (dummyColorRank));
dummyColorCode = (ColorCode)(HELPER_ColorCode.initialise (dummyColorCode));
dummyWghtdScore = (Integer)(HELPER_WghtdScore.initialise (dummyWghtdScore));
}
private String SELECT_COLUMNS = "{PREFIX}tl_score.object_id as id, {PREFIX}tl_score.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_score.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_score.score_number, {PREFIX}tl_score.color_rank, {PREFIX}tl_score.wghtd_score, {PREFIX}tl_score.test_analysis_id, {PREFIX}tl_score.factor_number, {PREFIX}tl_score.level_number, {PREFIX}tl_score.narrative_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_score.object_id as id, {PREFIX}tl_score.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_score.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_score.score_number, {PREFIX}tl_score.color_code, {PREFIX}tl_score.wghtd_score, {PREFIX}tl_score.test_analysis_id, {PREFIX}tl_score.factor_number, {PREFIX}tl_score.level_number, {PREFIX}tl_score.narrative_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -100,7 +100,7 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
// Check for persistent sets already prefetched
if (false || !tl_scorePSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_scorePSet.containsAttrib(FactorScore.FIELD_Score)||
!tl_scorePSet.containsAttrib(FactorScore.FIELD_ColorRank)||
!tl_scorePSet.containsAttrib(FactorScore.FIELD_ColorCode)||
!tl_scorePSet.containsAttrib(FactorScore.FIELD_WghtdScore)||
!tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_TestAnalysis)||
!tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Factor)||
......@@ -195,10 +195,10 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_score " +
"SET score_number = ?, color_rank = ?, wghtd_score = ?, test_analysis_id = ? , factor_number = ? , level_number = ? , narrative_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET score_number = ?, color_code = ?, wghtd_score = ?, test_analysis_id = ? , factor_number = ? , level_number = ? , narrative_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_score.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorRank.getForSQL(dummyColorRank, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorRank))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorCode.getForSQL(dummyColorCode, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorCode))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -455,7 +455,7 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
tl_scorePSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_scorePSet.setAttrib(FactorScore.FIELD_Score, HELPER_Score.getFromRS(dummyScore, r, "score_number"));
tl_scorePSet.setAttrib(FactorScore.FIELD_ColorRank, HELPER_ColorRank.getFromRS(dummyColorRank, r, "color_rank"));
tl_scorePSet.setAttrib(FactorScore.FIELD_ColorCode, HELPER_ColorCode.getFromRS(dummyColorCode, r, "color_code"));
tl_scorePSet.setAttrib(FactorScore.FIELD_WghtdScore, HELPER_WghtdScore.getFromRS(dummyWghtdScore, r, "wghtd_score"));
tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_TestAnalysis, r.getObject ("test_analysis_id"));
......@@ -478,10 +478,10 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_score " +
" (score_number, color_rank, wghtd_score, test_analysis_id, factor_number, level_number, narrative_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (score_number, color_code, wghtd_score, test_analysis_id, factor_number, level_number, narrative_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorRank.getForSQL(dummyColorRank, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorRank))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))) .listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))) .listEntry (objectID.longID ()).toList().toArray());
CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorCode.getForSQL(dummyColorCode, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorCode))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))) .listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))) .listEntry (objectID.longID ()).toList().toArray());
tl_scorePSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -6,6 +6,7 @@ import oneit.objstore.*;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.objstore.rdbms.filters.IsNotNullFilter;
import oneit.objstore.rdbms.filters.NotEqualsFilter;
import oneit.objstore.utils.ObjstoreUtils;
import oneit.utils.*;
import oneit.utils.filter.CollectionFilter;
import oneit.utils.filter.Filter;
......@@ -304,6 +305,33 @@ public class JobApplication extends BaseJobApplication
}
return super.getOverallRank();
}
@Override
public Map getFactorScoreDetails()
{
if(super.getFactorScoreDetails() == null && getCandidate() != null && getJob() != null && getJob().getLevel() != null)
{
try
{
Map<FactorClass, Map<FactorLevelLink, Map>> factorScoreDetails = new LinkedHashMap();
Map<FactorClass, Tuple.T2<Double, ColorCode>> roleScoreMap = (Map<FactorClass, Tuple.T2<Double, ColorCode>>) getRoleFit();
for(FactorClass factorClass : getSortedFactorClasses())
{
if(roleScoreMap.get(factorClass) != null && roleScoreMap.get(factorClass).get0() > 0d)
{
factorScoreDetails.put(factorClass, AnalysisEngine.getFactorScoreDetails(getCandidate(), getJob().getLevel(), factorClass));
}
}
setFactorScoreDetails(factorScoreDetails);
}
catch (FieldException ex)
{
LogMgr.log(LOG, LogLevel.PROCESSING1, ex, "Error occured when setting FactorScoreDetails for " + this);
}
}
return super.getFactorScoreDetails();
}
public Double getRoleFitScore()
{
......@@ -484,4 +512,67 @@ public class JobApplication extends BaseJobApplication
return answersByImportance;
}
public List<FactorScore> getRoleAreaOfConcerns()
{
Map<FactorClass, Map<FactorLevelLink, Map>> factorScoreDetails = getFactorScoreDetails();
List<FactorScore> factorScores = new ArrayList();
if(factorScoreDetails != null)
{
for(FactorClass factorClass : factorScoreDetails.keySet())
{
Map<FactorLevelLink, Map> factorDetails = factorScoreDetails.get(factorClass);
Collection<FactorLevelLink> sortedLinks = ObjstoreUtils.sort(factorDetails.keySet(),
new ObjectTransform[]{FactorLevelLink.pipesFactorLevelLink().toFactor().toObjectID()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR});
for(FactorLevelLink factorLevelLink : sortedLinks)
{
Map factorLinkDetails = factorDetails.get(factorLevelLink);
if(!factorLinkDetails.isEmpty())
{
FactorScore factorScore = (FactorScore) factorLinkDetails.get("factorScore");
if(factorScore != null && factorScore.getFactor() != null && factorScore.getColorCode() != null && factorScore.getColorCode() != ColorCode.GREEN) //SCORE.COLOR_RANK > 1 as per apollo
{
LevelFactorType levelFactorType = factorLevelLink.getLevel().getLevelFactorType(factorScore.getFactor());
if(levelFactorType != null && levelFactorType.getTypeFlag() == TypeFlag.PRIMARY)
{
factorScores.add(factorScore);
}
}
}
}
}
}
return factorScores;
}
public List<Tuple.T2> getCultureAreaOfConcerns()
{
Map<CultureClass, Tuple.T2<Long, Set<Tuple.T3>>> cultureFitData = (Map<CultureClass, Tuple.T2<Long, Set<Tuple.T3>>>) getCultureFit();
List<Tuple.T2> result = new ArrayList();
for(CultureClass cClass : cultureFitData.keySet())
{
if(cClass == null || cultureFitData.get(cClass) == null)
{
continue;
}
for(Tuple.T3 tuple : cultureFitData.get(cClass).get1())
{
CultureNarrative cultureNarrative = (CultureNarrative) tuple.get2();
if(cultureNarrative != null && cultureNarrative.getColorCode() != null && cultureNarrative.getColorCode() != ColorCode.GREEN)
{
result.add(new Tuple.T2(tuple.get1(), cultureNarrative.getColorCode()));
}
}
}
return result;
}
}
\ No newline at end of file
......@@ -7,11 +7,12 @@
<MULTIPLEREFERENCE name="AssessmentCriteriaAnswers" type="AssessmentCriteriaAnswer" backreferenceName="JobApplication" />
<TRANSIENT name="AppProcessOption" type="AppProcessOption" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="OverallRank" type="Integer" />
<TRANSIENT name="RoleFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="RequirementFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="CultureFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="AppProcessOption" type="AppProcessOption" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="OverallRank" type="Integer" />
<TRANSIENT name="RoleFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="RequirementFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="CultureFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="FactorScoreDetails" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TABLE name="tl_job_application" tablePrefix="object" polymorphic="FALSE">
......
......@@ -122,7 +122,6 @@ public class AnalysisEngine
factorScore.setLevel(level);
factorScore.setScore(score);
factorScore.setColorCode(factorScoreResult.getColorCode());
factorScore.setColorRank(factorScoreResult.getColorCode() != null ? factorScoreResult.getColorCode().getColorRank() : 0);
factorScore.setNarrative(factorScoreResult.getNarrative());
/**
......
......@@ -97,8 +97,10 @@
<div class="applicant-sub-part">
<div class="applicant-left">
<%
Tuple.T2<Double, ColorCode> roleFitData = (jobApplication.getRoleFit()!=null && jobApplication.getRoleFit().get(null)!=null) ? (Tuple.T2<Double, ColorCode>) jobApplication.getRoleFit().get(null) : null;
String colorClass = "percent-" +(roleFitData!=null ? roleFitData.get1().getCSSClass() : "green");
Tuple.T2<Double, ColorCode> roleFitData = (jobApplication.getRoleFit()!=null && jobApplication.getRoleFit().get(null)!=null) ? (Tuple.T2<Double, ColorCode>) jobApplication.getRoleFit().get(null) : null;
String colorClass = "percent-" +(roleFitData!=null ? roleFitData.get1().getCSSClass() : "green");
List<FactorScore> factorScores = jobApplication.getRoleAreaOfConcerns();
List<Tuple.T2> cultureConcerns = jobApplication.getCultureAreaOfConcerns();
%>
<div class="applicant-progress">
<div class="<%= job.getIncludeAssessmentCriteria()==Boolean.TRUE ? "col-sm-4" : "col-sm-6" %> col-xs-12 text-center thr-block role-fit" href="#1a" data-toggle="tab" id="progress1" onClick="tabToggle('#tab1', '.role-fit')">
......@@ -107,22 +109,44 @@
<p style="display:none;"><oneit:toString value="<%= roleFitData.get0() %>" mode="TwoDPDouble" nullValue="0"/></p>
</div>
<div class="row four-label">
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<div class="a-label-row">
<span class="common-dot yellow-dot"></span><span class="r-y-label text-dot-dot">Achievement</span>
</div>
<div class="a-label-row">
<span class="common-dot red-dot"></span><span class="r-y-label text-dot-dot">Item with a long ti</span>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<div class="a-label-row">
<span class="common-dot yellow-dot"></span><span class="r-y-label text-dot-dot">Remuneration</span>
</div>
<div class="a-label-row">
<span class="common-dot red-dot"></span><span class="r-y-label text-dot-dot">Item title</span>
</div>
</div>
<%
if(!factorScores.isEmpty())
{
int rowCount = (factorScores.size() % 2 == 0) ? (factorScores.size() / 2) : ((factorScores.size() + 1) / 2);
for(int i = 0; i < rowCount; i++)
{
FactorScore firstScore = factorScores.get(i*2);
FactorScore secondScore = (factorScores.size() > ((i*2) + 1)) ? factorScores.get((i*2) + 1) : null;
String dotClass = firstScore.getColorCode() != null ? firstScore.getColorCode().getDotCSSClass() : "";
%>
<div class="a-label-row">
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<span class="common-dot <%= dotClass %>"></span>
<span class="r-y-label text-dot-dot">
<oneit:toString value="<%= firstScore.getFactor() %>" mode="EscapeHTML"/>
</span>
</div>
<%
if(secondScore != null)
{
dotClass = secondScore.getColorCode() != null ? secondScore.getColorCode().getDotCSSClass() : "";
%>
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<span class="common-dot <%= dotClass %>"></span>
<span class="r-y-label text-dot-dot">
<oneit:toString value="<%= secondScore.getFactor() %>" mode="EscapeHTML"/>
</span>
</div>
<%
}
%>
</div>
<%
}
}
%>
</div>
</div>
<div class="<%= job.getIncludeAssessmentCriteria()==Boolean.TRUE ? "col-sm-4" : "col-sm-4" %> col-xs-12 text-center thr-block culture-fit" href="#2a" data-toggle="tab" id="progress2" onClick="tabToggle('#tab2', '.culture-fit')">
......@@ -131,19 +155,44 @@
<p style="display:none;"><oneit:toString value="<%= jobApplication.getCultureFitScore() %>" mode="TwoDPDouble" /></p>
</div>
<div class="row four-label">
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<div class="a-label-row">
<span class="common-dot yellow-dot"></span><span class="r-y-label text-dot-dot">Achievement</span>
</div>
<div class="a-label-row">
<span class="common-dot red-dot"></span><span class="r-y-label text-dot-dot">Item title</span>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<div class="a-label-row">
<span class="common-dot yellow-dot"></span><span class="r-y-label text-dot-dot">Remuneration</span>
</div>
</div>
<%
if(!cultureConcerns.isEmpty())
{
int rowCount = (cultureConcerns.size() % 2 == 0) ? (cultureConcerns.size() / 2) : ((cultureConcerns.size() + 1) / 2);
for(int i = 0; i < rowCount; i++)
{
Tuple.T2 firstTuple = cultureConcerns.get(i*2);
Tuple.T2 secondTuple = (cultureConcerns.size() > ((i*2) + 1)) ? cultureConcerns.get((i*2) + 1) : null;
String dotClass = ((ColorCode)firstTuple.get1()).getDotCSSClass();
%>
<div class="a-label-row">
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<span class="common-dot <%= dotClass %>"></span>
<span class="r-y-label text-dot-dot">
<oneit:toString value="<%= firstTuple.get0() %>" mode="EscapeHTML"/>
</span>
</div>
<%
if(secondTuple != null)
{
dotClass = ((ColorCode)secondTuple.get1()).getDotCSSClass();
%>
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<span class="common-dot <%= dotClass %>"></span>
<span class="r-y-label text-dot-dot">
<oneit:toString value="<%= secondTuple.get0() %>" mode="EscapeHTML"/>
</span>
</div>
<%
}
%>
</div>
<%
}
}
%>
</div>
</div>
<%
......@@ -179,74 +228,73 @@
<div class="tab-content clearfix">
<div class="tab-pane active" id="1a">
<%
for(FactorClass factorClass : jobApplication.getSortedFactorClasses())
Map<FactorClass, Map<FactorLevelLink, Map>> factorClassDtls = (Map<FactorClass, Map<FactorLevelLink, Map>>) jobApplication.getFactorScoreDetails();
for(FactorClass factorClass : factorClassDtls.keySet())
{
if(roleScoreMap.get(factorClass) != null && roleScoreMap.get(factorClass).get0() > 0d)
{
Map<FactorLevelLink, Map> factorDetails = AnalysisEngine.getFactorScoreDetails(candidate, job.getLevel(), factorClass);
Double rating = roleScoreMap.get(factorClass).get0();
ColorCode colorCode = roleScoreMap.get(factorClass).get1();
String cssClass = colorCode.getCSSClass();
Map<FactorLevelLink, Map> factorDetails = factorClassDtls.get(factorClass);
Double rating = roleScoreMap.get(factorClass).get0();
ColorCode colorCode = roleScoreMap.get(factorClass).get1();
String cssClass = colorCode.getCSSClass();
%>
<div class="main-pro-bar">
<div class="pro-bar">
<span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="TwoDPDouble"/></span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar <%= cssClass %>" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%"></div>
</div>
</span>
<span class="expand-box">
<span class="hasarrow"><img src="images/select-down-arrow.svg"></span>
</span>
</div>
<div class="main-pro-bar">
<div class="pro-bar">
<span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="TwoDPDouble"/></span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar <%= cssClass %>" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%"></div>
</div>
</span>
<span class="expand-box">
<span class="hasarrow"><img src="images/select-down-arrow.svg"></span>
</span>
</div>
<div class="expand-hide-tag">
<%
for(FactorLevelLink factorLevelLink : factorDetails.keySet())
{
Map factorLinkDetails = factorDetails.get(factorLevelLink);
<div class="expand-hide-tag">
<%
for(FactorLevelLink factorLevelLink : factorDetails.keySet())
{
Map factorLinkDetails = factorDetails.get(factorLevelLink);
if(!factorLinkDetails.isEmpty())
{
FactorScore factorScore = (FactorScore) factorLinkDetails.get("factorScore");
%>
<div class="tab-row">
<div class="tab-view-label">
<oneit:toString value="<%= factorLevelLink.getFactor() %>" mode="EscapeHTML"/>
if(!factorLinkDetails.isEmpty())
{
FactorScore factorScore = (FactorScore) factorLinkDetails.get("factorScore");
%>
<div class="tab-row">
<div class="tab-view-label">
<oneit:toString value="<%= factorLevelLink.getFactor() %>" mode="EscapeHTML"/>
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result"><oneit:toString value="<%= factorLevelLink.getLeftAnnot() %>" mode="EscapeHTML"/></div>
<div class="wants"><oneit:toString value="<%= factorLevelLink.getRightAnnot() %>" mode="EscapeHTML"/></div>
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result"><oneit:toString value="<%= factorLevelLink.getLeftAnnot() %>" mode="EscapeHTML"/></div>
<div class="wants"><oneit:toString value="<%= factorLevelLink.getRightAnnot() %>" mode="EscapeHTML"/></div>
</div>
<div class="result-bar">
<ul>
<%
Map<FactorScoreResult, Double> factorScoreDetails = (Map<FactorScoreResult, Double>)factorLinkDetails.get("factorScoreDetails");
for(FactorScoreResult factorScoreResult : factorScoreDetails.keySet())
{
%>
<li class="<%= factorScoreResult.getColorCode() != null ? factorScoreResult.getColorCode().getCSSClass() : "" %>" style="width: <%= factorScoreDetails.get(factorScoreResult) %>%; height: 10px"></li>
<%
}
%>
</ul>
<span class="triangle-arrow" style="left: <%= factorLinkDetails.get("scoreLeftMargin")%>%;"></span>
</div>
<div class="like-strive"><oneit:toString value="<%= factorScore != null ? factorScore.getNarrative() : null %>" mode="EscapeHTML"/></div>
<div class="result-bar">
<ul>
<%
Map<FactorScoreResult, Double> factorScoreDetails = (Map<FactorScoreResult, Double>)factorLinkDetails.get("factorScoreDetails");
for(FactorScoreResult factorScoreResult : factorScoreDetails.keySet())
{
%>
<li class="<%= factorScoreResult.getColorCode() != null ? factorScoreResult.getColorCode().getCSSClass() : "" %>" style="width: <%= factorScoreDetails.get(factorScoreResult) %>%; height: 10px"></li>
<%
}
%>
</ul>
<span class="triangle-arrow" style="left: <%= factorLinkDetails.get("scoreLeftMargin")%>%;"></span>
</div>
<div class="like-strive"><oneit:toString value="<%= factorScore != null ? factorScore.getNarrative() : null %>" mode="EscapeHTML"/></div>
</div>
<%
}
</div>
<%
}
%>
</div>
}
%>
</div>
</div>
<%
}
}
%>
</div>
......
<?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_score</tableName>
<column name="color_code" type="String" nullable="true" length="200"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
update tl_score set color_code = CASE WHEN color_rank = 1 THEN 'GREEN' WHEN color_rank = 2 THEN 'AMBER' WHEN color_rank = 3 THEN 'RED' ELSE null END;
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