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
fb28a68a
Commit
fb28a68a
authored
Sep 25, 2017
by
Harsh Shah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
System Repinned for Case Insensitive Comparator fix
parent
4f975674
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
Utils.java
cmsWebApp/src/performa/utils/Utils.java
+13
-13
system.xml
system.xml
+1
-1
No files found.
cmsWebApp/src/performa/utils/Utils.java
View file @
fb28a68a
...
@@ -103,7 +103,7 @@ public class Utils
...
@@ -103,7 +103,7 @@ public class Utils
public
static
List
<
Job
>
getJobsSorted
(
Job
[]
jobs
,
JobSortOption
jobSortOption
,
JobStatus
jobStatus
)
public
static
List
<
Job
>
getJobsSorted
(
Job
[]
jobs
,
JobSortOption
jobSortOption
,
JobStatus
jobStatus
)
{
{
ObjectTransform
transform
=
Job
.
pipesJob
().
toObjectCreated
();
ObjectTransform
transform
=
Job
.
pipesJob
().
toObjectCreated
();
Comparator
comparator
=
CollectionUtils
.
DEFAULT_COMPARATOR
;
Comparator
comparator
=
CollectionUtils
.
DEFAULT_COMPARATOR
_NULLS_FIRST
;
if
(
jobSortOption
==
JobSortOption
.
OLDEST
||
jobSortOption
==
JobSortOption
.
NEWEST
)
if
(
jobSortOption
==
JobSortOption
.
OLDEST
||
jobSortOption
==
JobSortOption
.
NEWEST
)
{
{
...
@@ -121,8 +121,8 @@ public class Utils
...
@@ -121,8 +121,8 @@ public class Utils
}
}
comparator
=
jobSortOption
==
JobSortOption
.
OLDEST
?
comparator
=
jobSortOption
==
JobSortOption
.
OLDEST
?
CollectionUtils
.
DEFAULT_COMPARATOR
:
CollectionUtils
.
DEFAULT_COMPARATOR
_NULLS_FIRST
:
CollectionUtils
.
reverse
(
CollectionUtils
.
DEFAULT_COMPARATOR
);
CollectionUtils
.
reverse
(
CollectionUtils
.
DEFAULT_COMPARATOR
_NULLS_FIRST
);
}
}
else
if
(
jobSortOption
==
JobSortOption
.
CLOSING_SOON
)
else
if
(
jobSortOption
==
JobSortOption
.
CLOSING_SOON
)
{
{
...
@@ -132,12 +132,12 @@ public class Utils
...
@@ -132,12 +132,12 @@ public class Utils
else
if
(
jobSortOption
==
JobSortOption
.
ALPHA_A_Z
)
else
if
(
jobSortOption
==
JobSortOption
.
ALPHA_A_Z
)
{
{
transform
=
Job
.
pipesJob
().
toJobTitle
();
transform
=
Job
.
pipesJob
().
toJobTitle
();
comparator
=
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
;
comparator
=
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
_NULLS_FIRST
;
}
}
else
if
(
jobSortOption
==
JobSortOption
.
ALPHA_Z_A
)
else
if
(
jobSortOption
==
JobSortOption
.
ALPHA_Z_A
)
{
{
transform
=
Job
.
pipesJob
().
toJobTitle
();
transform
=
Job
.
pipesJob
().
toJobTitle
();
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
);
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
_NULLS_FIRST
);
}
}
return
ObjstoreUtils
.
sort
(
Arrays
.
asList
(
jobs
),
return
ObjstoreUtils
.
sort
(
Arrays
.
asList
(
jobs
),
...
@@ -149,27 +149,27 @@ public class Utils
...
@@ -149,27 +149,27 @@ public class Utils
public
static
List
<
Client
>
getClientsSorted
(
Client
[]
clients
,
ClientSortOption
clientSortOption
)
public
static
List
<
Client
>
getClientsSorted
(
Client
[]
clients
,
ClientSortOption
clientSortOption
)
{
{
ObjectTransform
transform
=
Client
.
pipesClient
().
toObjectCreated
();
ObjectTransform
transform
=
Client
.
pipesClient
().
toObjectCreated
();
Comparator
comparator
=
CollectionUtils
.
DEFAULT_COMPARATOR
;
Comparator
comparator
=
CollectionUtils
.
DEFAULT_COMPARATOR
_NULLS_FIRST
;
if
(
clientSortOption
==
ClientSortOption
.
ALPHA_A_Z
)
if
(
clientSortOption
==
ClientSortOption
.
ALPHA_A_Z
)
{
{
transform
=
Client
.
pipesClient
().
toClientName
();
transform
=
Client
.
pipesClient
().
toClientName
();
comparator
=
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
;
comparator
=
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
_NULLS_FIRST
;
}
}
else
if
(
clientSortOption
==
ClientSortOption
.
ALPHA_Z_A
)
else
if
(
clientSortOption
==
ClientSortOption
.
ALPHA_Z_A
)
{
{
transform
=
Client
.
pipesClient
().
toClientName
();
transform
=
Client
.
pipesClient
().
toClientName
();
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
);
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
_NULLS_FIRST
);
}
}
else
if
(
clientSortOption
==
ClientSortOption
.
OPEN_JOBS
)
else
if
(
clientSortOption
==
ClientSortOption
.
OPEN_JOBS
)
{
{
transform
=
new
ClientJobCountTransform
(
JobStatus
.
OPEN
);
transform
=
new
ClientJobCountTransform
(
JobStatus
.
OPEN
);
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
DEFAULT_COMPARATOR
);
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
DEFAULT_COMPARATOR
_NULLS_FIRST
);
}
}
else
if
(
clientSortOption
==
ClientSortOption
.
FILLED_JOBS
)
else
if
(
clientSortOption
==
ClientSortOption
.
FILLED_JOBS
)
{
{
transform
=
new
ClientJobCountTransform
(
JobStatus
.
FILLED
);
transform
=
new
ClientJobCountTransform
(
JobStatus
.
FILLED
);
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
DEFAULT_COMPARATOR
);
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
DEFAULT_COMPARATOR
_NULLS_FIRST
);
}
}
return
ObjstoreUtils
.
sort
(
Arrays
.
asList
(
clients
),
new
ObjectTransform
[]{
transform
},
new
Comparator
[]{
comparator
});
return
ObjstoreUtils
.
sort
(
Arrays
.
asList
(
clients
),
new
ObjectTransform
[]{
transform
},
new
Comparator
[]{
comparator
});
...
@@ -216,7 +216,7 @@ public class Utils
...
@@ -216,7 +216,7 @@ public class Utils
public
static
List
<
JobApplication
>
getApplicationsSorted
(
JobApplication
[]
applications
,
AppSortOption
appSortOption
)
public
static
List
<
JobApplication
>
getApplicationsSorted
(
JobApplication
[]
applications
,
AppSortOption
appSortOption
)
{
{
ObjectTransform
transform
=
JobApplication
.
pipesJobApplication
().
toObjectCreated
();
ObjectTransform
transform
=
JobApplication
.
pipesJobApplication
().
toObjectCreated
();
Comparator
comparator
=
CollectionUtils
.
DEFAULT_COMPARATOR
;
Comparator
comparator
=
CollectionUtils
.
DEFAULT_COMPARATOR
_NULLS_FIRST
;
if
(
appSortOption
==
AppSortOption
.
OLDEST
)
if
(
appSortOption
==
AppSortOption
.
OLDEST
)
{
{
...
@@ -236,12 +236,12 @@ public class Utils
...
@@ -236,12 +236,12 @@ public class Utils
else
if
(
appSortOption
==
AppSortOption
.
ALPHA_A_Z
)
else
if
(
appSortOption
==
AppSortOption
.
ALPHA_A_Z
)
{
{
transform
=
JobApplication
.
pipesJobApplication
().
toCandidate
().
toUser
().
toFirstName
();
transform
=
JobApplication
.
pipesJobApplication
().
toCandidate
().
toUser
().
toFirstName
();
comparator
=
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
;
comparator
=
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
_NULLS_FIRST
;
}
}
else
if
(
appSortOption
==
AppSortOption
.
ALPHA_Z_A
)
else
if
(
appSortOption
==
AppSortOption
.
ALPHA_Z_A
)
{
{
transform
=
JobApplication
.
pipesJobApplication
().
toCandidate
().
toUser
().
toFirstName
();
transform
=
JobApplication
.
pipesJobApplication
().
toCandidate
().
toUser
().
toFirstName
();
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
);
comparator
=
CollectionUtils
.
reverse
(
CollectionUtils
.
CASE_INSENSITIVE_COMPARATOR
_NULLS_FIRST
);
}
}
return
ObjstoreUtils
.
sort
(
Arrays
.
asList
(
applications
),
return
ObjstoreUtils
.
sort
(
Arrays
.
asList
(
applications
),
...
...
system.xml
View file @
fb28a68a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<SYSTEM
name=
"PerformaInvestments"
targetDir=
"C:/build/PerformaInvestments"
executor=
"testMainApp"
>
<SYSTEM
name=
"PerformaInvestments"
targetDir=
"C:/build/PerformaInvestments"
executor=
"testMainApp"
>
<WEBAPP
name=
"cmsWebApp"
relative-path=
"cmsWebApp"
deployment=
"cms"
>
<WEBAPP
name=
"cmsWebApp"
relative-path=
"cmsWebApp"
deployment=
"cms"
>
<OVERLAY
system=
"CougarCMS8.2"
subsystem=
"cmsWebApp"
pin=
"
3c1d38dc38c69786b3a4a45553f309aa57cd2836
"
/>
<OVERLAY
system=
"CougarCMS8.2"
subsystem=
"cmsWebApp"
pin=
"
2bb1972b665029a5167e3d25f5197c79c206a899
"
/>
</WEBAPP>
</WEBAPP>
<PARAMETER
name=
"key.file"
/>
<PARAMETER
name=
"key.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