Commit fa6016ac by nilu

S43015973 # Matchd / Talentology - No Plan [Enhancement] #Add additional…

S43015973 # Matchd / Talentology - No Plan [Enhancement] #Add additional filtering to applicant list
parent 50dee13e
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<column name="object_id" type="Long" nullable="false" length="11"/> <column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/> <column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/> <column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="answer_code" type="CLOB" nullable="false"/>
<column name="answer" type="CLOB" nullable="false"/> <column name="answer" type="CLOB" nullable="false"/>
<column name="question_id" type="Long" length="11" nullable="false"/> <column name="question_id" type="Long" length="11" nullable="false"/>
</NODE> </NODE>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/> <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="object_created_date" type="Date" nullable="false" length="22"/>
<column name="xxxx" type="CLOB" nullable="true"/> <column name="xxxx" type="CLOB" nullable="true"/>
<column name="xxxx" type="String" nullable="true" length="200"/>
<column name="xxxx" type="Long" length="11" nullable="true"/> <column name="xxxx" type="Long" length="11" nullable="true"/>
</NODE> </NODE>
......
...@@ -8,6 +8,7 @@ CREATE TABLE tl_diversity_answer ( ...@@ -8,6 +8,7 @@ CREATE TABLE tl_diversity_answer (
object_last_updated_date datetime DEFAULT getdate() NOT NULL , object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL object_created_date datetime DEFAULT getdate() NOT NULL
, ,
answer_code text NOT NULL,
answer text NOT NULL, answer text NOT NULL,
question_id numeric(12) NOT NULL question_id numeric(12) NOT NULL
); );
......
...@@ -9,6 +9,7 @@ CREATE TABLE it_does_not_matter ( ...@@ -9,6 +9,7 @@ CREATE TABLE it_does_not_matter (
object_created_date datetime DEFAULT getdate() NOT NULL object_created_date datetime DEFAULT getdate() NOT NULL
, ,
xxxx text NULL, xxxx text NULL,
xxxx varchar(200) NULL,
xxxx numeric(12) NULL xxxx numeric(12) NULL
); );
......
...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_answer ( ...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_answer (
object_last_updated_date date DEFAULT SYSDATE NOT NULL , object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL object_created_date date DEFAULT SYSDATE NOT NULL
, ,
answer_code clob NOT NULL,
answer clob NOT NULL, answer clob NOT NULL,
question_id number(12) NOT NULL question_id number(12) NOT NULL
); );
......
...@@ -10,6 +10,7 @@ CREATE TABLE it_does_not_matter ( ...@@ -10,6 +10,7 @@ CREATE TABLE it_does_not_matter (
object_created_date date DEFAULT SYSDATE NOT NULL object_created_date date DEFAULT SYSDATE NOT NULL
, ,
xxxx clob NULL, xxxx clob NULL,
xxxx varchar2(200) NULL,
xxxx number(12) NULL xxxx number(12) NULL
); );
......
...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_answer ( ...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_answer (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL , object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL object_created_date timestamp DEFAULT NOW() NOT NULL
, ,
answer_code text NOT NULL,
answer text NOT NULL, answer text NOT NULL,
question_id numeric(12) NOT NULL question_id numeric(12) NOT NULL
); );
......
...@@ -10,6 +10,7 @@ CREATE TABLE it_does_not_matter ( ...@@ -10,6 +10,7 @@ CREATE TABLE it_does_not_matter (
object_created_date timestamp DEFAULT NOW() NOT NULL object_created_date timestamp DEFAULT NOW() NOT NULL
, ,
xxxx text NULL, xxxx text NULL,
xxxx varchar(200) NULL,
xxxx numeric(12) NULL xxxx numeric(12) NULL
); );
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<TABLE name="tl_diversity_answer" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_diversity_answer" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Code" type="String" dbcol="answer_code" mandatory="true"/>
<ATTRIB name="Answer" type="String" dbcol="answer" mandatory="true"/> <ATTRIB name="Answer" type="String" dbcol="answer" mandatory="true"/>
<SINGLEREFERENCE name="Question" type="DiversityQuestion" dbcol="question_id" backreferenceName="Answers" mandatory="true"/> <SINGLEREFERENCE name="Question" type="DiversityQuestion" dbcol="question_id" backreferenceName="Answers" mandatory="true"/>
......
...@@ -26,10 +26,12 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr ...@@ -26,10 +26,12 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr
private static final LoggingArea DiversityAnswerPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "DiversityAnswer"); private static final LoggingArea DiversityAnswerPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "DiversityAnswer");
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String dummyCode;
private String dummyAnswer; private String dummyAnswer;
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_Answer = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Answer = DefaultAttributeHelper.INSTANCE;
...@@ -37,11 +39,12 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr ...@@ -37,11 +39,12 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr
public DiversityAnswerPersistenceMgr () public DiversityAnswerPersistenceMgr ()
{ {
dummyCode = (String)(HELPER_Code.initialise (dummyCode));
dummyAnswer = (String)(HELPER_Answer.initialise (dummyAnswer)); dummyAnswer = (String)(HELPER_Answer.initialise (dummyAnswer));
} }
private String SELECT_COLUMNS = "{PREFIX}tl_diversity_answer.object_id as id, {PREFIX}tl_diversity_answer.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_diversity_answer.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_diversity_answer.answer, {PREFIX}tl_diversity_answer.question_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_diversity_answer.object_id as id, {PREFIX}tl_diversity_answer.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_diversity_answer.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_diversity_answer.answer_code, {PREFIX}tl_diversity_answer.answer, {PREFIX}tl_diversity_answer.question_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
...@@ -92,6 +95,7 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr ...@@ -92,6 +95,7 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr
// Check for persistent sets already prefetched // Check for persistent sets already prefetched
if (false || !tl_diversity_answerPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) || if (false || !tl_diversity_answerPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_diversity_answerPSet.containsAttrib(DiversityAnswer.FIELD_Code)||
!tl_diversity_answerPSet.containsAttrib(DiversityAnswer.FIELD_Answer)|| !tl_diversity_answerPSet.containsAttrib(DiversityAnswer.FIELD_Answer)||
!tl_diversity_answerPSet.containsAttrib(DiversityAnswer.SINGLEREFERENCE_Question)) !tl_diversity_answerPSet.containsAttrib(DiversityAnswer.SINGLEREFERENCE_Question))
{ {
...@@ -173,10 +177,10 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr ...@@ -173,10 +177,10 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_diversity_answer " + "UPDATE {PREFIX}tl_diversity_answer " +
"SET answer = ?, question_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET answer_code = ?, answer = ?, question_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_diversity_answer.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_diversity_answer.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Answer.getForSQL(dummyAnswer, tl_diversity_answerPSet.getAttrib (DiversityAnswer.FIELD_Answer))).listEntry (SQLManager.CheckNull((Long)(tl_diversity_answerPSet.getAttrib (DiversityAnswer.SINGLEREFERENCE_Question)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_diversity_answerPSet.getAttrib (DiversityAnswer.FIELD_Code))).listEntry (HELPER_Answer.getForSQL(dummyAnswer, tl_diversity_answerPSet.getAttrib (DiversityAnswer.FIELD_Answer))).listEntry (SQLManager.CheckNull((Long)(tl_diversity_answerPSet.getAttrib (DiversityAnswer.SINGLEREFERENCE_Question)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -432,6 +436,7 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr ...@@ -432,6 +436,7 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr
// Object Created // Object Created
tl_diversity_answerPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE")); tl_diversity_answerPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_diversity_answerPSet.setAttrib(DiversityAnswer.FIELD_Code, HELPER_Code.getFromRS(dummyCode, r, "answer_code"));
tl_diversity_answerPSet.setAttrib(DiversityAnswer.FIELD_Answer, HELPER_Answer.getFromRS(dummyAnswer, r, "answer")); tl_diversity_answerPSet.setAttrib(DiversityAnswer.FIELD_Answer, HELPER_Answer.getFromRS(dummyAnswer, r, "answer"));
tl_diversity_answerPSet.setAttrib(DiversityAnswer.SINGLEREFERENCE_Question, r.getObject ("question_id")); tl_diversity_answerPSet.setAttrib(DiversityAnswer.SINGLEREFERENCE_Question, r.getObject ("question_id"));
...@@ -451,10 +456,10 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr ...@@ -451,10 +456,10 @@ public class DiversityAnswerPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_diversity_answer " + "INSERT INTO {PREFIX}tl_diversity_answer " +
" (answer, question_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (answer_code, answer, question_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_Answer.getForSQL(dummyAnswer, tl_diversity_answerPSet.getAttrib (DiversityAnswer.FIELD_Answer))) .listEntry (SQLManager.CheckNull((Long)(tl_diversity_answerPSet.getAttrib (DiversityAnswer.SINGLEREFERENCE_Question)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_diversity_answerPSet.getAttrib (DiversityAnswer.FIELD_Code))).listEntry (HELPER_Answer.getForSQL(dummyAnswer, tl_diversity_answerPSet.getAttrib (DiversityAnswer.FIELD_Answer))) .listEntry (SQLManager.CheckNull((Long)(tl_diversity_answerPSet.getAttrib (DiversityAnswer.SINGLEREFERENCE_Question)))) .listEntry (objectID.longID ()).toList().toArray());
tl_diversity_answerPSet.setStatus (PersistentSetStatus.PROCESSED); tl_diversity_answerPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -827,4 +827,16 @@ public class JobApplication extends BaseJobApplication ...@@ -827,4 +827,16 @@ public class JobApplication extends BaseJobApplication
{ {
return isTrue(super.getPreferRemote()); return isTrue(super.getPreferRemote());
} }
public DiversityQuestion getQuestionByFilter(AppFilter filter)
{
if(isDiversityIncluded())
{
Filter<DiversityQuestion> diversityFilter = DiversityQuestion.SearchByAll().andCode(new EqualsFilter<>(filter.getName()));
return pipelineJobApplication().toJob().toHiringTeam().toDiversityQuestions().toQuestion(diversityFilter).val();
}
return null;
}
} }
\ No newline at end of file
package performa.orm.types;
import java.util.*;
import oneit.utils.*;
/**
* This class was generated using constGen.bat.
* DO NOT MODIFY THIS CODE.
* Edit the associated .xml file, and regenerate this file
* constGen (directory) (file minus extension)
* e.g. constGen C:\...\sql FieldType
*/
public class AppFilter extends AbstractEnumerated
{
public static final EnumeratedFactory FACTORY_AppFilter = new AppFilterFactory();
public static final AppFilter REQ = new AppFilter ("REQ", "REQ", "Requirements", false);
public static final AppFilter REQ_MET = new AppFilter ("REQ_MET", "REQ_MET", "Met", false);
public static final AppFilter REQ_NOT_MET = new AppFilter ("REQ_NOT_MET", "REQ_NOT_MET", "Not Met", false);
public static final AppFilter GENDER = new AppFilter ("GENDER", "GENDER", "Gender", false);
public static final AppFilter GENDER_MAN = new AppFilter ("GENDER_MAN", "GENDER_MAN", "Man", false);
public static final AppFilter GENDER_WOMAN = new AppFilter ("GENDER_WOMAN", "GENDER_WOMAN", "Woman", false);
public static final AppFilter GENDER_OTHER = new AppFilter ("GENDER_OTHER", "GENDER_OTHER", "Other", false);
public static final AppFilter ATSI = new AppFilter ("ATSI", "ATSI", "ATSI", false);
public static final AppFilter ATSI_ABORIGINAL = new AppFilter ("ATSI_ABORIGINAL", "ATSI_ABORIGINAL", "Aboriginal", false);
public static final AppFilter ATSI_TSI = new AppFilter ("ATSI_TSI", "ATSI_TSI", "Torres Strait Islander", false);
public static final AppFilter ATSI_BOTH = new AppFilter ("ATSI_BOTH", "ATSI_BOTH", "Both", false);
public static final AppFilter DISABLED = new AppFilter ("DISABLED", "DISABLED", "Disability", false);
public static final AppFilter DISABLED_HEARING = new AppFilter ("DISABLED_HEARING", "DISABLED_HEARING", "Hearing", false);
public static final AppFilter DISABLED_LEARNING = new AppFilter ("DISABLED_LEARNING", "DISABLED_LEARNING", "Learning", false);
public static final AppFilter DISABLED_MEDICAL = new AppFilter ("DISABLED_MEDICAL", "DISABLED_MEDICAL", "Medical / Physical / Psychiatric", false);
public static final AppFilter DISABLED_SIGHT = new AppFilter ("DISABLED_SIGHT", "DISABLED_SIGHT", "Sight", false);
public static final AppFilter DISABLED_SPEECH = new AppFilter ("DISABLED_SPEECH", "DISABLED_SPEECH", "Speech", false);
public static final AppFilter DISABLED_ARMS = new AppFilter ("DISABLED_ARMS", "DISABLED_ARMS", "Use of Arms and Hands", false);
public static final AppFilter DISABLED_LEGS = new AppFilter ("DISABLED_LEGS", "DISABLED_LEGS", "Use of Legs", false);
public static final AppFilter DISABLED_OTHER = new AppFilter ("DISABLED_OTHER", "DISABLED_OTHER", "Other", false);
private static final AppFilter[] allAppFilters =
new AppFilter[] { REQ,REQ_MET,REQ_NOT_MET,GENDER,GENDER_MAN,GENDER_WOMAN,GENDER_OTHER,ATSI,ATSI_ABORIGINAL,ATSI_TSI,ATSI_BOTH,DISABLED,DISABLED_HEARING,DISABLED_LEARNING,DISABLED_MEDICAL,DISABLED_SIGHT,DISABLED_SPEECH,DISABLED_ARMS,DISABLED_LEGS,DISABLED_OTHER};
private static AppFilter[] getAllAppFilters ()
{
return allAppFilters;
}
private transient Boolean IsRoot;
private transient AppFilter[] ChildNodes;
private transient AppFilter ParentNode;
private AppFilter (String name, String value, String description, boolean disabled)
{
super (name, value, description, disabled);
}
public Boolean getIsRoot()
{
return IsRoot;
}
public AppFilter[] getChildNodes()
{
return ChildNodes;
}
public AppFilter getParentNode()
{
return ParentNode;
}
public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allAppFilters);
static
{
defineAdditionalData ();
}
public boolean isEqual (AppFilter other)
{
return this.name.equals (other.name);
}
public Enumeration getAllInstances ()
{
return AppFilter.getAll ();
}
private Object readResolve() throws java.io.ObjectStreamException
{
return AppFilter.forName (this.name);
}
public EnumeratedFactory getFactory ()
{
return FACTORY_AppFilter;
}
public static AppFilter forName (String name)
{
if (name == null) { return null; }
AppFilter[] all = getAllAppFilters();
int enumIndex = AbstractEnumerated.getIndexForName (all, name);
return all[enumIndex];
}
public static AppFilter forValue (String value)
{
if (value == null) { return null; }
AppFilter[] all = getAllAppFilters();
int enumIndex = AbstractEnumerated.getIndexForValue (getAllAppFilters (), value);
return all[enumIndex];
}
public static java.util.Enumeration getAll ()
{
return AbstractEnumerated.getAll (getAllAppFilters());
}
public static AppFilter[] getAppFilterArray ()
{
return (AppFilter[])getAllAppFilters().clone ();
}
public static void defineAdditionalData ()
{
REQ.IsRoot = Boolean.TRUE;
REQ.ChildNodes = new AppFilter[] {AppFilter.REQ_MET, AppFilter.REQ_NOT_MET};
REQ_MET.IsRoot = Boolean.FALSE;
REQ_MET.ChildNodes = new AppFilter[] {};
REQ_MET.ParentNode = AppFilter.REQ;
REQ_NOT_MET.IsRoot = Boolean.FALSE;
REQ_NOT_MET.ChildNodes = new AppFilter[] {};
REQ_NOT_MET.ParentNode = AppFilter.REQ;
GENDER.IsRoot = Boolean.TRUE;
GENDER.ChildNodes = new AppFilter[] {AppFilter.GENDER_MAN, AppFilter.GENDER_WOMAN, AppFilter.GENDER_OTHER};
GENDER_MAN.IsRoot = Boolean.FALSE;
GENDER_MAN.ChildNodes = new AppFilter[] {};
GENDER_MAN.ParentNode = AppFilter.GENDER;
GENDER_WOMAN.IsRoot = Boolean.FALSE;
GENDER_WOMAN.ChildNodes = new AppFilter[] {};
GENDER_WOMAN.ParentNode = AppFilter.GENDER;
GENDER_OTHER.IsRoot = Boolean.FALSE;
GENDER_OTHER.ChildNodes = new AppFilter[] {};
GENDER_OTHER.ParentNode = AppFilter.GENDER;
ATSI.IsRoot = Boolean.TRUE;
ATSI.ChildNodes = new AppFilter[] {AppFilter.ATSI_ABORIGINAL, AppFilter.ATSI_TSI, AppFilter.ATSI_BOTH};
ATSI_ABORIGINAL.IsRoot = Boolean.FALSE;
ATSI_ABORIGINAL.ChildNodes = new AppFilter[] {};
ATSI_ABORIGINAL.ParentNode = AppFilter.ATSI;
ATSI_TSI.IsRoot = Boolean.FALSE;
ATSI_TSI.ChildNodes = new AppFilter[] {};
ATSI_TSI.ParentNode = AppFilter.ATSI;
ATSI_BOTH.IsRoot = Boolean.FALSE;
ATSI_BOTH.ChildNodes = new AppFilter[] {};
ATSI_BOTH.ParentNode = AppFilter.ATSI;
DISABLED.IsRoot = Boolean.TRUE;
DISABLED.ChildNodes = new AppFilter[] {AppFilter.DISABLED_HEARING, AppFilter.DISABLED_LEARNING, AppFilter.DISABLED_MEDICAL, AppFilter.DISABLED_SIGHT, AppFilter.DISABLED_SPEECH , AppFilter.DISABLED_ARMS , AppFilter.DISABLED_LEGS , AppFilter.DISABLED_OTHER };
DISABLED_HEARING.IsRoot = Boolean.FALSE;
DISABLED_HEARING.ChildNodes = new AppFilter[] {};
DISABLED_HEARING.ParentNode = AppFilter.DISABLED;
DISABLED_LEARNING.IsRoot = Boolean.FALSE;
DISABLED_LEARNING.ChildNodes = new AppFilter[] {};
DISABLED_LEARNING.ParentNode = AppFilter.DISABLED;
DISABLED_MEDICAL.IsRoot = Boolean.FALSE;
DISABLED_MEDICAL.ChildNodes = new AppFilter[] {};
DISABLED_MEDICAL.ParentNode = AppFilter.DISABLED;
DISABLED_SIGHT.IsRoot = Boolean.FALSE;
DISABLED_SIGHT.ChildNodes = new AppFilter[] {};
DISABLED_SIGHT.ParentNode = AppFilter.DISABLED;
DISABLED_SPEECH.IsRoot = Boolean.FALSE;
DISABLED_SPEECH.ChildNodes = new AppFilter[] {};
DISABLED_SPEECH.ParentNode = AppFilter.DISABLED;
DISABLED_ARMS.IsRoot = Boolean.FALSE;
DISABLED_ARMS.ChildNodes = new AppFilter[] {};
DISABLED_ARMS.ParentNode = AppFilter.DISABLED;
DISABLED_LEGS.IsRoot = Boolean.FALSE;
DISABLED_LEGS.ChildNodes = new AppFilter[] {};
DISABLED_LEGS.ParentNode = AppFilter.DISABLED;
DISABLED_OTHER.IsRoot = Boolean.FALSE;
DISABLED_OTHER.ChildNodes = new AppFilter[] {};
DISABLED_OTHER.ParentNode = AppFilter.DISABLED;
}
static class AppFilterFactory implements EnumeratedFactory
{
public AbstractEnumerated getForName (String name)
{
return AppFilter.forName (name);
}
public AbstractEnumerated getForValue (String name)
{
return AppFilter.forValue (name);
}
public Enumeration getAll ()
{
return AppFilter.getAll ();
}
}
public Map getAdditionalAttributes ()
{
Map attribs = new HashMap ();
attribs.put ("IsRoot", ArrayFormatter.toObject(getIsRoot()));
attribs.put ("ChildNodes", ArrayFormatter.toObject(getChildNodes()));
attribs.put ("ParentNode", ArrayFormatter.toObject(getParentNode()));
return attribs;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<CONSTANT package="performa.orm.types" name="AppFilter">
<DATA name="IsRoot" type="Boolean"/>
<DATA name="ChildNodes" type="AppFilter[]"/>
<DATA name="ParentNode" type="AppFilter"/>
<VALUE name="REQ" description="Requirements" IsRoot="Boolean.TRUE" ChildNodes='new AppFilter[] {AppFilter.REQ_MET, AppFilter.REQ_NOT_MET}'/>
<VALUE name="REQ_MET" description="Met" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.REQ"/>
<VALUE name="REQ_NOT_MET" description="Not Met" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.REQ"/>
<VALUE name="GENDER" description="Gender" IsRoot="Boolean.TRUE" ChildNodes='new AppFilter[] {AppFilter.GENDER_MAN, AppFilter.GENDER_WOMAN, AppFilter.GENDER_OTHER}'/>
<VALUE name="GENDER_MAN" description="Man" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.GENDER"/>
<VALUE name="GENDER_WOMAN" description="Woman" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.GENDER"/>
<VALUE name="GENDER_OTHER" description="Other" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.GENDER"/>
<VALUE name="ATSI" description="ATSI" IsRoot="Boolean.TRUE" ChildNodes='new AppFilter[] {AppFilter.ATSI_ABORIGINAL, AppFilter.ATSI_TSI, AppFilter.ATSI_BOTH}'/>
<VALUE name="ATSI_ABORIGINAL" description="Aboriginal" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.ATSI"/>
<VALUE name="ATSI_TSI" description="Torres Strait Islander" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.ATSI"/>
<VALUE name="ATSI_BOTH" description="Both" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.ATSI"/>
<VALUE name="DISABLED" description="Disability" IsRoot="Boolean.TRUE" ChildNodes='new AppFilter[] {AppFilter.DISABLED_HEARING, AppFilter.DISABLED_LEARNING, AppFilter.DISABLED_MEDICAL, AppFilter.DISABLED_SIGHT, AppFilter.DISABLED_SPEECH , AppFilter.DISABLED_ARMS , AppFilter.DISABLED_LEGS , AppFilter.DISABLED_OTHER }'/>
<VALUE name="DISABLED_HEARING" description="Hearing" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
<VALUE name="DISABLED_LEARNING" description="Learning" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
<VALUE name="DISABLED_MEDICAL" description="Medical / Physical / Psychiatric" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
<VALUE name="DISABLED_SIGHT" description="Sight" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
<VALUE name="DISABLED_SPEECH" description="Speech" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
<VALUE name="DISABLED_ARMS" description="Use of Arms and Hands" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
<VALUE name="DISABLED_LEGS" description="Use of Legs" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
<VALUE name="DISABLED_OTHER" description="Other" IsRoot="Boolean.FALSE" ChildNodes='new AppFilter[] {}' ParentNode="AppFilter.DISABLED"/>
</CONSTANT>
</ROOT>
\ No newline at end of file
package performa.search; package performa.search;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import oneit.logging.LogLevel; import oneit.logging.LogLevel;
import oneit.logging.LogMgr; import oneit.logging.LogMgr;
import oneit.logging.LoggingArea; import oneit.logging.LoggingArea;
...@@ -43,11 +45,22 @@ public class SearchApplicant extends BaseSearchApplicant ...@@ -43,11 +45,22 @@ public class SearchApplicant extends BaseSearchApplicant
for(JobApplication app : results) for(JobApplication app : results)
{ {
ApplicationStatus appStatus = app.getApplicationStatus(); ApplicationStatus appStatus = app.getApplicationStatus();
boolean skip = false;
app = app.getInTransaction(getTransaction()); app = app.getInTransaction(getTransaction());
app.setApplicationStatus(appStatus); app.setApplicationStatus(appStatus);
if(getFilter() != null)
{
skip = applyFilters(app);
}
if(skip)
{
continue;
}
Answer[] answers = Answer.SearchByAll().andCandidate(new EqualsFilter<>(app.getCandidate())).search(getTransaction()); Answer[] answers = Answer.SearchByAll().andCandidate(new EqualsFilter<>(app.getCandidate())).search(getTransaction());
for (Answer answer: answers) for (Answer answer: answers)
...@@ -74,6 +87,76 @@ public class SearchApplicant extends BaseSearchApplicant ...@@ -74,6 +87,76 @@ public class SearchApplicant extends BaseSearchApplicant
} }
} }
private boolean applyFilters(JobApplication app) throws StorageException
{
Map<AppFilter, List<AppFilter>> map = createFilterMap();
for(AppFilter filter : getFilter())
{
if(filter.getIsRoot())
{
if(filter == AppFilter.ATSI || filter == AppFilter.DISABLED)
{
DiversityQuestion question = app.getQuestionByFilter(filter);
if(question != null)
{
CandidateDiversityAnswer answer = app.getCandidate().getDiversityAnswerByQuestion(question);
boolean hasAnswer = false;
for(AppFilter child : filter.getChildNodes())
{
if(answer != null && answer.pipelineCandidateDiversityAnswer().toAnswers().toAnswer().toCode().uniqueVals().contains(child.getName()))
{
hasAnswer = true;
break;
}
}
if(answer == null || !hasAnswer)
{
return true;
}
}
}
}
else if(filter.getParentNode() != null && filter.getParentNode() == AppFilter.REQ)
{
// handle has req and no req
}
}
for(Map.Entry<AppFilter, List<AppFilter>> entry :map.entrySet()){
AppFilter parentNode = entry.getKey();
List<AppFilter> childList = entry.getValue();
DiversityQuestion question = app.getQuestionByFilter(parentNode);
if(question != null)
{
CandidateDiversityAnswer answer = app.getCandidate().getDiversityAnswerByQuestion(question);
boolean hasAnswer = false;
for(AppFilter child : childList)
{
if(answer != null && answer.pipelineCandidateDiversityAnswer().toAnswers().toAnswer().toCode().uniqueVals().contains(child.getName()))
{
hasAnswer = true;
break;
}
}
if(answer == null || !hasAnswer)
{
return true;
}
}
}
return false;
}
}); });
} }
catch (FieldException | StorageException ex) catch (FieldException | StorageException ex)
...@@ -84,4 +167,25 @@ public class SearchApplicant extends BaseSearchApplicant ...@@ -84,4 +167,25 @@ public class SearchApplicant extends BaseSearchApplicant
return appResults.toArray(new JobApplication[0]); return appResults.toArray(new JobApplication[0]);
} }
private Map<AppFilter, List<AppFilter>> createFilterMap()
{
Map<AppFilter, List<AppFilter>> map = new HashMap<>();
for(AppFilter filter : getFilter())
{
if(filter.getParentNode() != null && filter.getParentNode() != AppFilter.REQ)
{
if (!map.containsKey(filter.getParentNode()))
{
map.put(filter.getParentNode(), new ArrayList<>());
}
map.get(filter.getParentNode()).add(filter);
}
}
return map;
}
} }
\ No newline at end of file
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
<IMPORT value="oneit.servlets.orm.*" /> <IMPORT value="oneit.servlets.orm.*" />
<IMPORT value="performa.orm.*"/> <IMPORT value="performa.orm.*"/>
<IMPORT value="performa.orm.types.*"/>
<TABLE name="it_does_not_matter" tablePrefix="object" polymorphic="FALSE" > <TABLE name="it_does_not_matter" tablePrefix="object" polymorphic="FALSE" >
<ATTRIB name="Details" type="String" dbcol="xxxx" /> <ATTRIB name="Details" type="String" dbcol="xxxx" />
<ATTRIB name="Filter" type="Set&lt;AppFilter&gt;" dbcol="xxxx" attribHelper="DelimitedEnumsAttributeHelper" attribHelperInstance="new DelimitedEnumsAttributeHelper (AppFilter.FACTORY_AppFilter)"/>
<SINGLEREFERENCE name="Job" type="Job" dbcol="xxxx" /> <SINGLEREFERENCE name="Job" type="Job" dbcol="xxxx" />
......
...@@ -16,6 +16,7 @@ import oneit.utils.*; ...@@ -16,6 +16,7 @@ import oneit.utils.*;
import oneit.utils.threading.*; import oneit.utils.threading.*;
import oneit.servlets.orm.*; import oneit.servlets.orm.*;
import performa.orm.*; import performa.orm.*;
import performa.orm.types.*;
...@@ -29,10 +30,12 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr ...@@ -29,10 +30,12 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String dummyDetails; private String dummyDetails;
private Set<AppFilter> dummyFilter;
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Details = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Details = DefaultAttributeHelper.INSTANCE;
private static final DelimitedEnumsAttributeHelper HELPER_Filter = new DelimitedEnumsAttributeHelper (AppFilter.FACTORY_AppFilter);
...@@ -40,10 +43,11 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr ...@@ -40,10 +43,11 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr
public SearchApplicantPersistenceMgr () public SearchApplicantPersistenceMgr ()
{ {
dummyDetails = (String)(HELPER_Details.initialise (dummyDetails)); dummyDetails = (String)(HELPER_Details.initialise (dummyDetails));
dummyFilter = (Set<AppFilter>)(HELPER_Filter.initialise (dummyFilter));
} }
private String SELECT_COLUMNS = "{PREFIX}it_does_not_matter.object_id as id, {PREFIX}it_does_not_matter.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}it_does_not_matter.object_CREATED_DATE as CREATED_DATE, {PREFIX}it_does_not_matter.xxxx, {PREFIX}it_does_not_matter.xxxx, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}it_does_not_matter.object_id as id, {PREFIX}it_does_not_matter.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}it_does_not_matter.object_CREATED_DATE as CREATED_DATE, {PREFIX}it_does_not_matter.xxxx, {PREFIX}it_does_not_matter.xxxx, {PREFIX}it_does_not_matter.xxxx, 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
...@@ -95,6 +99,7 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr ...@@ -95,6 +99,7 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr
// Check for persistent sets already prefetched // Check for persistent sets already prefetched
if (false || !it_does_not_matterPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) || if (false || !it_does_not_matterPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!it_does_not_matterPSet.containsAttrib(SearchApplicant.FIELD_Details)|| !it_does_not_matterPSet.containsAttrib(SearchApplicant.FIELD_Details)||
!it_does_not_matterPSet.containsAttrib(SearchApplicant.FIELD_Filter)||
!it_does_not_matterPSet.containsAttrib(SearchApplicant.SINGLEREFERENCE_Job)) !it_does_not_matterPSet.containsAttrib(SearchApplicant.SINGLEREFERENCE_Job))
{ {
// We will need to retrieve it // We will need to retrieve it
...@@ -165,10 +170,10 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr ...@@ -165,10 +170,10 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}it_does_not_matter " + "UPDATE {PREFIX}it_does_not_matter " +
"SET xxxx = ?, xxxx = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET xxxx = ?, xxxx = ?, xxxx = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE it_does_not_matter.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE it_does_not_matter.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchApplicant.FIELD_Details))).listEntry (SQLManager.CheckNull((Long)(it_does_not_matterPSet.getAttrib (SearchApplicant.SINGLEREFERENCE_Job)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchApplicant.FIELD_Details))).listEntry (HELPER_Filter.getForSQL(dummyFilter, it_does_not_matterPSet.getAttrib (SearchApplicant.FIELD_Filter))).listEntry (SQLManager.CheckNull((Long)(it_does_not_matterPSet.getAttrib (SearchApplicant.SINGLEREFERENCE_Job)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -403,6 +408,7 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr ...@@ -403,6 +408,7 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr
it_does_not_matterPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE")); it_does_not_matterPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
it_does_not_matterPSet.setAttrib(SearchApplicant.FIELD_Details, HELPER_Details.getFromRS(dummyDetails, r, "xxxx")); it_does_not_matterPSet.setAttrib(SearchApplicant.FIELD_Details, HELPER_Details.getFromRS(dummyDetails, r, "xxxx"));
it_does_not_matterPSet.setAttrib(SearchApplicant.FIELD_Filter, HELPER_Filter.getFromRS(dummyFilter, r, "xxxx"));
it_does_not_matterPSet.setAttrib(SearchApplicant.SINGLEREFERENCE_Job, r.getObject ("xxxx")); it_does_not_matterPSet.setAttrib(SearchApplicant.SINGLEREFERENCE_Job, r.getObject ("xxxx"));
...@@ -421,10 +427,10 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr ...@@ -421,10 +427,10 @@ public class SearchApplicantPersistenceMgr extends SearchExecutorPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}it_does_not_matter " + "INSERT INTO {PREFIX}it_does_not_matter " +
" (xxxx, xxxx, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (xxxx, xxxx, xxxx, 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_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchApplicant.FIELD_Details))) .listEntry (SQLManager.CheckNull((Long)(it_does_not_matterPSet.getAttrib (SearchApplicant.SINGLEREFERENCE_Job)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Details.getForSQL(dummyDetails, it_does_not_matterPSet.getAttrib (SearchApplicant.FIELD_Details))).listEntry (HELPER_Filter.getForSQL(dummyFilter, it_does_not_matterPSet.getAttrib (SearchApplicant.FIELD_Filter))) .listEntry (SQLManager.CheckNull((Long)(it_does_not_matterPSet.getAttrib (SearchApplicant.SINGLEREFERENCE_Job)))) .listEntry (objectID.longID ()).toList().toArray());
it_does_not_matterPSet.setStatus (PersistentSetStatus.PROCESSED); it_does_not_matterPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -28,6 +28,7 @@ import performa.chart.RingChart; ...@@ -28,6 +28,7 @@ import performa.chart.RingChart;
import performa.form.LinkedInOAuthLoginFP; import performa.form.LinkedInOAuthLoginFP;
import performa.orm.*; import performa.orm.*;
import performa.orm.types.*; import performa.orm.types.*;
import performa.search.SearchApplicant;
/** /**
* *
...@@ -722,4 +723,44 @@ public class Utils ...@@ -722,4 +723,44 @@ public class Utils
return contentType.contains("msword") || contentType.contains("doc") || contentType.contains("docx") || contentType.contains("opendocument.text") return contentType.contains("msword") || contentType.contains("doc") || contentType.contains("docx") || contentType.contains("opendocument.text")
|| contentType.contains("pdf") || contentType.contains("vnd.openxmlformats-officedocument.wordprocessingml.document") || contentType.contains("text/plain"); || contentType.contains("pdf") || contentType.contains("vnd.openxmlformats-officedocument.wordprocessingml.document") || contentType.contains("text/plain");
} }
public static String getApplicantSortingData(SearchApplicant searchApplicant)
{
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("value: [");
if(searchApplicant.getFilter() != null)
{
searchApplicant.getFilter().forEach((filter) -> {
sb.append("'").append(filter.getName()).append("' ,");
});
}
sb.append("],");
sb.append("options: [");
for(AppFilter appFilter : AppFilter.getAppFilterArray())
{
if(!appFilter.getIsRoot())
{
continue;
}
sb.append("{ id: '").append(appFilter.getName()).append("',");
sb.append("label: '").append(appFilter.getDescription()).append("',");
sb.append("children: [");
for(AppFilter child : appFilter.getChildNodes())
{
sb.append("{id:'").append(child.getName()).append("', label:'").append(child.getDescription()).append("'},");
}
sb.append("]").append("},");
}
sb.append("]").append("}");
return sb.toString();
}
} }
\ No newline at end of file
...@@ -7,9 +7,11 @@ import oneit.utils.CollectionUtils; ...@@ -7,9 +7,11 @@ import oneit.utils.CollectionUtils;
import javax.servlet.http.*; import javax.servlet.http.*;
import oneit.business.content.jsp.*; import oneit.business.content.jsp.*;
import oneit.objstore.*; import oneit.objstore.*;
import oneit.servlets.jsp.EnumSetDIH;
import oneit.servlets.jsp.ORMSimpleAssocTag; import oneit.servlets.jsp.ORMSimpleAssocTag;
import oneit.servlets.orm.DataInputHandler; import oneit.servlets.orm.DataInputHandler;
import oneit.servlets.orm.DataMap; import oneit.servlets.orm.DataMap;
import oneit.utils.EnumeratedFactory;
public class WebUtils public class WebUtils
...@@ -96,6 +98,14 @@ public class WebUtils ...@@ -96,6 +98,14 @@ public class WebUtils
} }
public static String getEnumSetKey(HttpServletRequest request, BaseBusinessClass bbc, String attributeName, EnumeratedFactory factory)
{
DataMap dataMap = DataMap.getDataMap (request, true);
EnumSetDIH eih = new EnumSetDIH(bbc, attributeName, factory);
return dataMap.storeORMHandler (eih, bbc, attributeName);
}
public static boolean descendsFrom (Article article, String parentArticleIdFilter) public static boolean descendsFrom (Article article, String parentArticleIdFilter)
{ {
if (article.getIdentifier ().equals (parentArticleIdFilter)) if (article.getIdentifier ().equals (parentArticleIdFilter))
......
...@@ -2992,6 +2992,23 @@ a.forgot-pass { ...@@ -2992,6 +2992,23 @@ a.forgot-pass {
.shorting-dropdown .form-control { .shorting-dropdown .form-control {
height: 45px; height: 45px;
} }
.appli-list-shorting .shorting-dropdown.showing{
width: 350px;
}
.vue-treeselect__control{
height: 45px !important;
}
.vue-treeselect__placeholder, .vue-treeselect__single-value {
top: 5px !important;
}
.filter-icon-btn {
display: block;
position: absolute;
background: url('../images/filter-icon.png') no-repeat center center;
width: 45px;
height: 45px;
cursor: pointer;
}
.search-input { .search-input {
background-color: rgba(255,255,255,0.5); background-color: rgba(255,255,255,0.5);
padding-right: 40px; padding-right: 40px;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()}, new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST}); new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
HiringTeam hiringTeam = job.getHiringTeam(); HiringTeam hiringTeam = job.getHiringTeam();
String keyName = WebUtils.getEnumSetKey(request, searchApplicant, SearchApplicant.FIELD_Filter, AppFilter.FACTORY_AppFilter);
%> %>
<oneit:dynIncluded> <oneit:dynIncluded>
...@@ -41,6 +42,13 @@ ...@@ -41,6 +42,13 @@
$('.checkbox-list input:checkbox').not(this).prop('checked', this.checked); $('.checkbox-list input:checkbox').not(this).prop('checked', this.checked);
enableBulkEdit(); enableBulkEdit();
}); });
Vue.component('treeselect', VueTreeselect.Treeselect)
new Vue({
el: '#app',
data: <%= Utils.getApplicantSortingData(searchApplicant)%>
});
}); });
function enableBulkEdit() { function enableBulkEdit() {
...@@ -52,6 +60,9 @@ ...@@ -52,6 +60,9 @@
$('.search-icon-btn').click(function () { $('.search-icon-btn').click(function () {
$('.search-real-btn').click(); $('.search-real-btn').click();
}); });
$('.filter-icon-btn').click(function () {
$('.search-real-btn').click();
});
}); });
</script> </script>
<div class="main-applicants-filter"> <div class="main-applicants-filter">
...@@ -131,21 +142,15 @@ ...@@ -131,21 +142,15 @@
<% <%
} }
%> %>
<div class="shorting-dropdown"> <div class="shorting-dropdown showing">
<span class="appli-order-label">Showing</span> <span class="appli-order-label">Showing</span>
<select class="form-control status-img" onChange="location=this.value"> <div id="app" style="float:left; width:80%;">
<% <treeselect name="<%= keyName %>" v-model="value" :multiple="true" :options="options" />
for (ApplicationFilter applicationFilter : ApplicationFilter.getApplicationFilterArray()) </div>
{ <div style="float:right; width:20%;">
String optionLink = applicantsPage + "&ApplicationFilter=" + applicationFilter.getName(); <span class="filter-icon-btn" ></span>
%> </div>
<option data-image="images/<%= applicationFilter.getName().toLowerCase() %>.png" <%= (appFilter != null && appFilter == applicationFilter ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= applicationFilter.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div> </div>
<% <%
} }
...@@ -156,5 +161,4 @@ ...@@ -156,5 +161,4 @@
<label for="select_all" class="select-all-jobs">&nbsp;&nbsp;Select all applicants</label> <label for="select_all" class="select-all-jobs">&nbsp;&nbsp;Select all applicants</label>
</div> </div>
</div> </div>
</oneit:dynIncluded> </oneit:dynIncluded>
...@@ -33,6 +33,11 @@ ...@@ -33,6 +33,11 @@
<%@include file="/hotjar.jsp" %> <%@include file="/hotjar.jsp" %>
<%@page import="oneit.servlets.portability.BrowserServices"%> <%@page import="oneit.servlets.portability.BrowserServices"%>
<!--filter on applicant list-->
<script src="https://cdn.jsdelivr.net/npm/vue@^2"></script>
<script src="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@0.0.38/dist/vue-treeselect.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@0.0.38/dist/vue-treeselect.min.css">
<!-- Google Tag Manager --> <!-- Google Tag Manager -->
<script> <script>
dataLayer = [{ dataLayer = [{
......
...@@ -807,6 +807,8 @@ ...@@ -807,6 +807,8 @@
DiversityQuestion originalQuestion = question.getQuestion(); DiversityQuestion originalQuestion = question.getQuestion();
CandidateDiversityAnswer candidateAnswer = candidate.getDiversityAnswerByQuestion(originalQuestion); CandidateDiversityAnswer candidateAnswer = candidate.getDiversityAnswerByQuestion(originalQuestion);
if(candidateAnswer != null)
{
for(AnswerOption answer : candidateAnswer.getAnswersSet()) for(AnswerOption answer : candidateAnswer.getAnswersSet())
{ {
%> %>
...@@ -817,6 +819,7 @@ ...@@ -817,6 +819,7 @@
</div> </div>
<% <%
} }
}
%> %>
</div> </div>
<% <%
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,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="answer" type="CLOB" nullable="false"/> <column name="answer" type="CLOB" nullable="false"/>
<column name="question_id" type="Long" length="11" nullable="false"/> <column name="question_id" type="Long" length="11" nullable="false"/>
<column name="answer_code" type="CLOB" nullable="false"/>
</NODE> </NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_diversity_answer" indexName="idx_tl_diversity_answer_question_id" isUnique="false"> <NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_diversity_answer" indexName="idx_tl_diversity_answer_question_id" isUnique="false">
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>No</value> <value name='answer' factory='String'>No</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/>
<value name='answer_code' factory='String'>ATSI_NO</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Yes, Aboriginal origin</value> <value name='answer' factory='String'>Yes, Aboriginal origin</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/>
<value name='answer_code' factory='String'>ATSI_ABORIGINAL</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -61,6 +63,7 @@ ...@@ -61,6 +63,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Yes, Torres Strait Islander origin</value> <value name='answer' factory='String'>Yes, Torres Strait Islander origin</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/>
<value name='answer_code' factory='String'>ATSI_TSI</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -69,6 +72,7 @@ ...@@ -69,6 +72,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Yes, both</value> <value name='answer' factory='String'>Yes, both</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="firstQuestion"/>
<value name='answer_code' factory='String'>ATSI_BOTH</value>
</NODE> </NODE>
<!-- second question --> <!-- second question -->
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
...@@ -78,6 +82,7 @@ ...@@ -78,6 +82,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>No</value> <value name='answer' factory='String'>No</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_NO</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -86,6 +91,7 @@ ...@@ -86,6 +91,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Hearing</value> <value name='answer' factory='String'>Hearing</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_HEARING</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -94,6 +100,7 @@ ...@@ -94,6 +100,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Learning</value> <value name='answer' factory='String'>Learning</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_LEARNING</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -102,6 +109,7 @@ ...@@ -102,6 +109,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Medical / Physical / Psychiatric</value> <value name='answer' factory='String'>Medical / Physical / Psychiatric</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_MEDICAL</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -110,6 +118,7 @@ ...@@ -110,6 +118,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Sight</value> <value name='answer' factory='String'>Sight</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_SIGHT</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -118,6 +127,7 @@ ...@@ -118,6 +127,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Speech</value> <value name='answer' factory='String'>Speech</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_SPEECH</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -126,6 +136,7 @@ ...@@ -126,6 +136,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Use of Arms and Hands</value> <value name='answer' factory='String'>Use of Arms and Hands</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_ARMS</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -134,6 +145,7 @@ ...@@ -134,6 +145,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Use of Legs</value> <value name='answer' factory='String'>Use of Legs</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_LEGS</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -142,6 +154,7 @@ ...@@ -142,6 +154,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Other</value> <value name='answer' factory='String'>Other</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="secondQuestion"/>
<value name='answer_code' factory='String'>DISABLED_OTHER</value>
</NODE> </NODE>
<!-- third question --> <!-- third question -->
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
...@@ -151,6 +164,7 @@ ...@@ -151,6 +164,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Man</value> <value name='answer' factory='String'>Man</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="thirdQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="thirdQuestion"/>
<value name='answer_code' factory='String'>GENDER_MAN</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -159,6 +173,7 @@ ...@@ -159,6 +173,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Woman</value> <value name='answer' factory='String'>Woman</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="thirdQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="thirdQuestion"/>
<value name='answer_code' factory='String'>GENDER_WOMAN</value>
</NODE> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_answer</tableName> <tableName factory="String">tl_diversity_answer</tableName>
...@@ -167,6 +182,7 @@ ...@@ -167,6 +182,7 @@
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='answer' factory='String'>Other, non-binary</value> <value name='answer' factory='String'>Other, non-binary</value>
<value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="thirdQuestion"/> <value name='question_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="thirdQuestion"/>
<value name='answer_code' factory='String'>GENDER_OTHER</value>
</NODE> </NODE>
</NODE> </NODE>
</OBJECTS> </OBJECTS>
...@@ -323,6 +323,7 @@ ...@@ -323,6 +323,7 @@
.mapEntry("Job",job) .mapEntry("Job",job)
.mapEntry("Candidate",candidate) .mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication) .mapEntry("JobApplication",jobApplication)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
// .mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent") // .mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.toMap() %>"/> .toMap() %>"/>
</div> </div>
......
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