Mercurial > hg > Members > nobuyasu > Consensus
diff app/models/UserModel.java @ 8:7b314898fddd
create action User.getUser()
author | one |
---|---|
date | Mon, 01 Oct 2012 19:53:43 +0900 |
parents | 2122c50278bd |
children | d050b7fb4cda |
line wrap: on
line diff
--- a/app/models/UserModel.java Mon Oct 01 18:51:30 2012 +0900 +++ b/app/models/UserModel.java Mon Oct 01 19:53:43 2012 +0900 @@ -1,20 +1,44 @@ package models; +import java.util.HashMap; + import com.tinkerpop.blueprints.Vertex; public class UserModel extends NodeModel { - + protected final String CONSENSUS = "consensus"; + protected final String CLAIMS = "claims"; + protected final String REQUESTS = "requests"; + + protected HashMap<Object,Object> properties = new HashMap<Object,Object>(); public UserModel(Vertex vertex) { super(vertex); } + + public void setUserInfo() { + this.vertex.setProperty(CONSENSUS, ""); + this.vertex.setProperty(CLAIMS, ""); + this.vertex.setProperty(REQUESTS, ""); + } + + + public HashMap<Object,Object> getUserProperty() { + for (String key : vertex.getPropertyKeys()) { + properties.put(key, vertex.getProperty(key)); + } + return properties; + } + + + +/* public Vertex setName(String name) { this.vertex.setProperty(NAME, name); return vertex; } - +*/