Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
For the sake of convenience we’re only storing the fences’ vertices and some metadata. To send and receive data through our endpoints we need an object model which we create in a little Java Bean called MyFence.java.
package com.google.appengine.geo.fencing;
/** The object model for the data we are sending through endpoints */
public class MyFence {
private long id = -1;
public String name;
public String entityGroup;
public String description;
public double[][] vertices;
public MyFence() {};
public MyFence(long id, String name, String entityGroup, String description, double[][] vertices) {
this.id = id;
this.name = name;
this.entityGroup = entityGroup;
this.description = description;
this.vertices = vertices;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEntityGroup() {
return entityGroup;
}
public void setEntityGroup(String entityGroup) {
this.entityGroup = entityGroup;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public double[][] getVertices() {
return vertices;
}
public void setVertices(double[][] vertices) {
this.vertices = vertices;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.