Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
synergy-api-util
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Raimbek Egemberdiev
synergy-api-util
Commits
0b50b254
Commit
0b50b254
authored
Jan 26, 2017
by
Raimbek Egemberdiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added new client classes
parent
f202a598
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
2 deletions
+97
-2
src/main/java/kz/arta/synergy/api/pojo/SynergyDepartment.java
...main/java/kz/arta/synergy/api/pojo/SynergyDepartment.java
+32
-0
src/main/java/kz/arta/synergy/api/pojo/SynergyManager.java
src/main/java/kz/arta/synergy/api/pojo/SynergyManager.java
+25
-0
src/main/java/kz/arta/synergy/api/pojo/SynergyPosition.java
src/main/java/kz/arta/synergy/api/pojo/SynergyPosition.java
+38
-0
src/main/java/kz/arta/synergy/api/services/UserChooserService.java
...java/kz/arta/synergy/api/services/UserChooserService.java
+2
-2
No files found.
src/main/java/kz/arta/synergy/api/pojo/SynergyDepartment.java
View file @
0b50b254
...
@@ -84,4 +84,36 @@ public class SynergyDepartment {
...
@@ -84,4 +84,36 @@ public class SynergyDepartment {
public
void
setNumber
(
String
number
)
{
public
void
setNumber
(
String
number
)
{
this
.
number
=
number
;
this
.
number
=
number
;
}
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SynergyDepartment
that
=
(
SynergyDepartment
)
o
;
if
(
departmentID
!=
null
?
!
departmentID
.
equals
(
that
.
departmentID
)
:
that
.
departmentID
!=
null
)
return
false
;
if
(
parentDepartmentID
!=
null
?
!
parentDepartmentID
.
equals
(
that
.
parentDepartmentID
)
:
that
.
parentDepartmentID
!=
null
)
return
false
;
if
(
nameRu
!=
null
?
!
nameRu
.
equals
(
that
.
nameRu
)
:
that
.
nameRu
!=
null
)
return
false
;
if
(
nameKz
!=
null
?
!
nameKz
.
equals
(
that
.
nameKz
)
:
that
.
nameKz
!=
null
)
return
false
;
if
(
nameEn
!=
null
?
!
nameEn
.
equals
(
that
.
nameEn
)
:
that
.
nameEn
!=
null
)
return
false
;
if
(
pointersCode
!=
null
?
!
pointersCode
.
equals
(
that
.
pointersCode
)
:
that
.
pointersCode
!=
null
)
return
false
;
if
(
number
!=
null
?
!
number
.
equals
(
that
.
number
)
:
that
.
number
!=
null
)
return
false
;
return
!(
manager
!=
null
?
!
manager
.
equals
(
that
.
manager
)
:
that
.
manager
!=
null
);
}
@Override
public
int
hashCode
()
{
int
result
=
departmentID
!=
null
?
departmentID
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
parentDepartmentID
!=
null
?
parentDepartmentID
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameRu
!=
null
?
nameRu
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameKz
!=
null
?
nameKz
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameEn
!=
null
?
nameEn
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
pointersCode
!=
null
?
pointersCode
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
number
!=
null
?
number
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
manager
!=
null
?
manager
.
hashCode
()
:
0
);
return
result
;
}
}
}
src/main/java/kz/arta/synergy/api/pojo/SynergyManager.java
View file @
0b50b254
...
@@ -53,4 +53,29 @@ public class SynergyManager {
...
@@ -53,4 +53,29 @@ public class SynergyManager {
public
void
setPointersCode
(
String
pointersCode
)
{
public
void
setPointersCode
(
String
pointersCode
)
{
this
.
pointersCode
=
pointersCode
;
this
.
pointersCode
=
pointersCode
;
}
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SynergyManager
that
=
(
SynergyManager
)
o
;
if
(
positionId
!=
null
?
!
positionId
.
equals
(
that
.
positionId
)
:
that
.
positionId
!=
null
)
return
false
;
if
(
nameRu
!=
null
?
!
nameRu
.
equals
(
that
.
nameRu
)
:
that
.
nameRu
!=
null
)
return
false
;
if
(
nameKz
!=
null
?
!
nameKz
.
equals
(
that
.
nameKz
)
:
that
.
nameKz
!=
null
)
return
false
;
if
(
nameEn
!=
null
?
!
nameEn
.
equals
(
that
.
nameEn
)
:
that
.
nameEn
!=
null
)
return
false
;
return
!(
pointersCode
!=
null
?
!
pointersCode
.
equals
(
that
.
pointersCode
)
:
that
.
pointersCode
!=
null
);
}
@Override
public
int
hashCode
()
{
int
result
=
positionId
!=
null
?
positionId
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
nameRu
!=
null
?
nameRu
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameKz
!=
null
?
nameKz
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameEn
!=
null
?
nameEn
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
pointersCode
!=
null
?
pointersCode
.
hashCode
()
:
0
);
return
result
;
}
}
}
src/main/java/kz/arta/synergy/api/pojo/SynergyPosition.java
View file @
0b50b254
...
@@ -110,4 +110,42 @@ public class SynergyPosition {
...
@@ -110,4 +110,42 @@ public class SynergyPosition {
public
void
setPositionType
(
String
positionType
)
{
public
void
setPositionType
(
String
positionType
)
{
this
.
positionType
=
positionType
;
this
.
positionType
=
positionType
;
}
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SynergyPosition
that
=
(
SynergyPosition
)
o
;
if
(
positionID
!=
null
?
!
positionID
.
equals
(
that
.
positionID
)
:
that
.
positionID
!=
null
)
return
false
;
if
(
departmentID
!=
null
?
!
departmentID
.
equals
(
that
.
departmentID
)
:
that
.
departmentID
!=
null
)
return
false
;
if
(
nameRu
!=
null
?
!
nameRu
.
equals
(
that
.
nameRu
)
:
that
.
nameRu
!=
null
)
return
false
;
if
(
nameKz
!=
null
?
!
nameKz
.
equals
(
that
.
nameKz
)
:
that
.
nameKz
!=
null
)
return
false
;
if
(
nameEn
!=
null
?
!
nameEn
.
equals
(
that
.
nameEn
)
:
that
.
nameEn
!=
null
)
return
false
;
if
(
parentDepartmentID
!=
null
?
!
parentDepartmentID
.
equals
(
that
.
parentDepartmentID
)
:
that
.
parentDepartmentID
!=
null
)
return
false
;
if
(
pointersCode
!=
null
?
!
pointersCode
.
equals
(
that
.
pointersCode
)
:
that
.
pointersCode
!=
null
)
return
false
;
if
(
number
!=
null
?
!
number
.
equals
(
that
.
number
)
:
that
.
number
!=
null
)
return
false
;
if
(
salary
!=
null
?
!
salary
.
equals
(
that
.
salary
)
:
that
.
salary
!=
null
)
return
false
;
if
(
vacancies
!=
null
?
!
vacancies
.
equals
(
that
.
vacancies
)
:
that
.
vacancies
!=
null
)
return
false
;
return
!(
positionType
!=
null
?
!
positionType
.
equals
(
that
.
positionType
)
:
that
.
positionType
!=
null
);
}
@Override
public
int
hashCode
()
{
int
result
=
positionID
!=
null
?
positionID
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
departmentID
!=
null
?
departmentID
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameRu
!=
null
?
nameRu
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameKz
!=
null
?
nameKz
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
nameEn
!=
null
?
nameEn
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
parentDepartmentID
!=
null
?
parentDepartmentID
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
pointersCode
!=
null
?
pointersCode
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
number
!=
null
?
number
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
salary
!=
null
?
salary
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
vacancies
!=
null
?
vacancies
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
positionType
!=
null
?
positionType
.
hashCode
()
:
0
);
return
result
;
}
}
}
src/main/java/kz/arta/synergy/api/services/UserChooserService.java
View file @
0b50b254
...
@@ -51,7 +51,7 @@ public class UserChooserService {
...
@@ -51,7 +51,7 @@ public class UserChooserService {
.
url
(
"/rest/api/userchooser/search"
)
.
url
(
"/rest/api/userchooser/search"
)
.
queryParam
(
"search"
,
search
)
.
queryParam
(
"search"
,
search
)
.
queryParam
(
"showAll"
,
true
)
.
queryParam
(
"showAll"
,
true
)
.
queryParam
(
"recordsCount"
,
100
);
.
queryParam
(
"recordsCount"
,
100
00
);
String
result
=
restHttpQuery
.
doQuery
(
query
);
String
result
=
restHttpQuery
.
doQuery
(
query
);
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
User
>>()
{});
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
User
>>()
{});
}
}
...
@@ -62,7 +62,7 @@ public class UserChooserService {
...
@@ -62,7 +62,7 @@ public class UserChooserService {
.
queryParam
(
"search"
,
search
)
.
queryParam
(
"search"
,
search
)
.
queryParam
(
"showAll"
,
true
)
.
queryParam
(
"showAll"
,
true
)
.
queryParam
(
"showNoPosition"
,
true
)
.
queryParam
(
"showNoPosition"
,
true
)
.
queryParam
(
"recordsCount"
,
100
);
.
queryParam
(
"recordsCount"
,
100
00
);
String
result
=
restHttpQuery
.
doQuery
(
query
);
String
result
=
restHttpQuery
.
doQuery
(
query
);
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
SearchExtUser
>>()
{});
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
SearchExtUser
>>()
{});
}
}
...
...
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