Last active
August 29, 2015 14:14
-
-
Save ldoguin/934d63c0d0f8d124c184 to your computer and use it in GitHub Desktop.
A twitter update Spring Document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.couchbase.advocacy.metrics.twitter; | |
import org.springframework.data.annotation.Id; | |
import org.springframework.data.couchbase.core.mapping.Document; | |
import org.springframework.data.couchbase.core.mapping.Field; | |
@Document(expiry = 0) | |
public class TwitterUpdate { | |
@Id | |
@Field("id") | |
private String key; | |
@Field | |
private long createdAt; | |
@Field | |
private final String type = "twitterUpdate"; | |
@Field | |
private String account; | |
@Field | |
private int followers; | |
@Field | |
private int favorites; | |
@Field | |
private int friends; | |
@Field | |
private int statuses; | |
public TwitterUpdate(String key, long createdAt, String account, int followers, int favorites, int friends, int statuses) { | |
this.key = key; | |
this.createdAt = createdAt; | |
this.account = account; | |
this.followers = followers; | |
this.favorites = favorites; | |
this.friends = friends; | |
this.statuses = statuses; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment