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
2c610723
Commit
2c610723
authored
Oct 13, 2018
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding occupation reference to job
parent
51afe037
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
282 additions
and
21 deletions
+282
-21
Job.xml
cmsWebApp/sql/Job.xml
+1
-0
Job.sql
cmsWebApp/sql/ms/Job.sql
+1
-0
Job.sql
cmsWebApp/sql/oracle/Job.sql
+1
-0
Job.sql
cmsWebApp/sql/postgres/Job.sql
+1
-0
BaseJob.java
cmsWebApp/src/performa/orm/BaseJob.java
+194
-0
Job.xml
cmsWebApp/src/performa/orm/Job.xml
+1
-0
JobPersistenceMgr.java
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
+8
-6
Occupation.java
cmsWebApp/src/performa/orm/Occupation.java
+7
-15
WebUtils.java
cmsWebApp/src/performa/utils/WebUtils.java
+2
-0
GeneralConfig_adminPortal.xml
...root/extensions/adminportal/GeneralConfig_adminPortal.xml
+1
-0
job_detail.jsp
cmsWebApp/webroot/extensions/adminportal/job_detail.jsp
+1
-0
occupation_selector.jsp
...pp/webroot/extensions/adminportal/occupation_selector.jsp
+51
-0
20181013_Alter_Job.xml
...ot/extensions/adminportal/upgrades/20181013_Alter_Job.xml
+13
-0
No files found.
cmsWebApp/sql/Job.xml
View file @
2c610723
...
...
@@ -36,6 +36,7 @@
<column
name=
"job_owner_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"company_user_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"hiring_team_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"occupation_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"shortened_url_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
</NODE>
...
...
cmsWebApp/sql/ms/Job.sql
View file @
2c610723
...
...
@@ -36,6 +36,7 @@ CREATE TABLE tl_job (
job_owner_id
numeric
(
12
)
NULL
,
company_user_id
numeric
(
12
)
NULL
,
hiring_team_id
numeric
(
12
)
NULL
,
occupation_id
numeric
(
12
)
NULL
,
shortened_url_id
numeric
(
12
)
NULL
);
...
...
cmsWebApp/sql/oracle/Job.sql
View file @
2c610723
...
...
@@ -37,6 +37,7 @@ CREATE TABLE tl_job (
job_owner_id
number
(
12
)
NULL
,
company_user_id
number
(
12
)
NULL
,
hiring_team_id
number
(
12
)
NULL
,
occupation_id
number
(
12
)
NULL
,
shortened_url_id
number
(
12
)
NULL
);
...
...
cmsWebApp/sql/postgres/Job.sql
View file @
2c610723
...
...
@@ -37,6 +37,7 @@ CREATE TABLE tl_job (
job_owner_id
numeric
(
12
)
NULL
,
company_user_id
numeric
(
12
)
NULL
,
hiring_team_id
numeric
(
12
)
NULL
,
occupation_id
numeric
(
12
)
NULL
,
shortened_url_id
numeric
(
12
)
NULL
);
...
...
cmsWebApp/src/performa/orm/BaseJob.java
View file @
2c610723
...
...
@@ -89,6 +89,7 @@ public abstract class BaseJob extends BaseBusinessClass
public
static
final
String
SINGLEREFERENCE_JobOwner
=
"JobOwner"
;
public
static
final
String
SINGLEREFERENCE_CreatedBy
=
"CreatedBy"
;
public
static
final
String
SINGLEREFERENCE_HiringTeam
=
"HiringTeam"
;
public
static
final
String
SINGLEREFERENCE_Occupation
=
"Occupation"
;
public
static
final
String
SINGLEREFERENCE_ShortenedURL
=
"ShortenedURL"
;
public
static
final
String
MULTIPLEREFERENCE_JobApplications
=
"JobApplications"
;
public
static
final
String
BACKREF_JobApplications
=
""
;
...
...
@@ -190,6 +191,7 @@ public abstract class BaseJob extends BaseBusinessClass
private
SingleAssociation
<
Job
,
CompanyUser
>
_JobOwner
;
private
SingleAssociation
<
Job
,
CompanyUser
>
_CreatedBy
;
private
SingleAssociation
<
Job
,
HiringTeam
>
_HiringTeam
;
private
SingleAssociation
<
Job
,
Occupation
>
_Occupation
;
private
SingleAssociation
<
Job
,
ShortenedURL
>
_ShortenedURL
;
...
...
@@ -267,6 +269,7 @@ public abstract class BaseJob extends BaseBusinessClass
setupAssocMetaData_JobOwner
();
setupAssocMetaData_CreatedBy
();
setupAssocMetaData_HiringTeam
();
setupAssocMetaData_Occupation
();
setupAssocMetaData_ShortenedURL
();
FIELD_Email_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_Email
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_Password_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_Password
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
...
...
@@ -472,6 +475,20 @@ public abstract class BaseJob extends BaseBusinessClass
// Meta Info setup
private
static
void
setupAssocMetaData_Occupation
()
{
Map
metaInfo
=
new
HashMap
();
metaInfo
.
put
(
"dbcol"
,
"occupation_id"
);
metaInfo
.
put
(
"name"
,
"Occupation"
);
metaInfo
.
put
(
"type"
,
"Occupation"
);
LogMgr
.
log
(
BUSINESS_OBJECTS
,
LogLevel
.
DEBUG2
,
"Metadata for Job.Occupation:"
,
metaInfo
);
ATTRIBUTES_METADATA_Job
.
put
(
SINGLEREFERENCE_Occupation
,
Collections
.
unmodifiableMap
(
metaInfo
));
}
// Meta Info setup
private
static
void
setupAssocMetaData_ShortenedURL
()
{
Map
metaInfo
=
new
HashMap
();
...
...
@@ -1235,6 +1252,7 @@ public abstract class BaseJob extends BaseBusinessClass
_JobOwner
=
new
SingleAssociation
<
Job
,
CompanyUser
>
(
this
,
SINGLEREFERENCE_JobOwner
,
null
,
CompanyUser
.
REFERENCE_CompanyUser
,
"tl_job"
);
_CreatedBy
=
new
SingleAssociation
<
Job
,
CompanyUser
>
(
this
,
SINGLEREFERENCE_CreatedBy
,
null
,
CompanyUser
.
REFERENCE_CompanyUser
,
"tl_job"
);
_HiringTeam
=
new
SingleAssociation
<
Job
,
HiringTeam
>
(
this
,
SINGLEREFERENCE_HiringTeam
,
null
,
HiringTeam
.
REFERENCE_HiringTeam
,
"tl_job"
);
_Occupation
=
new
SingleAssociation
<
Job
,
Occupation
>
(
this
,
SINGLEREFERENCE_Occupation
,
null
,
Occupation
.
REFERENCE_Occupation
,
"tl_job"
);
_ShortenedURL
=
new
SingleAssociation
<
Job
,
ShortenedURL
>
(
this
,
SINGLEREFERENCE_ShortenedURL
,
null
,
ShortenedURL
.
REFERENCE_ShortenedURL
,
"tl_job"
);
_JobApplications
=
new
MultipleAssociation
<
Job
,
JobApplication
>
(
this
,
MULTIPLEREFERENCE_JobApplications
,
JobApplication
.
SINGLEREFERENCE_Job
,
JobApplication
.
REFERENCE_JobApplication
);
_AssessmentCriterias
=
new
MultipleAssociation
<
Job
,
AssessmentCriteria
>
(
this
,
MULTIPLEREFERENCE_AssessmentCriterias
,
AssessmentCriteria
.
SINGLEREFERENCE_Job
,
AssessmentCriteria
.
REFERENCE_AssessmentCriteria
);
...
...
@@ -1256,6 +1274,7 @@ public abstract class BaseJob extends BaseBusinessClass
_JobOwner
=
new
SingleAssociation
<
Job
,
CompanyUser
>
(
this
,
SINGLEREFERENCE_JobOwner
,
null
,
CompanyUser
.
REFERENCE_CompanyUser
,
"tl_job"
);
_CreatedBy
=
new
SingleAssociation
<
Job
,
CompanyUser
>
(
this
,
SINGLEREFERENCE_CreatedBy
,
null
,
CompanyUser
.
REFERENCE_CompanyUser
,
"tl_job"
);
_HiringTeam
=
new
SingleAssociation
<
Job
,
HiringTeam
>
(
this
,
SINGLEREFERENCE_HiringTeam
,
null
,
HiringTeam
.
REFERENCE_HiringTeam
,
"tl_job"
);
_Occupation
=
new
SingleAssociation
<
Job
,
Occupation
>
(
this
,
SINGLEREFERENCE_Occupation
,
null
,
Occupation
.
REFERENCE_Occupation
,
"tl_job"
);
_ShortenedURL
=
new
SingleAssociation
<
Job
,
ShortenedURL
>
(
this
,
SINGLEREFERENCE_ShortenedURL
,
null
,
ShortenedURL
.
REFERENCE_ShortenedURL
,
"tl_job"
);
_JobApplications
=
new
MultipleAssociation
<
Job
,
JobApplication
>
(
this
,
MULTIPLEREFERENCE_JobApplications
,
JobApplication
.
SINGLEREFERENCE_Job
,
JobApplication
.
REFERENCE_JobApplication
);
_AssessmentCriterias
=
new
MultipleAssociation
<
Job
,
AssessmentCriteria
>
(
this
,
MULTIPLEREFERENCE_AssessmentCriterias
,
AssessmentCriteria
.
SINGLEREFERENCE_Job
,
AssessmentCriteria
.
REFERENCE_AssessmentCriteria
);
...
...
@@ -4827,6 +4846,8 @@ public abstract class BaseJob extends BaseBusinessClass
result
.
add
(
"HiringTeam"
);
result
.
add
(
"Occupation"
);
result
.
add
(
"ShortenedURL"
);
...
...
@@ -4864,6 +4885,9 @@ public abstract class BaseJob extends BaseBusinessClass
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_HiringTeam
))
{
return
_HiringTeam
.
getReferencedType
();
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
return
_Occupation
.
getReferencedType
();
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
return
_ShortenedURL
.
getReferencedType
();
...
...
@@ -4896,6 +4920,9 @@ public abstract class BaseJob extends BaseBusinessClass
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_HiringTeam
))
{
return
null
;
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
return
null
;
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
return
null
;
...
...
@@ -4937,6 +4964,9 @@ public abstract class BaseJob extends BaseBusinessClass
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_HiringTeam
))
{
return
getHiringTeam
();
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
return
getOccupation
();
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
return
getShortenedURL
();
...
...
@@ -4978,6 +5008,9 @@ public abstract class BaseJob extends BaseBusinessClass
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_HiringTeam
))
{
return
getHiringTeam
(
getType
);
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
return
getOccupation
(
getType
);
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
return
getShortenedURL
(
getType
);
...
...
@@ -5019,6 +5052,9 @@ public abstract class BaseJob extends BaseBusinessClass
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_HiringTeam
))
{
return
getHiringTeamID
();
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
return
getOccupationID
();
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
return
getShortenedURLID
();
...
...
@@ -5060,6 +5096,9 @@ public abstract class BaseJob extends BaseBusinessClass
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_HiringTeam
))
{
setHiringTeam
((
HiringTeam
)(
newValue
));
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
setOccupation
((
Occupation
)(
newValue
));
}
else
if
(
assocName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
setShortenedURL
((
ShortenedURL
)(
newValue
));
...
...
@@ -5838,6 +5877,100 @@ public abstract class BaseJob extends BaseBusinessClass
}
/**
* Get the reference Occupation
*/
public
Occupation
getOccupation
()
throws
StorageException
{
assertValid
();
try
{
return
(
Occupation
)(
_Occupation
.
get
());
}
catch
(
ClassCastException
e
)
{
LogMgr
.
log
(
BUSINESS_OBJECTS
,
LogLevel
.
SYSTEMERROR2
,
"Cache collision in Job:"
,
this
.
getObjectID
(),
", was trying to get Occupation:"
,
getOccupationID
());
LogMgr
.
log
(
BUSINESS_OBJECTS
,
LogLevel
.
SYSTEMERROR2
,
"Instead I got:"
,
_Occupation
.
get
().
getClass
());
throw
e
;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public
Occupation
getOccupation
(
Get
getType
)
throws
StorageException
{
assertValid
();
return
_Occupation
.
get
(
getType
);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public
Long
getOccupationID
()
{
assertValid
();
if
(
_Occupation
==
null
)
{
return
null
;
}
else
{
return
_Occupation
.
getID
();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected
void
preOccupationChange
(
Occupation
newOccupation
)
throws
FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected
void
postOccupationChange
()
throws
FieldException
{
}
public
FieldWriteability
getWriteability_Occupation
()
{
return
getFieldWritabilityUtil
(
FieldWriteability
.
TRUE
);
}
/**
* Set the reference Occupation. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public
void
setOccupation
(
Occupation
newOccupation
)
throws
StorageException
,
FieldException
{
if
(
_Occupation
.
wouldReferencedChange
(
newOccupation
))
{
assertValid
();
Debug
.
assertion
(
getWriteability_Occupation
()
!=
FieldWriteability
.
FALSE
,
"Assoc Occupation is not writeable"
);
preOccupationChange
(
newOccupation
);
_Occupation
.
set
(
newOccupation
);
postOccupationChange
();
}
}
/**
* Get the reference ShortenedURL
*/
public
ShortenedURL
getShortenedURL
()
throws
StorageException
...
...
@@ -6497,6 +6630,7 @@ public abstract class BaseJob extends BaseBusinessClass
_JobOwner
.
getPersistentSets
(
allSets
);
_CreatedBy
.
getPersistentSets
(
allSets
);
_HiringTeam
.
getPersistentSets
(
allSets
);
_Occupation
.
getPersistentSets
(
allSets
);
_ShortenedURL
.
getPersistentSets
(
allSets
);
}
...
...
@@ -6540,6 +6674,7 @@ public abstract class BaseJob extends BaseBusinessClass
_JobOwner
.
setFromPersistentSets
(
objectID
,
allSets
);
_CreatedBy
.
setFromPersistentSets
(
objectID
,
allSets
);
_HiringTeam
.
setFromPersistentSets
(
objectID
,
allSets
);
_Occupation
.
setFromPersistentSets
(
objectID
,
allSets
);
_ShortenedURL
.
setFromPersistentSets
(
objectID
,
allSets
);
}
...
...
@@ -6838,6 +6973,7 @@ public abstract class BaseJob extends BaseBusinessClass
_JobOwner
.
copyFrom
(
sourceJob
.
_JobOwner
,
linkToGhosts
);
_CreatedBy
.
copyFrom
(
sourceJob
.
_CreatedBy
,
linkToGhosts
);
_HiringTeam
.
copyFrom
(
sourceJob
.
_HiringTeam
,
linkToGhosts
);
_Occupation
.
copyFrom
(
sourceJob
.
_Occupation
,
linkToGhosts
);
_ShortenedURL
.
copyFrom
(
sourceJob
.
_ShortenedURL
,
linkToGhosts
);
}
...
...
@@ -6922,6 +7058,7 @@ public abstract class BaseJob extends BaseBusinessClass
_JobOwner
.
readExternalData
(
vals
.
get
(
SINGLEREFERENCE_JobOwner
));
_CreatedBy
.
readExternalData
(
vals
.
get
(
SINGLEREFERENCE_CreatedBy
));
_HiringTeam
.
readExternalData
(
vals
.
get
(
SINGLEREFERENCE_HiringTeam
));
_Occupation
.
readExternalData
(
vals
.
get
(
SINGLEREFERENCE_Occupation
));
_ShortenedURL
.
readExternalData
(
vals
.
get
(
SINGLEREFERENCE_ShortenedURL
));
_JobApplications
.
readExternalData
(
vals
.
get
(
MULTIPLEREFERENCE_JobApplications
));
_AssessmentCriterias
.
readExternalData
(
vals
.
get
(
MULTIPLEREFERENCE_AssessmentCriterias
));
...
...
@@ -6981,6 +7118,7 @@ public abstract class BaseJob extends BaseBusinessClass
vals
.
put
(
SINGLEREFERENCE_JobOwner
,
_JobOwner
.
writeExternalData
());
vals
.
put
(
SINGLEREFERENCE_CreatedBy
,
_CreatedBy
.
writeExternalData
());
vals
.
put
(
SINGLEREFERENCE_HiringTeam
,
_HiringTeam
.
writeExternalData
());
vals
.
put
(
SINGLEREFERENCE_Occupation
,
_Occupation
.
writeExternalData
());
vals
.
put
(
SINGLEREFERENCE_ShortenedURL
,
_ShortenedURL
.
writeExternalData
());
vals
.
put
(
MULTIPLEREFERENCE_JobApplications
,
_JobApplications
.
writeExternalData
());
vals
.
put
(
MULTIPLEREFERENCE_AssessmentCriterias
,
_AssessmentCriterias
.
writeExternalData
());
...
...
@@ -7100,6 +7238,7 @@ public abstract class BaseJob extends BaseBusinessClass
_JobOwner
.
compare
(
otherJob
.
_JobOwner
,
listener
);
_CreatedBy
.
compare
(
otherJob
.
_CreatedBy
,
listener
);
_HiringTeam
.
compare
(
otherJob
.
_HiringTeam
,
listener
);
_Occupation
.
compare
(
otherJob
.
_Occupation
,
listener
);
_ShortenedURL
.
compare
(
otherJob
.
_ShortenedURL
,
listener
);
...
...
@@ -7168,6 +7307,7 @@ public abstract class BaseJob extends BaseBusinessClass
visitor
.
visitAssociation
(
_JobOwner
);
visitor
.
visitAssociation
(
_CreatedBy
);
visitor
.
visitAssociation
(
_HiringTeam
);
visitor
.
visitAssociation
(
_Occupation
);
visitor
.
visitAssociation
(
_ShortenedURL
);
visitor
.
visitAssociation
(
_JobApplications
);
visitor
.
visitAssociation
(
_AssessmentCriterias
);
...
...
@@ -7212,6 +7352,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
visitor
.
visit
(
_HiringTeam
);
}
if
(
scope
.
includes
(
_Occupation
))
{
visitor
.
visit
(
_Occupation
);
}
if
(
scope
.
includes
(
_ShortenedURL
))
{
visitor
.
visit
(
_ShortenedURL
);
...
...
@@ -7365,6 +7509,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
filter
.
matches
(
getHiringTeam
());
}
else
if
(
attribName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
return
filter
.
matches
(
getOccupation
());
}
else
if
(
attribName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
return
filter
.
matches
(
getShortenedURL
());
...
...
@@ -7568,6 +7716,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
}
public
SearchAll
andOccupation
(
QueryFilter
<
Occupation
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.occupation_id"
,
"Occupation"
);
return
this
;
}
public
SearchAll
andShortenedURL
(
QueryFilter
<
ShortenedURL
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.shortened_url_id"
,
"ShortenedURL"
);
...
...
@@ -7805,6 +7959,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
}
public
SearchJobKey
andOccupation
(
QueryFilter
<
Occupation
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.occupation_id"
,
"Occupation"
);
return
this
;
}
public
SearchJobKey
andShortenedURL
(
QueryFilter
<
ShortenedURL
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.shortened_url_id"
,
"ShortenedURL"
);
...
...
@@ -8036,6 +8196,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
}
public
SearchCompany
andOccupation
(
QueryFilter
<
Occupation
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.occupation_id"
,
"Occupation"
);
return
this
;
}
public
SearchCompany
andShortenedURL
(
QueryFilter
<
ShortenedURL
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.shortened_url_id"
,
"ShortenedURL"
);
...
...
@@ -8680,6 +8846,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
getWriteability_HiringTeam
();
}
else
if
(
fieldName
.
equals
(
SINGLEREFERENCE_Occupation
))
{
return
getWriteability_Occupation
();
}
else
if
(
fieldName
.
equals
(
SINGLEREFERENCE_ShortenedURL
))
{
return
getWriteability_ShortenedURL
();
...
...
@@ -9921,6 +10091,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
toHiringTeam
();
}
if
(
name
.
equals
(
"Occupation"
))
{
return
toOccupation
();
}
if
(
name
.
equals
(
"ShortenedURL"
))
{
return
toShortenedURL
();
...
...
@@ -10050,6 +10224,12 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
HiringTeam
.
REFERENCE_HiringTeam
.
new
HiringTeamPipeLineFactory
<
From
,
HiringTeam
>
(
this
,
new
ORMSingleAssocPipe
<
Me
,
HiringTeam
>(
SINGLEREFERENCE_HiringTeam
,
filter
));
}
public
Occupation
.
OccupationPipeLineFactory
<
From
,
Occupation
>
toOccupation
()
{
return
toOccupation
(
Filter
.
ALL
);
}
public
Occupation
.
OccupationPipeLineFactory
<
From
,
Occupation
>
toOccupation
(
Filter
<
Occupation
>
filter
)
{
return
Occupation
.
REFERENCE_Occupation
.
new
OccupationPipeLineFactory
<
From
,
Occupation
>
(
this
,
new
ORMSingleAssocPipe
<
Me
,
Occupation
>(
SINGLEREFERENCE_Occupation
,
filter
));
}
public
ShortenedURL
.
ShortenedURLPipeLineFactory
<
From
,
ShortenedURL
>
toShortenedURL
()
{
return
toShortenedURL
(
Filter
.
ALL
);
}
public
ShortenedURL
.
ShortenedURLPipeLineFactory
<
From
,
ShortenedURL
>
toShortenedURL
(
Filter
<
ShortenedURL
>
filter
)
...
...
@@ -10297,6 +10477,20 @@ class DummyJob extends Job
return
HiringTeam
.
DUMMY_HiringTeam
.
getObjectID
();
}
public
Occupation
getOccupation
()
throws
StorageException
{
return
(
Occupation
)(
Occupation
.
DUMMY_Occupation
);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public
Long
getOccupationID
()
{
return
Occupation
.
DUMMY_Occupation
.
getObjectID
();
}
public
ShortenedURL
getShortenedURL
()
throws
StorageException
{
return
(
ShortenedURL
)(
ShortenedURL
.
DUMMY_ShortenedURL
);
...
...
cmsWebApp/src/performa/orm/Job.xml
View file @
2c610723
...
...
@@ -60,6 +60,7 @@
<SINGLEREFERENCE
name=
"JobOwner"
type=
"CompanyUser"
dbcol=
"job_owner_id"
/>
<SINGLEREFERENCE
name=
"CreatedBy"
type=
"CompanyUser"
dbcol=
"company_user_id"
/>
<SINGLEREFERENCE
name=
"HiringTeam"
type=
"HiringTeam"
dbcol=
"hiring_team_id"
/>
<SINGLEREFERENCE
name=
"Occupation"
type=
"Occupation"
dbcol=
"occupation_id"
/>
<SINGLEREFERENCE
name=
"ShortenedURL"
type=
"ShortenedURL"
dbcol=
"shortened_url_id"
/>
</TABLE>
...
...
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
View file @
2c610723
...
...
@@ -110,7 +110,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
}
private
String
SELECT_COLUMNS
=
"{PREFIX}tl_job.object_id as id, {PREFIX}tl_job.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_job.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_job.job_title, {PREFIX}tl_job.job_description, {PREFIX}tl_job.job_status, {PREFIX}tl_job.open_date, {PREFIX}tl_job.apply_by, {PREFIX}tl_job.include_assessment_criteria, {PREFIX}tl_job.assessment_type, {PREFIX}tl_job.random_key, {PREFIX}tl_job.job_type, {PREFIX}tl_job.ref_number, {PREFIX}tl_job.last_status_change_date, {PREFIX}tl_job.remote, {PREFIX}tl_job.city, {PREFIX}tl_job.postcode, {PREFIX}tl_job.location_radius, {PREFIX}tl_job.state, {PREFIX}tl_job.country, {PREFIX}tl_job.require_cv, {PREFIX}tl_job.manually_closed, {PREFIX}tl_job.last_edited, {PREFIX}tl_job.is_ppj, {PREFIX}tl_job.industry, {PREFIX}tl_job.culture_statement, {PREFIX}tl_job.level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.job_owner_id, {PREFIX}tl_job.company_user_id, {PREFIX}tl_job.hiring_team_id, {PREFIX}tl_job.shortened_url_id, 1 AS commasafe "
;
private
String
SELECT_COLUMNS
=
"{PREFIX}tl_job.object_id as id, {PREFIX}tl_job.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_job.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_job.job_title, {PREFIX}tl_job.job_description, {PREFIX}tl_job.job_status, {PREFIX}tl_job.open_date, {PREFIX}tl_job.apply_by, {PREFIX}tl_job.include_assessment_criteria, {PREFIX}tl_job.assessment_type, {PREFIX}tl_job.random_key, {PREFIX}tl_job.job_type, {PREFIX}tl_job.ref_number, {PREFIX}tl_job.last_status_change_date, {PREFIX}tl_job.remote, {PREFIX}tl_job.city, {PREFIX}tl_job.postcode, {PREFIX}tl_job.location_radius, {PREFIX}tl_job.state, {PREFIX}tl_job.country, {PREFIX}tl_job.require_cv, {PREFIX}tl_job.manually_closed, {PREFIX}tl_job.last_edited, {PREFIX}tl_job.is_ppj, {PREFIX}tl_job.industry, {PREFIX}tl_job.culture_statement, {PREFIX}tl_job.level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.job_owner_id, {PREFIX}tl_job.company_user_id, {PREFIX}tl_job.hiring_team_id, {PREFIX}tl_job.
occupation_id, {PREFIX}tl_job.
shortened_url_id, 1 AS commasafe "
;
private
String
SELECT_JOINS
=
""
;
public
BaseBusinessClass
fetchByID
(
ObjectID
id
,
PersistentSetCollection
allPSets
,
RDBMSPersistenceContext
context
,
SQLManager
sqlMgr
)
throws
SQLException
,
StorageException
...
...
@@ -189,6 +189,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_Occupation
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
))
{
// We will need to retrieve it
...
...
@@ -269,10 +270,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
int
rowsUpdated
=
executeStatement
(
sqlMgr
,
"UPDATE {PREFIX}tl_job "
+
"SET job_title = ?, job_description = ?, job_status = ?, open_date = ?, apply_by = ?, include_assessment_criteria = ?, assessment_type = ?, random_key = ?, job_type = ?, ref_number = ?, last_status_change_date = ?, remote = ?, city = ?, postcode = ?, location_radius = ?, state = ?, country = ?, require_cv = ?, manually_closed = ?, last_edited = ?, is_ppj = ?, industry = ?, culture_statement = ?, level_id = ? , client_id = ? , job_owner_id = ? , company_user_id = ? , hiring_team_id = ? , shortened_url_id = ? , object_LAST_UPDATED_DATE = "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
" "
+
"SET job_title = ?, job_description = ?, job_status = ?, open_date = ?, apply_by = ?, include_assessment_criteria = ?, assessment_type = ?, random_key = ?, job_type = ?, ref_number = ?, last_status_change_date = ?, remote = ?, city = ?, postcode = ?, location_radius = ?, state = ?, country = ?, require_cv = ?, manually_closed = ?, last_edited = ?, is_ppj = ?, industry = ?, culture_statement = ?, level_id = ? , client_id = ? , job_owner_id = ? , company_user_id = ? , hiring_team_id = ? ,
occupation_id = ? ,
shortened_url_id = ? , object_LAST_UPDATED_DATE = "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
" "
+
"WHERE tl_job.object_id = ? AND "
+
getConcurrencyCheck
(
sqlMgr
,
"object_LAST_UPDATED_DATE"
,
obj
.
getObjectLastModified
())
+
" "
,
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
)))).
listEntry
(
objectID
.
longID
()).
listEntry
(
obj
.
getObjectLastModified
()).
toList
().
toArray
());
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_
Occupation
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_
ShortenedURL
)))).
listEntry
(
objectID
.
longID
()).
listEntry
(
obj
.
getObjectLastModified
()).
toList
().
toArray
());
if
(
rowsUpdated
!=
1
)
{
...
...
@@ -667,6 +668,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
,
r
.
getObject
(
"job_owner_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
,
r
.
getObject
(
"company_user_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
,
r
.
getObject
(
"hiring_team_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_Occupation
,
r
.
getObject
(
"occupation_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
,
r
.
getObject
(
"shortened_url_id"
));
}
...
...
@@ -684,10 +686,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement
(
sqlMgr
,
"INSERT INTO {PREFIX}tl_job "
+
" (job_title, job_description, job_status, open_date, apply_by, include_assessment_criteria, assessment_type, random_key, job_type, ref_number, last_status_change_date, remote, city, postcode, location_radius, state, country, require_cv, manually_closed, last_edited, is_ppj, industry, culture_statement, level_id, client_id, job_owner_id, company_user_id, hiring_team_id, shortened_url_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) "
+
" (job_title, job_description, job_status, open_date, apply_by, include_assessment_criteria, assessment_type, random_key, job_type, ref_number, last_status_change_date, remote, city, postcode, location_radius, state, country, require_cv, manually_closed, last_edited, is_ppj, industry, culture_statement, level_id, client_id, job_owner_id, company_user_id, hiring_team_id,
occupation_id,
shortened_url_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) "
+
"VALUES "
+
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
", "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
")"
,
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
)))
.
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
))))
.
listEntry
(
objectID
.
longID
()).
toList
().
toArray
());
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?,
?, "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
", "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
")"
,
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
)))
.
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_
Occupation
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_
ShortenedURL
))))
.
listEntry
(
objectID
.
longID
()).
toList
().
toArray
());
tl_jobPSet
.
setStatus
(
PersistentSetStatus
.
PROCESSED
);
}
...
...
cmsWebApp/src/performa/orm/Occupation.java
View file @
2c610723
package
performa
.
orm
;
import
java.io.*
;
import
java.util.*
;
import
oneit.appservices.config.*
;
import
oneit.logging.*
;
import
oneit.objstore.*
;
import
oneit.utils.*
;
import
performa.orm.types.*
;
public
class
Occupation
extends
BaseOccupation
{
...
...
@@ -24,5 +10,10 @@ public class Occupation extends BaseOccupation
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
@Override
public
String
getToString
()
{
return
getName
();
}
}
\ No newline at end of file
cmsWebApp/src/performa/utils/WebUtils.java
View file @
2c610723
...
...
@@ -19,6 +19,7 @@ public class WebUtils
public
static
final
String
ADMIN_HOME
=
"AdminHome"
;
public
static
final
String
APPLICANT_HOME
=
"ApplicantHome"
;
public
static
final
String
CREATE_JOB
=
"CreateJob"
;
public
static
final
String
OCCUPATION
=
"Occupation"
;
public
static
final
String
ASSESSMENT_CRITERIA
=
"AssessmentCriteria"
;
public
static
final
String
WORKPLACE_CULTURE
=
"WorkplaceCulture"
;
public
static
final
String
JOB_MATCH
=
"JobMatchAssessment"
;
...
...
@@ -155,6 +156,7 @@ public class WebUtils
renderMode
.
equals
(
CARD_PAYMENT
)
||
renderMode
.
equals
(
REPLACE_CARD
)
||
renderMode
.
equals
(
EDIT_CARD
)
||
renderMode
.
equals
(
OCCUPATION
)
||
renderMode
.
equals
(
CREATED_JOB
);
}
...
...
cmsWebApp/webroot/extensions/adminportal/GeneralConfig_adminPortal.xml
View file @
2c610723
...
...
@@ -45,6 +45,7 @@
<RenderMode
name=
"CreatedJob"
preIncludeJSP=
"extensions/adminportal/created_job.jsp"
/>
<RenderMode
name=
"ReplaceCard"
preIncludeJSP=
"extensions/adminportal/replace_card_payment.jsp"
/>
<RenderMode
name=
"EditCard"
preIncludeJSP=
"extensions/adminportal/edit_card_payment.jsp"
/>
<RenderMode
name=
"Occupation"
preIncludeJSP=
"extensions/adminportal/occupation_selector.jsp"
/>
</NODE>
</MAP>
...
...
cmsWebApp/webroot/extensions/adminportal/job_detail.jsp
View file @
2c610723
...
...
@@ -175,6 +175,7 @@
</div>
<div class="col-md-6">
<label><oneit:label GUIName="Job Occupation Classification" /></label>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="Occupation" options="<%= Occupation.searchAll(transaction) %>"/>
</div>
</div>
<div class="form-group row">
...
...
cmsWebApp/webroot/extensions/adminportal/occupation_selector.jsp
0 → 100644
View file @
2c610723
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
String nextPage = WebUtils.getSamePageInRenderMode(request, "Occupation");
String jobPage = WebUtils.getSamePageInRenderMode(request, "CreateJob");
%>
<oneit:form name="editJob" method="post" enctype="multipart/form-data">
<div class="container-fluid">
<h1 class="page-title">Create a job</h1>
<div class="form-page-area">
<div>
<ul>
<%
for (Occupation occupation : Occupation.SearchByAll().andLevel(new EqualsFilter<>(OccupationLevel.LEVEL_1)).search(transaction))
{
%>
<li>
<%= occupation%>
</li>
<%
}
%>
</ul>
</div>
<div>
<ul>
<%
for (Occupation occupation : Occupation.SearchByAll().andLevel(new EqualsFilter<>(OccupationLevel.LEVEL_1)).search(transaction))
{
%>
<li>
<%= occupation%>
</li>
<%
}
%>
</ul>
</div>
</div>
</div>
</oneit:form>
</oneit:dynIncluded>
cmsWebApp/webroot/extensions/adminportal/upgrades/20181013_Alter_Job.xml
0 → 100644
View file @
2c610723
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS
name=
""
xmlns:oneit=
"http://www.1iT.com.au"
>
<NODE
name=
"Script"
factory=
"Vector"
>
<NODE
name=
"DDL"
factory=
"Participant"
class=
"oneit.sql.transfer.RedefineTableOperation"
>
<tableName
factory=
"String"
>
tl_job
</tableName>
<column
name=
"occupation_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
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