Skip to content

Instantly share code, notes, and snippets.

@thorwebdev
Created December 7, 2014 15:59
Show Gist options
  • Save thorwebdev/778b12fb116c36e3c08c to your computer and use it in GitHub Desktop.
Save thorwebdev/778b12fb116c36e3c08c to your computer and use it in GitHub Desktop.
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