Skip to content

Instantly share code, notes, and snippets.

@MiraLak MiraLak/Application.java Secret
Created May 31, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.