Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
26f41df1
Commit
26f41df1
authored
Jun 23, 2017
by
chenith
Committed by
Harsh Shah
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update applicant job overview- search job with id and key.
parent
99117632
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
3 deletions
+184
-3
BaseJob.java
cmsWebApp/src/performa/orm/BaseJob.java
+118
-0
Job.xml
cmsWebApp/src/performa/orm/Job.xml
+6
-0
JobPersistenceMgr.java
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
+56
-0
job_overview.jsp
...ebApp/webroot/extensions/applicantportal/job_overview.jsp
+4
-3
No files found.
cmsWebApp/src/performa/orm/BaseJob.java
View file @
26f41df1
...
@@ -61,6 +61,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -61,6 +61,7 @@ public abstract class BaseJob extends BaseBusinessClass
// Static constants corresponding to searches
// Static constants corresponding to searches
public
static
final
String
SEARCH_All
=
"All"
;
public
static
final
String
SEARCH_All
=
"All"
;
public
static
final
String
SEARCH_JobKey
=
"JobKey"
;
// Static constants corresponding to attribute helpers
// Static constants corresponding to attribute helpers
...
@@ -2597,6 +2598,123 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -2597,6 +2598,123 @@ public abstract class BaseJob extends BaseBusinessClass
.
search
(
transaction
);
.
search
(
transaction
);
}
}
public
static
SearchJobKey
SearchByJobKey
()
{
return
new
SearchJobKey
();
}
public
static
class
SearchJobKey
extends
SearchObject
<
Job
>
{
public
SearchJobKey
byID
(
Long
ID
)
{
by
(
"ID"
,
ID
);
return
this
;
}
public
SearchJobKey
byKey
(
String
Key
)
{
by
(
"Key"
,
Key
);
return
this
;
}
public
SearchJobKey
andObjectID
(
QueryFilter
<
Long
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.object_id"
,
FIELD_ObjectID
);
return
this
;
}
public
SearchJobKey
andObjectCreated
(
QueryFilter
<
Date
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.object_created_date"
,
FIELD_ObjectCreated
);
return
this
;
}
public
SearchJobKey
andObjectLastModified
(
QueryFilter
<
Date
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.object_last_updated_date"
,
FIELD_ObjectLastModified
);
return
this
;
}
public
SearchJobKey
andJobTitle
(
QueryFilter
<
String
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.job_title"
,
"JobTitle"
);
return
this
;
}
public
SearchJobKey
andJobDescription
(
QueryFilter
<
String
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.job_description"
,
"JobDescription"
);
return
this
;
}
public
SearchJobKey
andJobStatus
(
QueryFilter
<
JobStatus
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.job_status"
,
"JobStatus"
);
return
this
;
}
public
SearchJobKey
andApplyBy
(
QueryFilter
<
Date
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.apply_by"
,
"ApplyBy"
);
return
this
;
}
public
SearchJobKey
andIncludeAssessmentCriteria
(
QueryFilter
<
Boolean
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.include_assessment_criteria"
,
"IncludeAssessmentCriteria"
);
return
this
;
}
public
SearchJobKey
andAssessmentType
(
QueryFilter
<
AssessmentType
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.assessment_type"
,
"AssessmentType"
);
return
this
;
}
public
SearchJobKey
andRandomKey
(
QueryFilter
<
String
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.random_key"
,
"RandomKey"
);
return
this
;
}
public
SearchJobKey
andLevel
(
QueryFilter
<
Level
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
return
this
;
}
public
SearchJobKey
andSecUser
(
QueryFilter
<
SecUser
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.secuser_id"
,
"SecUser"
);
return
this
;
}
public
Job
search
(
ObjectTransaction
transaction
)
throws
StorageException
{
BaseBusinessClass
[]
results
=
super
.
search
(
transaction
,
REFERENCE_Job
,
SEARCH_JobKey
,
criteria
);
Set
<
Job
>
typedResults
=
new
LinkedHashSet
<
Job
>
();
for
(
BaseBusinessClass
bbcResult
:
results
)
{
Job
aResult
=
(
Job
)
bbcResult
;
typedResults
.
add
(
aResult
);
}
return
(
Job
)
singletonResult
(
ObjstoreUtils
.
removeDeleted
(
transaction
,
typedResults
).
toArray
(
new
BaseBusinessClass
[
0
]),
"Job"
,
""
);
}
}
public
static
Job
searchJobKey
(
ObjectTransaction
transaction
,
Long
ID
,
String
Key
)
throws
StorageException
{
return
SearchByJobKey
()
.
byID
(
ID
)
.
byKey
(
Key
)
.
search
(
transaction
);
}
public
Object
getAttribute
(
String
attribName
)
public
Object
getAttribute
(
String
attribName
)
...
...
cmsWebApp/src/performa/orm/Job.xml
View file @
26f41df1
...
@@ -29,6 +29,11 @@
...
@@ -29,6 +29,11 @@
<SEARCH
type=
"All"
paramFilter=
"tl_job.object_id is not null"
orderBy=
"tl_job.object_id"
/>
<SEARCH
type=
"All"
paramFilter=
"tl_job.object_id is not null"
orderBy=
"tl_job.object_id"
/>
<SEARCH
type=
"JobKey"
paramFilter=
"tl_job.object_id is not null"
singleton=
"TRUE"
>
<PARAM
name=
"ID"
type=
"Long"
paramFilter=
"object_id = ${ID} "
/>
<PARAM
name=
"Key"
type=
"String"
paramFilter=
"random_key = ${Key}"
/>
</SEARCH>
</BUSINESSCLASS>
</BUSINESSCLASS>
</ROOT>
</ROOT>
\ No newline at end of file
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
View file @
26f41df1
...
@@ -281,6 +281,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -281,6 +281,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
{
throw
new
RuntimeException
(
"NOT implemented: executeSearchQueryAll"
);
throw
new
RuntimeException
(
"NOT implemented: executeSearchQueryAll"
);
}
}
public
ResultSet
executeSearchQueryJobKey
(
SQLManager
sqlMgr
,
Long
ID
,
String
Key
)
throws
SQLException
{
throw
new
RuntimeException
(
"NOT implemented: executeSearchQueryJobKey"
);
}
...
@@ -430,6 +434,58 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -430,6 +434,58 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
return
results
;
return
results
;
}
}
else
if
(
searchType
.
equals
(
Job
.
SEARCH_JobKey
))
{
// Local scope for transformed variables
{
}
String
orderBy
=
" "
;
String
tables
=
" "
;
Set
<
String
>
joinTableSet
=
new
HashSet
<
String
>();
String
filter
;
Object
[]
searchParams
;
// paramFilter: tl_job.object_id is not null
String
preFilter
=
"(tl_job.object_id is not null)"
+
" "
;
if
(
criteria
.
containsKey
(
"ID"
))
{
preFilter
+=
" AND (object_id = ${ID} ) "
;
preFilter
+=
""
;
}
if
(
criteria
.
containsKey
(
"Key"
))
{
preFilter
+=
" AND (random_key = ${Key}) "
;
preFilter
+=
""
;
}
preFilter
+=
context
.
getLoadingAttributes
().
getCustomSQL
()
;
SearchParamTransform
tx
=
new
SearchParamTransform
(
criteria
);
filter
=
StringUtils
.
replaceParams
(
preFilter
,
tx
);
searchParams
=
tx
.
getParamsArray
();
Integer
maxRows
=
context
.
getLoadingAttributes
().
getMaxRows
();
boolean
truncateExtra
=
!
context
.
getLoadingAttributes
().
isFailIfMaxExceeded
();
String
query
=
"SELECT "
+
SELECT_COLUMNS
+
"FROM {PREFIX}tl_job "
+
tables
+
tableSetToSQL
(
joinTableSet
)
+
"WHERE "
+
SELECT_JOINS
+
" "
+
filter
+
orderBy
;
BaseBusinessClass
[]
results
=
loadQuery
(
allPSets
,
sqlMgr
,
context
,
query
,
searchParams
,
maxRows
,
truncateExtra
);
return
results
;
}
else
else
{
{
...
...
cmsWebApp/webroot/extensions/applicantportal/job_overview.jsp
View file @
26f41df1
...
@@ -8,11 +8,12 @@
...
@@ -8,11 +8,12 @@
ObjectTransaction objTran = (process == null ? ObjectTransaction.getTransaction () : process.getTransaction ());
ObjectTransaction objTran = (process == null ? ObjectTransaction.getTransaction () : process.getTransaction ());
String nextPage = WebUtils.getSamePageInRenderMode(request, "SignIn");
String nextPage = WebUtils.getSamePageInRenderMode(request, "SignIn");
Job job = (Job) process.getAttribute("Job");
Job job = (Job) process.getAttribute("Job");
String jobID = request.getParameter("jobID");
String id = request.getParameter("id");
String key = request.getParameter("key");
if(
jobID
!=null)
if(
id!=null && key
!=null)
{
{
job = Job.
getJobByID(objTran, Long.parseLong(jobID)
);
job = Job.
searchJobKey(objTran, Long.parseLong(id), key
);
}
}
if(job!=null)
if(job!=null)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment