Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 f6d2ee1a
authored
Nov 09, 2014
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
... add missing file
1 parent
ed593358
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
0 deletions
code/moya-web/src/main/java/fi/codecrew/moya/rest/pojo/placemap/PlacemapMapRootPojo.java
code/moya-web/src/main/java/fi/codecrew/moya/rest/pojo/placemap/PlacemapMapRootPojo.java
0 → 100644
View file @
f6d2ee1
package
fi
.
codecrew
.
moya
.
rest
.
pojo
.
placemap
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
fi.codecrew.moya.model.EventMap
;
import
fi.codecrew.moya.model.Product
;
import
fi.codecrew.moya.rest.pojo.ProductRestPojo
;
@XmlRootElement
public
class
PlacemapMapRootPojo
{
private
MapPojo
map
;
private
List
<
ProductRestPojo
>
products
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PlacemapMapRootPojo
.
class
);
public
PlacemapMapRootPojo
()
{
}
public
static
class
MapPojo
{
private
EventMap
map
;
public
MapPojo
()
{
}
public
MapPojo
(
EventMap
map2
)
{
this
.
map
=
map2
;
}
@XmlElement
(
name
=
"name"
)
public
String
getName
()
{
return
map
.
getName
();
}
@XmlElement
(
name
=
"id"
)
public
Integer
getId
()
{
return
map
.
getId
();
}
@XmlElement
(
name
=
"width"
)
public
Integer
getWidth
()
{
return
map
.
getWidth
();
}
@XmlElement
(
name
=
"height"
)
public
Integer
getHeight
()
{
return
map
.
getHeight
();
}
}
public
List
<
ProductRestPojo
>
getProducts
()
{
return
products
;
}
public
void
setProducts
(
List
<
ProductRestPojo
>
products
)
{
this
.
products
=
products
;
}
public
void
setMap
(
EventMap
map2
)
{
logger
.
info
(
"Adding map {} to placemapMap"
,
map2
);
map
=
new
MapPojo
(
map2
);
}
public
void
setRawProducts
(
List
<
Product
>
mapProducts
)
{
products
=
new
ArrayList
<>();
for
(
Product
p
:
mapProducts
)
{
logger
.
warn
(
"Adding product {}"
,
p
);
products
.
add
(
new
ProductRestPojo
(
p
));
}
}
public
MapPojo
getMap
()
{
return
map
;
}
public
void
setMap
(
MapPojo
map
)
{
this
.
map
=
map
;
}
}
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