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
47582db0
Commit
47582db0
authored
Nov 12, 2016
by
Abzal Kultayev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TASK #CMER] Рефакторинг АПИ метода
parent
0fb507c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/main/java/kz/arta/synergy/api/asforms/AsFormService.java
src/main/java/kz/arta/synergy/api/asforms/AsFormService.java
+13
-0
No files found.
src/main/java/kz/arta/synergy/api/asforms/AsFormService.java
View file @
47582db0
...
...
@@ -65,6 +65,19 @@ public class AsFormService {
));
}
public
AdvancedSearchResult
advancedSearchOne
(
String
formID
,
String
field
,
String
value
)
throws
IOException
{
List
<
AdvancedSearchResult
>
result
=
advancedSearch
(
formID
,
field
,
value
);
if
(
result
.
size
()
==
0
)
{
throw
new
IllegalStateException
(
"Запись не найдена"
);
}
if
(
result
.
size
()
>
1
)
{
throw
new
IllegalStateException
(
"Найдены несколько записей по условию"
);
}
return
result
.
get
(
0
);
}
public
<
T
extends
AsForm
>
T
getData
(
Class
<
T
>
formClass
,
String
dataUUID
)
throws
IOException
{
return
asFormConverter
.
toAsForm
(
formClass
,
getData
(
dataUUID
));
}
...
...
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