Skip to content

Instantly share code, notes, and snippets.

@MiraLak
Created May 31, 2015 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MiraLak/1d2bf2d8e28bff7a3a98 to your computer and use it in GitHub Desktop.
Save MiraLak/1d2bf2d8e28bff7a3a98 to your computer and use it in GitHub Desktop.
Accelerometer to Cassandra REST Api
@Table
public class Acceleration {
@PrimaryKey
@NotNull
private UserTimestamp user_timestamp;
@Column
@NotNull
private Double x;
@Column
@NotNull
private Double y;
@Column
@NotNull
private Double z;
public Acceleration(AccelerartionModel accelerationModel) {
user_timestamp = new UserTimestamp();
user_timestamp.setUser_id("TEST_USER");
user_timestamp.setTimestamp(accelerationModel.getTimestamp());
x = accelerationModel.getX();
y = accelerationModel.getY();
z = accelerationModel.getZ();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment