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
0088b858
Commit
0088b858
authored
Oct 30, 2017
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intercom custom attribute update
parent
ed6e3844
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
380 additions
and
41 deletions
+380
-41
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
CloseJobBatch.java
cmsWebApp/src/performa/batch/CloseJobBatch.java
+13
-0
BulkUpdateFP.java
cmsWebApp/src/performa/form/BulkUpdateFP.java
+16
-1
ChangeApplicationStatusFP.java
cmsWebApp/src/performa/form/ChangeApplicationStatusFP.java
+17
-1
CompleteApplicationFP.java
cmsWebApp/src/performa/form/CompleteApplicationFP.java
+17
-2
SaveCompanyFP.java
cmsWebApp/src/performa/form/SaveCompanyFP.java
+1
-1
SaveJobFP.java
cmsWebApp/src/performa/form/SaveJobFP.java
+9
-4
SaveUserDetailsFP.java
cmsWebApp/src/performa/form/SaveUserDetailsFP.java
+1
-1
SendCompanyUserInvitesFP.java
cmsWebApp/src/performa/form/SendCompanyUserInvitesFP.java
+1
-1
IntercomUtils.java
cmsWebApp/src/performa/intercom/utils/IntercomUtils.java
+65
-24
BaseJob.java
cmsWebApp/src/performa/orm/BaseJob.java
+210
-0
Job.xml
cmsWebApp/src/performa/orm/Job.xml
+1
-0
JobPersistenceMgr.java
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
+11
-6
20171030_Alter_Job.xml
...broot/extensions/performa/upgrades/20171030_Alter_Job.xml
+14
-0
No files found.
cmsWebApp/sql/Job.xml
View file @
0088b858
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
<column
name=
"city"
type=
"String"
nullable=
"true"
length=
"100"
/>
<column
name=
"city"
type=
"String"
nullable=
"true"
length=
"100"
/>
<column
name=
"state"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"state"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"country"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"country"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"manually_closed"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"level_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"level_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"client_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"client_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"company_user_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"company_user_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
...
...
cmsWebApp/sql/ms/Job.sql
View file @
0088b858
...
@@ -23,6 +23,7 @@ CREATE TABLE tl_job (
...
@@ -23,6 +23,7 @@ CREATE TABLE tl_job (
city
varchar
(
100
)
NULL
,
city
varchar
(
100
)
NULL
,
state
varchar
(
200
)
NULL
,
state
varchar
(
200
)
NULL
,
country
varchar
(
200
)
NULL
,
country
varchar
(
200
)
NULL
,
manually_closed
char
(
1
)
NULL
,
level_id
numeric
(
12
)
NULL
,
level_id
numeric
(
12
)
NULL
,
client_id
numeric
(
12
)
NULL
,
client_id
numeric
(
12
)
NULL
,
company_user_id
numeric
(
12
)
NULL
,
company_user_id
numeric
(
12
)
NULL
,
...
...
cmsWebApp/sql/oracle/Job.sql
View file @
0088b858
...
@@ -24,6 +24,7 @@ CREATE TABLE tl_job (
...
@@ -24,6 +24,7 @@ CREATE TABLE tl_job (
city
varchar2
(
100
)
NULL
,
city
varchar2
(
100
)
NULL
,
state
varchar2
(
200
)
NULL
,
state
varchar2
(
200
)
NULL
,
country
varchar2
(
200
)
NULL
,
country
varchar2
(
200
)
NULL
,
manually_closed
char
(
1
)
NULL
,
level_id
number
(
12
)
NULL
,
level_id
number
(
12
)
NULL
,
client_id
number
(
12
)
NULL
,
client_id
number
(
12
)
NULL
,
company_user_id
number
(
12
)
NULL
,
company_user_id
number
(
12
)
NULL
,
...
...
cmsWebApp/sql/postgres/Job.sql
View file @
0088b858
...
@@ -24,6 +24,7 @@ CREATE TABLE tl_job (
...
@@ -24,6 +24,7 @@ CREATE TABLE tl_job (
city
varchar
(
100
)
NULL
,
city
varchar
(
100
)
NULL
,
state
varchar
(
200
)
NULL
,
state
varchar
(
200
)
NULL
,
country
varchar
(
200
)
NULL
,
country
varchar
(
200
)
NULL
,
manually_closed
char
(
1
)
NULL
,
level_id
numeric
(
12
)
NULL
,
level_id
numeric
(
12
)
NULL
,
client_id
numeric
(
12
)
NULL
,
client_id
numeric
(
12
)
NULL
,
company_user_id
numeric
(
12
)
NULL
,
company_user_id
numeric
(
12
)
NULL
,
...
...
cmsWebApp/src/performa/batch/CloseJobBatch.java
View file @
0088b858
package
performa
.
batch
;
package
performa
.
batch
;
import
java.util.Set
;
import
oneit.appservices.batch.ORMBatch
;
import
oneit.appservices.batch.ORMBatch
;
import
oneit.logging.*
;
import
oneit.logging.*
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.objstore.ObjectTransaction
;
...
@@ -7,7 +8,9 @@ import oneit.objstore.StorageException;
...
@@ -7,7 +8,9 @@ import oneit.objstore.StorageException;
import
oneit.objstore.rdbms.filters.LessThanFilter
;
import
oneit.objstore.rdbms.filters.LessThanFilter
;
import
oneit.utils.DateDiff
;
import
oneit.utils.DateDiff
;
import
oneit.utils.parsers.FieldException
;
import
oneit.utils.parsers.FieldException
;
import
performa.intercom.utils.IntercomUtils
;
import
performa.orm.Job
;
import
performa.orm.Job
;
import
performa.orm.Company
;
import
performa.orm.types.JobStatus
;
import
performa.orm.types.JobStatus
;
...
@@ -27,8 +30,17 @@ public class CloseJobBatch extends ORMBatch
...
@@ -27,8 +30,17 @@ public class CloseJobBatch extends ORMBatch
for
(
Job
job
:
expiringJobs
)
for
(
Job
job
:
expiringJobs
)
{
{
job
.
setJobStatus
(
JobStatus
.
COMPLETE
);
job
.
setJobStatus
(
JobStatus
.
COMPLETE
);
job
.
setIsManuallyClosed
(
Boolean
.
FALSE
);
LogMgr
.
log
(
CLOSE_JOB_BATCH
,
LogLevel
.
DEBUG2
,
"Setting Job Status to Closed in job : "
,
job
);
LogMgr
.
log
(
CLOSE_JOB_BATCH
,
LogLevel
.
DEBUG2
,
"Setting Job Status to Closed in job : "
,
job
);
}
}
// Update closed job details to intercom
Set
<
Company
>
companies
=
Job
.
pipesJob
(
expiringJobs
).
toCompanyUser
().
toCompany
().
uniqueVals
();
for
(
Company
company
:
companies
)
{
IntercomUtils
.
updateCompany
(
company
);
}
}
}
}
}
\ No newline at end of file
cmsWebApp/src/performa/form/BulkUpdateFP.java
View file @
0088b858
...
@@ -10,6 +10,7 @@ import oneit.objstore.StorageException;
...
@@ -10,6 +10,7 @@ import oneit.objstore.StorageException;
import
oneit.objstore.parser.BusinessObjectParser
;
import
oneit.objstore.parser.BusinessObjectParser
;
import
oneit.objstore.rdbms.filters.EqualsFilter
;
import
oneit.objstore.rdbms.filters.EqualsFilter
;
import
oneit.objstore.utils.ObjstoreUtils
;
import
oneit.objstore.utils.ObjstoreUtils
;
import
oneit.security.SecUser
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.servlets.forms.SuccessfulResult
;
import
oneit.servlets.forms.SuccessfulResult
;
import
oneit.servlets.process.ORMProcessState
;
import
oneit.servlets.process.ORMProcessState
;
...
@@ -17,6 +18,8 @@ import oneit.servlets.process.SaveFP;
...
@@ -17,6 +18,8 @@ import oneit.servlets.process.SaveFP;
import
oneit.utils.BusinessException
;
import
oneit.utils.BusinessException
;
import
oneit.utils.filter.CollectionFilter
;
import
oneit.utils.filter.CollectionFilter
;
import
oneit.utils.filter.Filter
;
import
oneit.utils.filter.Filter
;
import
performa.intercom.utils.IntercomUtils
;
import
performa.orm.CompanyUser
;
import
performa.orm.Job
;
import
performa.orm.Job
;
import
performa.orm.JobApplication
;
import
performa.orm.JobApplication
;
import
performa.orm.types.AppProcessOption
;
import
performa.orm.types.AppProcessOption
;
...
@@ -61,7 +64,19 @@ public class BulkUpdateFP extends SaveFP
...
@@ -61,7 +64,19 @@ public class BulkUpdateFP extends SaveFP
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"In BulkUpdateFP Job Application Status successfully changed : "
,
application
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"In BulkUpdateFP Job Application Status successfully changed : "
,
application
);
}
}
// restarting process as custom attributes needs to be updated to intercom
completeProcessRestartAndRestoreAttribs
(
process
,
request
);
SecUser
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
CompanyUser
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
// Update company in intercom
if
(
companyUser
.
getCompany
()
!=
null
)
{
IntercomUtils
.
updateCompany
(
companyUser
.
getCompany
());
}
return
super
.
processForm
(
process
,
submission
,
params
);
return
super
.
processForm
(
process
,
submission
,
params
);
}
}
}
}
cmsWebApp/src/performa/form/ChangeApplicationStatusFP.java
View file @
0088b858
...
@@ -5,11 +5,14 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -5,11 +5,14 @@ import javax.servlet.http.HttpServletRequest;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogMgr
;
import
oneit.logging.LogMgr
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.StorageException
;
import
oneit.security.SecUser
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.servlets.forms.SuccessfulResult
;
import
oneit.servlets.forms.SuccessfulResult
;
import
oneit.servlets.process.ORMProcessState
;
import
oneit.servlets.process.ORMProcessState
;
import
oneit.servlets.process.SaveFP
;
import
oneit.servlets.process.SaveFP
;
import
oneit.utils.BusinessException
;
import
oneit.utils.BusinessException
;
import
performa.intercom.utils.IntercomUtils
;
import
performa.orm.CompanyUser
;
import
performa.orm.JobApplication
;
import
performa.orm.JobApplication
;
import
performa.orm.types.AppProcessOption
;
import
performa.orm.types.AppProcessOption
;
import
performa.orm.types.ApplicationStatus
;
import
performa.orm.types.ApplicationStatus
;
...
@@ -34,7 +37,19 @@ public class ChangeApplicationStatusFP extends SaveFP
...
@@ -34,7 +37,19 @@ public class ChangeApplicationStatusFP extends SaveFP
}
}
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"In ChangeApplicationStatusFP Job Application Status successfully changed : "
,
jobApplication
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"In ChangeApplicationStatusFP Job Application Status successfully changed : "
,
jobApplication
);
// restarting process as custom attributes needs to be updated to intercom
completeProcessRestartAndRestoreAttribs
(
process
,
request
);
SecUser
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
CompanyUser
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
// Update company in intercom
if
(
companyUser
.
getCompany
()
!=
null
)
{
IntercomUtils
.
updateCompany
(
companyUser
.
getCompany
());
}
return
super
.
processForm
(
process
,
submission
,
params
);
return
super
.
processForm
(
process
,
submission
,
params
);
}
}
}
}
\ No newline at end of file
cmsWebApp/src/performa/form/CompleteApplicationFP.java
View file @
0088b858
...
@@ -6,9 +6,12 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -6,9 +6,12 @@ import javax.servlet.http.HttpServletRequest;
import
oneit.logging.*
;
import
oneit.logging.*
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.parser.BusinessObjectParser
;
import
oneit.objstore.parser.BusinessObjectParser
;
import
oneit.security.SecUser
;
import
oneit.servlets.forms.*
;
import
oneit.servlets.forms.*
;
import
oneit.servlets.process.*
;
import
oneit.servlets.process.*
;
import
static
oneit
.
servlets
.
process
.
SaveFP
.
completeProcessRestartAndRestoreAttribs
;
import
oneit.utils.*
;
import
oneit.utils.*
;
import
performa.intercom.utils.IntercomUtils
;
import
performa.orm.*
;
import
performa.orm.*
;
import
performa.orm.types.ApplicationStatus
;
import
performa.orm.types.ApplicationStatus
;
import
performa.utils.AnalysisEngine
;
import
performa.utils.AnalysisEngine
;
...
@@ -19,14 +22,14 @@ public class CompleteApplicationFP extends SaveFP
...
@@ -19,14 +22,14 @@ public class CompleteApplicationFP extends SaveFP
@Override
@Override
public
SuccessfulResult
processForm
(
ORMProcessState
process
,
SubmissionDetails
submission
,
Map
params
)
throws
BusinessException
,
StorageException
public
SuccessfulResult
processForm
(
ORMProcessState
process
,
SubmissionDetails
submission
,
Map
params
)
throws
BusinessException
,
StorageException
{
{
JobApplication
jobApplication
=
(
JobApplication
)
process
.
getAttribute
(
"JobApplication"
);
HttpServletRequest
request
=
submission
.
getRequest
();
JobApplication
jobApplication
=
(
JobApplication
)
process
.
getAttribute
(
"JobApplication"
);
jobApplication
.
setApplicationStatus
(
ApplicationStatus
.
SUBMITTED
);
jobApplication
.
setApplicationStatus
(
ApplicationStatus
.
SUBMITTED
);
jobApplication
.
setSubmittedDate
(
new
Date
());
jobApplication
.
setSubmittedDate
(
new
Date
());
AnalysisEngine
.
analyseAnswers
(
jobApplication
.
getCandidate
(),
jobApplication
.
getJob
().
getLevel
(),
jobApplication
.
getCompletedAnswers
());
AnalysisEngine
.
analyseAnswers
(
jobApplication
.
getCandidate
(),
jobApplication
.
getJob
().
getLevel
(),
jobApplication
.
getCompletedAnswers
());
//TODO: set application status as UNSUITABLE if not scored
//TODO: set application status as UNSUITABLE if not scored
if
(
false
)
if
(
false
)
{
{
...
@@ -35,6 +38,18 @@ public class CompleteApplicationFP extends SaveFP
...
@@ -35,6 +38,18 @@ public class CompleteApplicationFP extends SaveFP
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING2
,
"Job Application Completed"
,
jobApplication
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING2
,
"Job Application Completed"
,
jobApplication
);
// restarting process as custom attributes needs to be updated to intercom
completeProcessRestartAndRestoreAttribs
(
process
,
request
);
SecUser
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
CompanyUser
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
// Update company in intercom
if
(
companyUser
.
getCompany
()
!=
null
)
{
IntercomUtils
.
updateCompany
(
companyUser
.
getCompany
());
}
return
super
.
processForm
(
process
,
submission
,
params
);
return
super
.
processForm
(
process
,
submission
,
params
);
}
}
...
...
cmsWebApp/src/performa/form/SaveCompanyFP.java
View file @
0088b858
...
@@ -33,7 +33,7 @@ public class SaveCompanyFP extends SaveFP
...
@@ -33,7 +33,7 @@ public class SaveCompanyFP extends SaveFP
}
}
// Update company in intercom
// Update company in intercom
IntercomUtils
.
updateCompany
(
company
,
process
.
getTransaction
()
);
IntercomUtils
.
updateCompany
(
company
);
return
super
.
processForm
(
process
,
submission
,
params
);
return
super
.
processForm
(
process
,
submission
,
params
);
}
}
...
...
cmsWebApp/src/performa/form/SaveJobFP.java
View file @
0088b858
...
@@ -53,16 +53,21 @@ public class SaveJobFP extends SaveFP
...
@@ -53,16 +53,21 @@ public class SaveJobFP extends SaveFP
job
.
createShortenedURL
();
job
.
createShortenedURL
();
}
}
// restarting process as job count needs to be updated to intercom
if
(
job
.
getJobStatus
()
==
JobStatus
.
COMPLETE
)
process
.
completeAndRestart
();
{
job
.
setIsManuallyClosed
(
Boolean
.
TRUE
);
}
// restarting process as custom attributes needs to be updated to intercom
completeProcessRestartAndRestoreAttribs
(
process
,
request
);
SecUser
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
SecUser
secUser
=
SecUser
.
getTXUser
(
process
.
getTransaction
());
CompanyUser
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
CompanyUser
companyUser
=
secUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
// Update company in intercom
job count details
// Update company in intercom
if
(
companyUser
.
getCompany
()
!=
null
)
if
(
companyUser
.
getCompany
()
!=
null
)
{
{
IntercomUtils
.
updateCompany
(
companyUser
.
getCompany
()
,
process
.
getTransaction
()
);
IntercomUtils
.
updateCompany
(
companyUser
.
getCompany
());
}
}
return
super
.
processForm
(
process
,
submission
,
params
);
return
super
.
processForm
(
process
,
submission
,
params
);
...
...
cmsWebApp/src/performa/form/SaveUserDetailsFP.java
View file @
0088b858
...
@@ -87,7 +87,7 @@ public class SaveUserDetailsFP extends SaveFP
...
@@ -87,7 +87,7 @@ public class SaveUserDetailsFP extends SaveFP
if
(
intercomUser
==
null
)
if
(
intercomUser
==
null
)
{
{
performa
.
intercom
.
resources
.
Company
intercomCompany
=
IntercomUtils
.
findOrCreateCompany
(
companyUser
.
getCompany
()
,
process
.
getTransaction
()
);
performa
.
intercom
.
resources
.
Company
intercomCompany
=
IntercomUtils
.
findOrCreateCompany
(
companyUser
.
getCompany
());
IntercomUtils
.
createIntercomUser
(
secUser
,
"Hiring Team"
,
intercomCompany
,
companyUser
.
getPhone
());
IntercomUtils
.
createIntercomUser
(
secUser
,
"Hiring Team"
,
intercomCompany
,
companyUser
.
getPhone
());
}
}
...
...
cmsWebApp/src/performa/form/SendCompanyUserInvitesFP.java
View file @
0088b858
...
@@ -136,7 +136,7 @@ public class SendCompanyUserInvitesFP extends SaveFP
...
@@ -136,7 +136,7 @@ public class SendCompanyUserInvitesFP extends SaveFP
// Create company and the first user of it in intercom
// Create company and the first user of it in intercom
performa
.
intercom
.
resources
.
Company
intercomCompany
=
IntercomUtils
.
findOrCreateCompany
(
company
,
objTran
);
performa
.
intercom
.
resources
.
Company
intercomCompany
=
IntercomUtils
.
findOrCreateCompany
(
company
);
IntercomUtils
.
createIntercomUser
(
secUser
,
"Hiring Team"
,
intercomCompany
,
companyUser
.
getPhone
());
IntercomUtils
.
createIntercomUser
(
secUser
,
"Hiring Team"
,
intercomCompany
,
companyUser
.
getPhone
());
...
...
cmsWebApp/src/performa/intercom/utils/IntercomUtils.java
View file @
0088b858
package
performa
.
intercom
.
utils
;
package
performa
.
intercom
.
utils
;
import
static
java
.
lang
.
System
.
currentTimeMillis
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
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
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.rdbms.filters.EqualsFilter
;
import
oneit.objstore.rdbms.filters.EqualsFilter
;
import
oneit.objstore.rdbms.filters.InFilter
;
import
oneit.objstore.utils.ObjstoreUtils
;
import
oneit.security.SecUser
;
import
oneit.security.SecUser
;
import
oneit.utils.CollectionUtils
;
import
oneit.utils.ObjectTransform
;
import
oneit.utils.filter.CollectionFilter
;
import
oneit.utils.filter.CollectionFilter
;
import
oneit.utils.filter.Filter
;
import
oneit.utils.filter.Filter
;
import
performa.intercom.resources.Company
;
import
performa.intercom.resources.Company
;
import
performa.intercom.resources.CustomAttribute
;
import
performa.intercom.resources.CustomAttribute
;
import
performa.intercom.resources.Event
;
import
performa.intercom.resources.Intercom
;
import
performa.intercom.resources.Intercom
;
import
performa.intercom.resources.User
;
import
performa.intercom.resources.User
;
import
performa.orm.Job
;
import
performa.orm.Job
;
import
performa.orm.JobApplication
;
import
performa.orm.types.ApplicationStatus
;
import
performa.orm.types.JobStatus
;
import
performa.orm.types.JobStatus
;
import
performa.utils.Utils
;
import
performa.utils.Utils
;
...
@@ -103,22 +110,14 @@ public class IntercomUtils
...
@@ -103,22 +110,14 @@ public class IntercomUtils
}
}
public
static
Company
createIntercomCompany
(
performa
.
orm
.
Company
company
,
ObjectTransaction
transaction
)
public
static
Company
createIntercomCompany
(
performa
.
orm
.
Company
company
)
{
{
try
try
{
{
Company
intercomCompany
=
new
Company
();
Company
intercomCompany
=
new
Company
();
intercomCompany
.
setName
(
company
.
getCompanyName
());
setCompanyDetails
(
intercomCompany
,
company
);
intercomCompany
.
setCompanyID
(
company
.
getID
().
toString
());
Job
[]
jobs
=
Job
.
searchCompany
(
transaction
,
company
);
Filter
filter
=
Job
.
SearchByAll
().
andJobStatus
(
new
EqualsFilter
<>(
JobStatus
.
DRAFT
));
Collection
draftJobs
=
CollectionFilter
.
filter
(
Arrays
.
asList
(
jobs
),
filter
);
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"job-count"
,
jobs
!=
null
?
jobs
.
length
:
0
));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"draft-job-count"
,
draftJobs
.
size
()));
return
Company
.
create
(
intercomCompany
);
return
Company
.
create
(
intercomCompany
);
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
@@ -128,6 +127,55 @@ public class IntercomUtils
...
@@ -128,6 +127,55 @@ public class IntercomUtils
return
null
;
return
null
;
}
}
}
}
private
static
void
setCompanyDetails
(
Company
intercomCompany
,
performa
.
orm
.
Company
company
)
throws
StorageException
{
intercomCompany
.
setName
(
company
.
getCompanyName
());
intercomCompany
.
setCompanyID
(
company
.
getID
().
toString
());
// job related custom attributes
Job
[]
jobs
=
Job
.
searchCompany
(
company
.
getTransaction
(),
company
);
Filter
draftFilter
=
Job
.
SearchByAll
().
andJobStatus
(
new
EqualsFilter
<>(
JobStatus
.
DRAFT
));
Collection
draftJobs
=
CollectionFilter
.
filter
(
Arrays
.
asList
(
jobs
),
draftFilter
);
Filter
filledFilter
=
Job
.
SearchByAll
().
andJobStatus
(
new
EqualsFilter
<>(
JobStatus
.
FILLED
));
Collection
filledJobs
=
CollectionFilter
.
filter
(
Arrays
.
asList
(
jobs
),
filledFilter
);
Filter
openFilter
=
Job
.
SearchByAll
().
andJobStatus
(
new
EqualsFilter
<>(
JobStatus
.
OPEN
));
Collection
openJobs
=
CollectionFilter
.
filter
(
Arrays
.
asList
(
jobs
),
openFilter
);
Filter
closedFilter
=
Job
.
SearchByAll
().
andJobStatus
(
new
EqualsFilter
<>(
JobStatus
.
COMPLETE
));
Collection
closedJobs
=
CollectionFilter
.
filter
(
Arrays
.
asList
(
jobs
),
closedFilter
);
Filter
manuallyFilter
=
Job
.
SearchByAll
().
andIsManuallyClosed
(
new
EqualsFilter
<>(
Boolean
.
TRUE
));
Collection
manuallyClosed
=
CollectionFilter
.
filter
(
closedJobs
,
manuallyFilter
);
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"job-count"
,
jobs
!=
null
?
jobs
.
length
:
0
));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"draft-job-count"
,
draftJobs
.
size
()));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"filled_job_count"
,
filledJobs
.
size
()));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"open_job_count"
,
openJobs
.
size
()));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"manually_closed_job_count"
,
manuallyClosed
.
size
()));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"expired_job_count"
,
closedJobs
.
size
()
-
manuallyClosed
.
size
()));
// applicant related custom attributes
Filter
allApplicantFilter
=
JobApplication
.
SearchByAll
().
andApplicationStatus
(
new
InFilter
<>(
ApplicationStatus
.
SUBMITTED
,
ApplicationStatus
.
SHORTLISTED
,
ApplicationStatus
.
UNSUITABLE
));
Collection
applicants
=
Job
.
pipesJob
(
jobs
).
toJobApplications
(
allApplicantFilter
).
uniqueVals
();
Filter
shortlistedFilter
=
JobApplication
.
SearchByAll
().
andApplicationStatus
(
new
EqualsFilter
<>(
ApplicationStatus
.
SHORTLISTED
));
Collection
shortlistedApplicants
=
CollectionFilter
.
filter
(
applicants
,
shortlistedFilter
);
Filter
unsuitableFilter
=
JobApplication
.
SearchByAll
().
andApplicationStatus
(
new
EqualsFilter
<>(
ApplicationStatus
.
UNSUITABLE
));
Collection
unsuitableApplicants
=
CollectionFilter
.
filter
(
applicants
,
unsuitableFilter
);
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"total_applicants"
,
applicants
.
size
()));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"total_shortlisted"
,
shortlistedApplicants
.
size
()));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"total_unsuitable"
,
unsuitableApplicants
.
size
()));
List
<
Job
>
sortedJobs
=
ObjstoreUtils
.
sort
(
Arrays
.
asList
(
jobs
),
new
ObjectTransform
[]{
Job
.
pipesJob
().
toObjectCreated
()},
new
Comparator
[]{
CollectionUtils
.
reverse
(
CollectionUtils
.
DEFAULT_COMPARATOR
)});
if
(
sortedJobs
.
size
()
>
0
)
{
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newLongAttribute
(
"recent_job_created_at"
,
sortedJobs
.
get
(
0
).
getObjectCreated
().
getTime
()
/
1000
));
}
}
public
static
Company
findCompanyByID
(
performa
.
orm
.
Company
company
)
public
static
Company
findCompanyByID
(
performa
.
orm
.
Company
company
)
...
@@ -149,7 +197,7 @@ public class IntercomUtils
...
@@ -149,7 +197,7 @@ public class IntercomUtils
}
}
public
static
void
updateCompany
(
performa
.
orm
.
Company
company
,
ObjectTransaction
transaction
)
public
static
void
updateCompany
(
performa
.
orm
.
Company
company
)
{
{
try
try
{
{
...
@@ -157,18 +205,11 @@ public class IntercomUtils
...
@@ -157,18 +205,11 @@ public class IntercomUtils
if
(
intercomCompany
==
null
)
if
(
intercomCompany
==
null
)
{
{
createIntercomCompany
(
company
,
transaction
);
createIntercomCompany
(
company
);
}
}
else
else
{
{
intercomCompany
.
setName
(
company
.
getCompanyName
());
setCompanyDetails
(
intercomCompany
,
company
);
Job
[]
jobs
=
Job
.
searchCompany
(
transaction
,
company
);
Filter
filter
=
Job
.
SearchByAll
().
andJobStatus
(
new
EqualsFilter
<>(
JobStatus
.
DRAFT
));
Collection
draftJobs
=
CollectionFilter
.
filter
(
Arrays
.
asList
(
jobs
),
filter
);
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"job-count"
,
jobs
!=
null
?
jobs
.
length
:
0
));
intercomCompany
.
addCustomAttribute
(
CustomAttribute
.
newIntegerAttribute
(
"draft-job-count"
,
draftJobs
.
size
()));
Company
.
update
(
intercomCompany
);
Company
.
update
(
intercomCompany
);
}
}
...
@@ -181,13 +222,13 @@ public class IntercomUtils
...
@@ -181,13 +222,13 @@ public class IntercomUtils
}
}
public
static
Company
findOrCreateCompany
(
performa
.
orm
.
Company
company
,
ObjectTransaction
transaction
)
public
static
Company
findOrCreateCompany
(
performa
.
orm
.
Company
company
)
{
{
Company
intercomCompany
=
findCompanyByID
(
company
);
Company
intercomCompany
=
findCompanyByID
(
company
);
if
(
intercomCompany
==
null
)
if
(
intercomCompany
==
null
)
{
{
intercomCompany
=
createIntercomCompany
(
company
,
transaction
);
intercomCompany
=
createIntercomCompany
(
company
);
}
}
return
intercomCompany
;
return
intercomCompany
;
...
...
cmsWebApp/src/performa/orm/BaseJob.java
View file @
0088b858
...
@@ -59,6 +59,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -59,6 +59,7 @@ public abstract class BaseJob extends BaseBusinessClass
public
static
final
String
FIELD_City
=
"City"
;
public
static
final
String
FIELD_City
=
"City"
;
public
static
final
String
FIELD_State
=
"State"
;
public
static
final
String
FIELD_State
=
"State"
;
public
static
final
String
FIELD_Country
=
"Country"
;
public
static
final
String
FIELD_Country
=
"Country"
;
public
static
final
String
FIELD_IsManuallyClosed
=
"IsManuallyClosed"
;
public
static
final
String
FIELD_Email
=
"Email"
;
public
static
final
String
FIELD_Email
=
"Email"
;
public
static
final
String
FIELD_Password
=
"Password"
;
public
static
final
String
FIELD_Password
=
"Password"
;
public
static
final
String
FIELD_ConfirmPassword
=
"ConfirmPassword"
;
public
static
final
String
FIELD_ConfirmPassword
=
"ConfirmPassword"
;
...
@@ -109,6 +110,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -109,6 +110,7 @@ public abstract class BaseJob extends BaseBusinessClass
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_City
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_City
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
EnumeratedAttributeHelper
<
Job
,
State
>
HELPER_State
=
new
EnumeratedAttributeHelper
<
Job
,
State
>
(
State
.
FACTORY_State
);
private
static
final
EnumeratedAttributeHelper
<
Job
,
State
>
HELPER_State
=
new
EnumeratedAttributeHelper
<
Job
,
State
>
(
State
.
FACTORY_State
);
private
static
final
EnumeratedAttributeHelper
<
Job
,
Countries
>
HELPER_Country
=
new
EnumeratedAttributeHelper
<
Job
,
Countries
>
(
Countries
.
FACTORY_Countries
);
private
static
final
EnumeratedAttributeHelper
<
Job
,
Countries
>
HELPER_Country
=
new
EnumeratedAttributeHelper
<
Job
,
Countries
>
(
Countries
.
FACTORY_Countries
);
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_IsManuallyClosed
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_Email
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_Email
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_Password
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_Password
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_ConfirmPassword
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_ConfirmPassword
=
DefaultAttributeHelper
.
INSTANCE
;
...
@@ -140,6 +142,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -140,6 +142,7 @@ public abstract class BaseJob extends BaseBusinessClass
private
String
_City
;
private
String
_City
;
private
State
_State
;
private
State
_State
;
private
Countries
_Country
;
private
Countries
_Country
;
private
Boolean
_IsManuallyClosed
;
private
String
_Email
;
private
String
_Email
;
private
String
_Password
;
private
String
_Password
;
private
String
_ConfirmPassword
;
private
String
_ConfirmPassword
;
...
@@ -203,6 +206,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -203,6 +206,7 @@ public abstract class BaseJob extends BaseBusinessClass
private
static
final
AttributeValidator
[]
FIELD_City_Validators
;
private
static
final
AttributeValidator
[]
FIELD_City_Validators
;
private
static
final
AttributeValidator
[]
FIELD_State_Validators
;
private
static
final
AttributeValidator
[]
FIELD_State_Validators
;
private
static
final
AttributeValidator
[]
FIELD_Country_Validators
;
private
static
final
AttributeValidator
[]
FIELD_Country_Validators
;
private
static
final
AttributeValidator
[]
FIELD_IsManuallyClosed_Validators
;
// Arrays of behaviour decorators
// Arrays of behaviour decorators
...
@@ -258,6 +262,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -258,6 +262,7 @@ public abstract class BaseJob extends BaseBusinessClass
FIELD_City_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_City
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_City_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_City
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_State_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_State
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_State_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_State
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_Country_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_Country
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_Country_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_Country
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_IsManuallyClosed_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_IsManuallyClosed
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
REFERENCE_Job
.
initialiseReference
();
REFERENCE_Job
.
initialiseReference
();
...
@@ -931,6 +936,25 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -931,6 +936,25 @@ public abstract class BaseJob extends BaseBusinessClass
return
validators
;
return
validators
;
}
}
// Meta Info setup
private
static
List
setupAttribMetaData_IsManuallyClosed
(
Map
validatorMapping
)
{
Map
metaInfo
=
new
HashMap
();
metaInfo
.
put
(
"dbcol"
,
"manually_closed"
);
metaInfo
.
put
(
"defaultValue"
,
"Boolean.FALSE"
);
metaInfo
.
put
(
"name"
,
"IsManuallyClosed"
);
metaInfo
.
put
(
"type"
,
"Boolean"
);
LogMgr
.
log
(
BUSINESS_OBJECTS
,
LogLevel
.
DEBUG2
,
"Metadata for Job.IsManuallyClosed:"
,
metaInfo
);
ATTRIBUTES_METADATA_Job
.
put
(
FIELD_IsManuallyClosed
,
Collections
.
unmodifiableMap
(
metaInfo
));
List
validators
=
BaseBusinessClass
.
getAttribValidators
(
Job
.
class
,
"IsManuallyClosed"
,
metaInfo
,
validatorMapping
);
LogMgr
.
log
(
BUSINESS_OBJECTS
,
LogLevel
.
DEBUG1
,
"Validators for Job.IsManuallyClosed:"
,
validators
);
return
validators
;
}
// END OF STATIC METADATA DEFINITION
// END OF STATIC METADATA DEFINITION
...
@@ -973,6 +997,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -973,6 +997,7 @@ public abstract class BaseJob extends BaseBusinessClass
_City
=
(
String
)(
HELPER_City
.
initialise
(
_City
));
_City
=
(
String
)(
HELPER_City
.
initialise
(
_City
));
_State
=
(
State
)(
State
.
WA
);
_State
=
(
State
)(
State
.
WA
);
_Country
=
(
Countries
)(
Countries
.
AU
);
_Country
=
(
Countries
)(
Countries
.
AU
);
_IsManuallyClosed
=
(
Boolean
)(
Boolean
.
FALSE
);
_Email
=
(
String
)(
HELPER_Email
.
initialise
(
_Email
));
_Email
=
(
String
)(
HELPER_Email
.
initialise
(
_Email
));
_Password
=
(
String
)(
HELPER_Password
.
initialise
(
_Password
));
_Password
=
(
String
)(
HELPER_Password
.
initialise
(
_Password
));
_ConfirmPassword
=
(
String
)(
HELPER_ConfirmPassword
.
initialise
(
_ConfirmPassword
));
_ConfirmPassword
=
(
String
)(
HELPER_ConfirmPassword
.
initialise
(
_ConfirmPassword
));
...
@@ -2507,6 +2532,104 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -2507,6 +2532,104 @@ public abstract class BaseJob extends BaseBusinessClass
}
}
/**
/**
* Get the attribute IsManuallyClosed
*/
public
Boolean
getIsManuallyClosed
()
{
assertValid
();
Boolean
valToReturn
=
_IsManuallyClosed
;
for
(
JobBehaviourDecorator
bhd
:
Job_BehaviourDecorators
)
{
valToReturn
=
bhd
.
getIsManuallyClosed
((
Job
)
this
,
valToReturn
);
}
return
valToReturn
;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected
void
preIsManuallyClosedChange
(
Boolean
newIsManuallyClosed
)
throws
FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected
void
postIsManuallyClosedChange
()
throws
FieldException
{
}
public
FieldWriteability
getWriteability_IsManuallyClosed
()
{
return
getFieldWritabilityUtil
(
FieldWriteability
.
TRUE
);
}
/**
* Set the attribute IsManuallyClosed. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public
void
setIsManuallyClosed
(
Boolean
newIsManuallyClosed
)
throws
FieldException
{
boolean
oldAndNewIdentical
=
HELPER_IsManuallyClosed
.
compare
(
_IsManuallyClosed
,
newIsManuallyClosed
);
try
{
for
(
JobBehaviourDecorator
bhd
:
Job_BehaviourDecorators
)
{
newIsManuallyClosed
=
bhd
.
setIsManuallyClosed
((
Job
)
this
,
newIsManuallyClosed
);
oldAndNewIdentical
=
HELPER_IsManuallyClosed
.
compare
(
_IsManuallyClosed
,
newIsManuallyClosed
);
}
if
(
FIELD_IsManuallyClosed_Validators
.
length
>
0
)
{
Object
newIsManuallyClosedObj
=
HELPER_IsManuallyClosed
.
toObject
(
newIsManuallyClosed
);
if
(
newIsManuallyClosedObj
!=
null
)
{
int
loopMax
=
FIELD_IsManuallyClosed_Validators
.
length
;
Map
metadata
=
(
Map
)
ATTRIBUTES_METADATA_Job
.
get
(
FIELD_IsManuallyClosed
);
for
(
int
v
=
0
;
v
<
loopMax
;
++
v
)
{
FIELD_IsManuallyClosed_Validators
[
v
].
checkAttribute
(
this
,
FIELD_IsManuallyClosed
,
metadata
,
newIsManuallyClosedObj
);
}
}
}
}
catch
(
FieldException
e
)
{
if
(!
oldAndNewIdentical
)
{
e
.
setWouldModify
();
}
throw
e
;
}
if
(!
oldAndNewIdentical
)
{
assertValid
();
Debug
.
assertion
(
getWriteability_IsManuallyClosed
()
!=
FieldWriteability
.
FALSE
,
"Field IsManuallyClosed is not writeable"
);
preIsManuallyClosedChange
(
newIsManuallyClosed
);
markFieldChange
(
FIELD_IsManuallyClosed
);
_IsManuallyClosed
=
newIsManuallyClosed
;
postFieldChange
(
FIELD_IsManuallyClosed
);
postIsManuallyClosedChange
();
}
}
/**
* Get the attribute Email
* Get the attribute Email
*/
*/
public
String
getEmail
()
public
String
getEmail
()
...
@@ -5235,6 +5358,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5235,6 +5358,7 @@ public abstract class BaseJob extends BaseBusinessClass
tl_jobPSet
.
setAttrib
(
FIELD_City
,
HELPER_City
.
toObject
(
_City
));
//
tl_jobPSet
.
setAttrib
(
FIELD_City
,
HELPER_City
.
toObject
(
_City
));
//
tl_jobPSet
.
setAttrib
(
FIELD_State
,
HELPER_State
.
toObject
(
_State
));
//
tl_jobPSet
.
setAttrib
(
FIELD_State
,
HELPER_State
.
toObject
(
_State
));
//
tl_jobPSet
.
setAttrib
(
FIELD_Country
,
HELPER_Country
.
toObject
(
_Country
));
//
tl_jobPSet
.
setAttrib
(
FIELD_Country
,
HELPER_Country
.
toObject
(
_Country
));
//
tl_jobPSet
.
setAttrib
(
FIELD_IsManuallyClosed
,
HELPER_IsManuallyClosed
.
toObject
(
_IsManuallyClosed
));
//
_Level
.
getPersistentSets
(
allSets
);
_Level
.
getPersistentSets
(
allSets
);
_Client
.
getPersistentSets
(
allSets
);
_Client
.
getPersistentSets
(
allSets
);
_CompanyUser
.
getPersistentSets
(
allSets
);
_CompanyUser
.
getPersistentSets
(
allSets
);
...
@@ -5268,6 +5392,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5268,6 +5392,7 @@ public abstract class BaseJob extends BaseBusinessClass
_City
=
(
String
)(
HELPER_City
.
fromObject
(
_City
,
tl_jobPSet
.
getAttrib
(
FIELD_City
)));
//
_City
=
(
String
)(
HELPER_City
.
fromObject
(
_City
,
tl_jobPSet
.
getAttrib
(
FIELD_City
)));
//
_State
=
(
State
)(
HELPER_State
.
fromObject
(
_State
,
tl_jobPSet
.
getAttrib
(
FIELD_State
)));
//
_State
=
(
State
)(
HELPER_State
.
fromObject
(
_State
,
tl_jobPSet
.
getAttrib
(
FIELD_State
)));
//
_Country
=
(
Countries
)(
HELPER_Country
.
fromObject
(
_Country
,
tl_jobPSet
.
getAttrib
(
FIELD_Country
)));
//
_Country
=
(
Countries
)(
HELPER_Country
.
fromObject
(
_Country
,
tl_jobPSet
.
getAttrib
(
FIELD_Country
)));
//
_IsManuallyClosed
=
(
Boolean
)(
HELPER_IsManuallyClosed
.
fromObject
(
_IsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
FIELD_IsManuallyClosed
)));
//
_Level
.
setFromPersistentSets
(
objectID
,
allSets
);
_Level
.
setFromPersistentSets
(
objectID
,
allSets
);
_Client
.
setFromPersistentSets
(
objectID
,
allSets
);
_Client
.
setFromPersistentSets
(
objectID
,
allSets
);
_CompanyUser
.
setFromPersistentSets
(
objectID
,
allSets
);
_CompanyUser
.
setFromPersistentSets
(
objectID
,
allSets
);
...
@@ -5422,6 +5547,15 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5422,6 +5547,15 @@ public abstract class BaseJob extends BaseBusinessClass
e
.
addException
(
ex
);
e
.
addException
(
ex
);
}
}
try
{
setIsManuallyClosed
(
otherJob
.
getIsManuallyClosed
());
}
catch
(
FieldException
ex
)
{
e
.
addException
(
ex
);
}
}
}
}
}
...
@@ -5452,6 +5586,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5452,6 +5586,7 @@ public abstract class BaseJob extends BaseBusinessClass
_City
=
sourceJob
.
_City
;
_City
=
sourceJob
.
_City
;
_State
=
sourceJob
.
_State
;
_State
=
sourceJob
.
_State
;
_Country
=
sourceJob
.
_Country
;
_Country
=
sourceJob
.
_Country
;
_IsManuallyClosed
=
sourceJob
.
_IsManuallyClosed
;
_Email
=
sourceJob
.
_Email
;
_Email
=
sourceJob
.
_Email
;
_Password
=
sourceJob
.
_Password
;
_Password
=
sourceJob
.
_Password
;
_ConfirmPassword
=
sourceJob
.
_ConfirmPassword
;
_ConfirmPassword
=
sourceJob
.
_ConfirmPassword
;
...
@@ -5542,6 +5677,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5542,6 +5677,7 @@ public abstract class BaseJob extends BaseBusinessClass
_City
=
(
String
)(
HELPER_City
.
readExternal
(
_City
,
vals
.
get
(
FIELD_City
)));
//
_City
=
(
String
)(
HELPER_City
.
readExternal
(
_City
,
vals
.
get
(
FIELD_City
)));
//
_State
=
(
State
)(
HELPER_State
.
readExternal
(
_State
,
vals
.
get
(
FIELD_State
)));
//
_State
=
(
State
)(
HELPER_State
.
readExternal
(
_State
,
vals
.
get
(
FIELD_State
)));
//
_Country
=
(
Countries
)(
HELPER_Country
.
readExternal
(
_Country
,
vals
.
get
(
FIELD_Country
)));
//
_Country
=
(
Countries
)(
HELPER_Country
.
readExternal
(
_Country
,
vals
.
get
(
FIELD_Country
)));
//
_IsManuallyClosed
=
(
Boolean
)(
HELPER_IsManuallyClosed
.
readExternal
(
_IsManuallyClosed
,
vals
.
get
(
FIELD_IsManuallyClosed
)));
//
_Email
=
(
String
)(
HELPER_Email
.
readExternal
(
_Email
,
vals
.
get
(
FIELD_Email
)));
//
_Email
=
(
String
)(
HELPER_Email
.
readExternal
(
_Email
,
vals
.
get
(
FIELD_Email
)));
//
_Password
=
(
String
)(
HELPER_Password
.
readExternal
(
_Password
,
vals
.
get
(
FIELD_Password
)));
//
_Password
=
(
String
)(
HELPER_Password
.
readExternal
(
_Password
,
vals
.
get
(
FIELD_Password
)));
//
_ConfirmPassword
=
(
String
)(
HELPER_ConfirmPassword
.
readExternal
(
_ConfirmPassword
,
vals
.
get
(
FIELD_ConfirmPassword
)));
//
_ConfirmPassword
=
(
String
)(
HELPER_ConfirmPassword
.
readExternal
(
_ConfirmPassword
,
vals
.
get
(
FIELD_ConfirmPassword
)));
//
...
@@ -5591,6 +5727,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5591,6 +5727,7 @@ public abstract class BaseJob extends BaseBusinessClass
vals
.
put
(
FIELD_City
,
HELPER_City
.
writeExternal
(
_City
));
vals
.
put
(
FIELD_City
,
HELPER_City
.
writeExternal
(
_City
));
vals
.
put
(
FIELD_State
,
HELPER_State
.
writeExternal
(
_State
));
vals
.
put
(
FIELD_State
,
HELPER_State
.
writeExternal
(
_State
));
vals
.
put
(
FIELD_Country
,
HELPER_Country
.
writeExternal
(
_Country
));
vals
.
put
(
FIELD_Country
,
HELPER_Country
.
writeExternal
(
_Country
));
vals
.
put
(
FIELD_IsManuallyClosed
,
HELPER_IsManuallyClosed
.
writeExternal
(
_IsManuallyClosed
));
vals
.
put
(
FIELD_Email
,
HELPER_Email
.
writeExternal
(
_Email
));
vals
.
put
(
FIELD_Email
,
HELPER_Email
.
writeExternal
(
_Email
));
vals
.
put
(
FIELD_Password
,
HELPER_Password
.
writeExternal
(
_Password
));
vals
.
put
(
FIELD_Password
,
HELPER_Password
.
writeExternal
(
_Password
));
vals
.
put
(
FIELD_ConfirmPassword
,
HELPER_ConfirmPassword
.
writeExternal
(
_ConfirmPassword
));
vals
.
put
(
FIELD_ConfirmPassword
,
HELPER_ConfirmPassword
.
writeExternal
(
_ConfirmPassword
));
...
@@ -5687,6 +5824,10 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5687,6 +5824,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
{
listener
.
notifyFieldChange
(
this
,
other
,
FIELD_Country
,
HELPER_Country
.
toObject
(
this
.
_Country
),
HELPER_Country
.
toObject
(
otherJob
.
_Country
));
listener
.
notifyFieldChange
(
this
,
other
,
FIELD_Country
,
HELPER_Country
.
toObject
(
this
.
_Country
),
HELPER_Country
.
toObject
(
otherJob
.
_Country
));
}
}
if
(!
HELPER_IsManuallyClosed
.
compare
(
this
.
_IsManuallyClosed
,
otherJob
.
_IsManuallyClosed
))
{
listener
.
notifyFieldChange
(
this
,
other
,
FIELD_IsManuallyClosed
,
HELPER_IsManuallyClosed
.
toObject
(
this
.
_IsManuallyClosed
),
HELPER_IsManuallyClosed
.
toObject
(
otherJob
.
_IsManuallyClosed
));
}
// Compare single assocs
// Compare single assocs
_AssessmentTemplate
.
compare
(
otherJob
.
_AssessmentTemplate
,
listener
);
_AssessmentTemplate
.
compare
(
otherJob
.
_AssessmentTemplate
,
listener
);
...
@@ -5747,6 +5888,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5747,6 +5888,7 @@ public abstract class BaseJob extends BaseBusinessClass
visitor
.
visitField
(
this
,
FIELD_City
,
HELPER_City
.
toObject
(
getCity
()));
visitor
.
visitField
(
this
,
FIELD_City
,
HELPER_City
.
toObject
(
getCity
()));
visitor
.
visitField
(
this
,
FIELD_State
,
HELPER_State
.
toObject
(
getState
()));
visitor
.
visitField
(
this
,
FIELD_State
,
HELPER_State
.
toObject
(
getState
()));
visitor
.
visitField
(
this
,
FIELD_Country
,
HELPER_Country
.
toObject
(
getCountry
()));
visitor
.
visitField
(
this
,
FIELD_Country
,
HELPER_Country
.
toObject
(
getCountry
()));
visitor
.
visitField
(
this
,
FIELD_IsManuallyClosed
,
HELPER_IsManuallyClosed
.
toObject
(
getIsManuallyClosed
()));
visitor
.
visitAssociation
(
_AssessmentTemplate
);
visitor
.
visitAssociation
(
_AssessmentTemplate
);
visitor
.
visitAssociation
(
_CultureTemplate
);
visitor
.
visitAssociation
(
_CultureTemplate
);
visitor
.
visitAssociation
(
_JobTemplate
);
visitor
.
visitAssociation
(
_JobTemplate
);
...
@@ -5890,6 +6032,10 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -5890,6 +6032,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
{
return
filter
.
matches
(
getCountry
());
return
filter
.
matches
(
getCountry
());
}
}
else
if
(
attribName
.
equals
(
FIELD_IsManuallyClosed
))
{
return
filter
.
matches
(
getIsManuallyClosed
());
}
else
if
(
attribName
.
equals
(
SINGLEREFERENCE_Level
))
else
if
(
attribName
.
equals
(
SINGLEREFERENCE_Level
))
{
{
return
filter
.
matches
(
getLevel
());
return
filter
.
matches
(
getLevel
());
...
@@ -6027,6 +6173,12 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -6027,6 +6173,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
return
this
;
}
}
public
SearchAll
andIsManuallyClosed
(
QueryFilter
<
Boolean
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.manually_closed"
,
"IsManuallyClosed"
);
return
this
;
}
public
SearchAll
andLevel
(
QueryFilter
<
Level
>
filter
)
public
SearchAll
andLevel
(
QueryFilter
<
Level
>
filter
)
{
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
...
@@ -6204,6 +6356,12 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -6204,6 +6356,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
return
this
;
}
}
public
SearchJobKey
andIsManuallyClosed
(
QueryFilter
<
Boolean
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.manually_closed"
,
"IsManuallyClosed"
);
return
this
;
}
public
SearchJobKey
andLevel
(
QueryFilter
<
Level
>
filter
)
public
SearchJobKey
andLevel
(
QueryFilter
<
Level
>
filter
)
{
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
...
@@ -6375,6 +6533,12 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -6375,6 +6533,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
return
this
;
}
}
public
SearchCompany
andIsManuallyClosed
(
QueryFilter
<
Boolean
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.manually_closed"
,
"IsManuallyClosed"
);
return
this
;
}
public
SearchCompany
andLevel
(
QueryFilter
<
Level
>
filter
)
public
SearchCompany
andLevel
(
QueryFilter
<
Level
>
filter
)
{
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
...
@@ -6495,6 +6659,10 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -6495,6 +6659,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
{
return
HELPER_Country
.
toObject
(
getCountry
());
return
HELPER_Country
.
toObject
(
getCountry
());
}
}
else
if
(
attribName
.
equals
(
FIELD_IsManuallyClosed
))
{
return
HELPER_IsManuallyClosed
.
toObject
(
getIsManuallyClosed
());
}
else
if
(
attribName
.
equals
(
FIELD_Email
))
else
if
(
attribName
.
equals
(
FIELD_Email
))
{
{
return
HELPER_Email
.
toObject
(
getEmail
());
return
HELPER_Email
.
toObject
(
getEmail
());
...
@@ -6620,6 +6788,10 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -6620,6 +6788,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
{
return
HELPER_Country
;
return
HELPER_Country
;
}
}
else
if
(
attribName
.
equals
(
FIELD_IsManuallyClosed
))
{
return
HELPER_IsManuallyClosed
;
}
else
if
(
attribName
.
equals
(
FIELD_Email
))
else
if
(
attribName
.
equals
(
FIELD_Email
))
{
{
return
HELPER_Email
;
return
HELPER_Email
;
...
@@ -6745,6 +6917,10 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -6745,6 +6917,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
{
setCountry
((
Countries
)(
HELPER_Country
.
fromObject
(
_Country
,
attribValue
)));
setCountry
((
Countries
)(
HELPER_Country
.
fromObject
(
_Country
,
attribValue
)));
}
}
else
if
(
attribName
.
equals
(
FIELD_IsManuallyClosed
))
{
setIsManuallyClosed
((
Boolean
)(
HELPER_IsManuallyClosed
.
fromObject
(
_IsManuallyClosed
,
attribValue
)));
}
else
if
(
attribName
.
equals
(
FIELD_Email
))
else
if
(
attribName
.
equals
(
FIELD_Email
))
{
{
setEmail
((
String
)(
HELPER_Email
.
fromObject
(
_Email
,
attribValue
)));
setEmail
((
String
)(
HELPER_Email
.
fromObject
(
_Email
,
attribValue
)));
...
@@ -6877,6 +7053,10 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -6877,6 +7053,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
{
return
getWriteability_Country
();
return
getWriteability_Country
();
}
}
else
if
(
fieldName
.
equals
(
FIELD_IsManuallyClosed
))
{
return
getWriteability_IsManuallyClosed
();
}
else
if
(
fieldName
.
equals
(
MULTIPLEREFERENCE_JobApplications
))
else
if
(
fieldName
.
equals
(
MULTIPLEREFERENCE_JobApplications
))
{
{
return
getWriteability_JobApplications
();
return
getWriteability_JobApplications
();
...
@@ -7054,6 +7234,11 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -7054,6 +7234,11 @@ public abstract class BaseJob extends BaseBusinessClass
fields
.
add
(
FIELD_Country
);
fields
.
add
(
FIELD_Country
);
}
}
if
(
getWriteability_IsManuallyClosed
()
!=
FieldWriteability
.
TRUE
)
{
fields
.
add
(
FIELD_IsManuallyClosed
);
}
if
(
getWriteability_Email
()
!=
FieldWriteability
.
TRUE
)
if
(
getWriteability_Email
()
!=
FieldWriteability
.
TRUE
)
{
{
fields
.
add
(
FIELD_Email
);
fields
.
add
(
FIELD_Email
);
...
@@ -7143,6 +7328,7 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -7143,6 +7328,7 @@ public abstract class BaseJob extends BaseBusinessClass
result
.
add
(
HELPER_City
.
getAttribObject
(
getClass
(),
_City
,
false
,
FIELD_City
));
result
.
add
(
HELPER_City
.
getAttribObject
(
getClass
(),
_City
,
false
,
FIELD_City
));
result
.
add
(
HELPER_State
.
getAttribObject
(
getClass
(),
_State
,
false
,
FIELD_State
));
result
.
add
(
HELPER_State
.
getAttribObject
(
getClass
(),
_State
,
false
,
FIELD_State
));
result
.
add
(
HELPER_Country
.
getAttribObject
(
getClass
(),
_Country
,
false
,
FIELD_Country
));
result
.
add
(
HELPER_Country
.
getAttribObject
(
getClass
(),
_Country
,
false
,
FIELD_Country
));
result
.
add
(
HELPER_IsManuallyClosed
.
getAttribObject
(
getClass
(),
_IsManuallyClosed
,
false
,
FIELD_IsManuallyClosed
));
result
.
add
(
HELPER_Email
.
getAttribObject
(
getClass
(),
_Email
,
false
,
FIELD_Email
));
result
.
add
(
HELPER_Email
.
getAttribObject
(
getClass
(),
_Email
,
false
,
FIELD_Email
));
result
.
add
(
HELPER_Password
.
getAttribObject
(
getClass
(),
_Password
,
false
,
FIELD_Password
));
result
.
add
(
HELPER_Password
.
getAttribObject
(
getClass
(),
_Password
,
false
,
FIELD_Password
));
result
.
add
(
HELPER_ConfirmPassword
.
getAttribObject
(
getClass
(),
_ConfirmPassword
,
false
,
FIELD_ConfirmPassword
));
result
.
add
(
HELPER_ConfirmPassword
.
getAttribObject
(
getClass
(),
_ConfirmPassword
,
false
,
FIELD_ConfirmPassword
));
...
@@ -7477,6 +7663,24 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -7477,6 +7663,24 @@ public abstract class BaseJob extends BaseBusinessClass
}
}
/**
/**
* Get the attribute IsManuallyClosed
*/
public
Boolean
getIsManuallyClosed
(
Job
obj
,
Boolean
original
)
{
return
original
;
}
/**
* Change the value set for attribute IsManuallyClosed.
* May modify the field beforehand
* Occurs before validation.
*/
public
Boolean
setIsManuallyClosed
(
Job
obj
,
Boolean
newIsManuallyClosed
)
throws
FieldException
{
return
newIsManuallyClosed
;
}
/**
* Get the attribute Email
* Get the attribute Email
*/
*/
public
String
getEmail
(
Job
obj
,
String
original
)
public
String
getEmail
(
Job
obj
,
String
original
)
...
@@ -7898,6 +8102,10 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -7898,6 +8102,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
{
return
toCountry
();
return
toCountry
();
}
}
if
(
name
.
equals
(
"IsManuallyClosed"
))
{
return
toIsManuallyClosed
();
}
if
(
name
.
equals
(
"Level"
))
if
(
name
.
equals
(
"Level"
))
{
{
return
toLevel
();
return
toLevel
();
...
@@ -7975,6 +8183,8 @@ public abstract class BaseJob extends BaseBusinessClass
...
@@ -7975,6 +8183,8 @@ public abstract class BaseJob extends BaseBusinessClass
public
PipeLine
<
From
,
State
>
toState
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
State
>(
FIELD_State
));
}
public
PipeLine
<
From
,
State
>
toState
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
State
>(
FIELD_State
));
}
public
PipeLine
<
From
,
Countries
>
toCountry
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
Countries
>(
FIELD_Country
));
}
public
PipeLine
<
From
,
Countries
>
toCountry
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
Countries
>(
FIELD_Country
));
}
public
PipeLine
<
From
,
Boolean
>
toIsManuallyClosed
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
Boolean
>(
FIELD_IsManuallyClosed
));
}
public
AssessmentCriteriaTemplate
.
AssessmentCriteriaTemplatePipeLineFactory
<
From
,
AssessmentCriteriaTemplate
>
toAssessmentTemplate
()
{
return
toAssessmentTemplate
(
Filter
.
ALL
);
}
public
AssessmentCriteriaTemplate
.
AssessmentCriteriaTemplatePipeLineFactory
<
From
,
AssessmentCriteriaTemplate
>
toAssessmentTemplate
()
{
return
toAssessmentTemplate
(
Filter
.
ALL
);
}
public
AssessmentCriteriaTemplate
.
AssessmentCriteriaTemplatePipeLineFactory
<
From
,
AssessmentCriteriaTemplate
>
toAssessmentTemplate
(
Filter
<
AssessmentCriteriaTemplate
>
filter
)
public
AssessmentCriteriaTemplate
.
AssessmentCriteriaTemplatePipeLineFactory
<
From
,
AssessmentCriteriaTemplate
>
toAssessmentTemplate
(
Filter
<
AssessmentCriteriaTemplate
>
filter
)
...
...
cmsWebApp/src/performa/orm/Job.xml
View file @
0088b858
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
<ATTRIB
name=
"City"
type=
"String"
dbcol=
"city"
length=
"100"
/>
<ATTRIB
name=
"City"
type=
"String"
dbcol=
"city"
length=
"100"
/>
<ATTRIB
name=
"State"
type=
"State"
dbcol=
"state"
defaultValue=
"State.WA"
attribHelper=
"EnumeratedAttributeHelper"
/>
<ATTRIB
name=
"State"
type=
"State"
dbcol=
"state"
defaultValue=
"State.WA"
attribHelper=
"EnumeratedAttributeHelper"
/>
<ATTRIB
name=
"Country"
type=
"Countries"
dbcol=
"country"
defaultValue=
"Countries.AU"
attribHelper=
"EnumeratedAttributeHelper"
/>
<ATTRIB
name=
"Country"
type=
"Countries"
dbcol=
"country"
defaultValue=
"Countries.AU"
attribHelper=
"EnumeratedAttributeHelper"
/>
<ATTRIB
name=
"IsManuallyClosed"
type=
"Boolean"
dbcol=
"manually_closed"
defaultValue=
"Boolean.FALSE"
/>
<SINGLEREFERENCE
name=
"Level"
type=
"Level"
dbcol=
"level_id"
mandatory=
"false"
/>
<SINGLEREFERENCE
name=
"Level"
type=
"Level"
dbcol=
"level_id"
mandatory=
"false"
/>
<SINGLEREFERENCE
name=
"Client"
type=
"Client"
dbcol=
"client_id"
backreferenceName=
"Jobs"
/>
<SINGLEREFERENCE
name=
"Client"
type=
"Client"
dbcol=
"client_id"
backreferenceName=
"Jobs"
/>
...
...
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
View file @
0088b858
...
@@ -44,6 +44,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -44,6 +44,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
private
String
dummyCity
;
private
String
dummyCity
;
private
State
dummyState
;
private
State
dummyState
;
private
Countries
dummyCountry
;
private
Countries
dummyCountry
;
private
Boolean
dummyIsManuallyClosed
;
// Static constants corresponding to attribute helpers
// Static constants corresponding to attribute helpers
...
@@ -62,6 +63,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -62,6 +63,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
private
static
final
DefaultAttributeHelper
HELPER_City
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
HELPER_City
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
EnumeratedAttributeHelper
HELPER_State
=
new
EnumeratedAttributeHelper
(
State
.
FACTORY_State
);
private
static
final
EnumeratedAttributeHelper
HELPER_State
=
new
EnumeratedAttributeHelper
(
State
.
FACTORY_State
);
private
static
final
EnumeratedAttributeHelper
HELPER_Country
=
new
EnumeratedAttributeHelper
(
Countries
.
FACTORY_Countries
);
private
static
final
EnumeratedAttributeHelper
HELPER_Country
=
new
EnumeratedAttributeHelper
(
Countries
.
FACTORY_Countries
);
private
static
final
DefaultAttributeHelper
HELPER_IsManuallyClosed
=
DefaultAttributeHelper
.
INSTANCE
;
...
@@ -83,10 +85,11 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -83,10 +85,11 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
dummyCity
=
(
String
)(
HELPER_City
.
initialise
(
dummyCity
));
dummyCity
=
(
String
)(
HELPER_City
.
initialise
(
dummyCity
));
dummyState
=
(
State
)(
HELPER_State
.
initialise
(
dummyState
));
dummyState
=
(
State
)(
HELPER_State
.
initialise
(
dummyState
));
dummyCountry
=
(
Countries
)(
HELPER_Country
.
initialise
(
dummyCountry
));
dummyCountry
=
(
Countries
)(
HELPER_Country
.
initialise
(
dummyCountry
));
dummyIsManuallyClosed
=
(
Boolean
)(
HELPER_IsManuallyClosed
.
initialise
(
dummyIsManuallyClosed
));
}
}
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.state, {PREFIX}tl_job.country, {PREFIX}tl_job.level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.company_user_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.state, {PREFIX}tl_job.country, {PREFIX}tl_job.
manually_closed, {PREFIX}tl_job.
level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.company_user_id, {PREFIX}tl_job.shortened_url_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
...
@@ -152,6 +155,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -152,6 +155,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_City
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_City
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_State
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_State
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_Country
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_Country
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_IsManuallyClosed
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_Level
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_Level
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_Client
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_Client
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_CompanyUser
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_CompanyUser
)||
...
@@ -235,10 +239,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -235,10 +239,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
{
int
rowsUpdated
=
executeStatement
(
sqlMgr
,
int
rowsUpdated
=
executeStatement
(
sqlMgr
,
"UPDATE {PREFIX}tl_job "
+
"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 = ?, state = ?, country = ?, level_id = ? , client_id = ? , company_user_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 = ?, state = ?, country = ?,
manually_closed = ?,
level_id = ? , client_id = ? , company_user_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
())
+
" "
,
"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_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
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_CompanyUser
)))).
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_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
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_CompanyUser
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
)))).
listEntry
(
objectID
.
longID
()).
listEntry
(
obj
.
getObjectLastModified
()).
toList
().
toArray
());
if
(
rowsUpdated
!=
1
)
if
(
rowsUpdated
!=
1
)
{
{
...
@@ -619,6 +623,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -619,6 +623,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_City
,
HELPER_City
.
getFromRS
(
dummyCity
,
r
,
"city"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_City
,
HELPER_City
.
getFromRS
(
dummyCity
,
r
,
"city"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_State
,
HELPER_State
.
getFromRS
(
dummyState
,
r
,
"state"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_State
,
HELPER_State
.
getFromRS
(
dummyState
,
r
,
"state"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_Country
,
HELPER_Country
.
getFromRS
(
dummyCountry
,
r
,
"country"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_Country
,
HELPER_Country
.
getFromRS
(
dummyCountry
,
r
,
"country"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_IsManuallyClosed
,
HELPER_IsManuallyClosed
.
getFromRS
(
dummyIsManuallyClosed
,
r
,
"manually_closed"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_Level
,
r
.
getObject
(
"level_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_Level
,
r
.
getObject
(
"level_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_Client
,
r
.
getObject
(
"client_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_Client
,
r
.
getObject
(
"client_id"
));
...
@@ -640,10 +645,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
...
@@ -640,10 +645,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
{
executeStatement
(
sqlMgr
,
executeStatement
(
sqlMgr
,
"INSERT INTO {PREFIX}tl_job "
+
"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, state, country, level_id, client_id, company_user_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, state, country,
manually_closed,
level_id, client_id, company_user_id, shortened_url_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_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_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
)))
.
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_CompanyUser
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
))))
.
listEntry
(
objectID
.
longID
()).
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_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
)))
.
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
)))
.
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_CompanyUser
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
))))
.
listEntry
(
objectID
.
longID
()).
toList
().
toArray
());
tl_jobPSet
.
setStatus
(
PersistentSetStatus
.
PROCESSED
);
tl_jobPSet
.
setStatus
(
PersistentSetStatus
.
PROCESSED
);
}
}
...
...
cmsWebApp/webroot/extensions/performa/upgrades/20171030_Alter_Job.xml
0 → 100644
View file @
0088b858
<?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=
"manually_closed"
type=
"Boolean"
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