Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4da7ac3d
authored
Jun 05, 2015
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add userId to placepojo (e.g. image is fetched with user and not eventuser id)
1 parent
7ff99530
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
code/moya-restpojo/src/main/java/fi/codecrew/moya/rest/pojo/map/v1/PlacePojo.java
code/moya-web/src/main/java/fi/codecrew/moya/rest/PojoUtils.java
code/moya-restpojo/src/main/java/fi/codecrew/moya/rest/pojo/map/v1/PlacePojo.java
View file @
4da7ac3
...
@@ -44,6 +44,7 @@ public class PlacePojo {
...
@@ -44,6 +44,7 @@ public class PlacePojo {
private
String
description
;
private
String
description
;
private
Integer
reserverId
;
private
Integer
reserverId
;
private
Integer
eventuserId
;
private
Integer
eventuserId
;
private
Integer
userId
;
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
...
@@ -182,4 +183,11 @@ public class PlacePojo {
...
@@ -182,4 +183,11 @@ public class PlacePojo {
this
.
eventuserId
=
eventuserId
;
this
.
eventuserId
=
eventuserId
;
}
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
}
}
code/moya-web/src/main/java/fi/codecrew/moya/rest/PojoUtils.java
View file @
4da7ac3
...
@@ -102,7 +102,9 @@ public class PojoUtils {
...
@@ -102,7 +102,9 @@ public class PojoUtils {
ret
.
setMapId
(
place
.
getMap
().
getId
());
ret
.
setMapId
(
place
.
getMap
().
getId
());
}
}
if
(
place
.
getPlaceReserver
()
!=
null
&&
place
.
getPlaceReserver
().
getUser
()
!=
null
)
{
if
(
place
.
getPlaceReserver
()
!=
null
&&
place
.
getPlaceReserver
().
getUser
()
!=
null
)
{
ret
.
setEventuserId
(
place
.
getPlaceReserver
().
getUser
().
getId
());
EventUser
eventUser
=
place
.
getPlaceReserver
().
getUser
();
ret
.
setEventuserId
(
eventUser
.
getId
());
ret
.
setUserId
(
eventUser
.
getUser
().
getId
());
}
}
return
ret
;
return
ret
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment