Mercurial > hg > Members > nobuyasu > Consensus
view app/Global.java @ 8:7b314898fddd
create action User.getUser()
author | one |
---|---|
date | Mon, 01 Oct 2012 19:53:43 +0900 |
parents | 2122c50278bd |
children | f3db6edc61ad |
line wrap: on
line source
import models.TPGraph; import com.tinkerpop.blueprints.Graph; import com.tinkerpop.blueprints.Vertex; import play.Application; import play.GlobalSettings; import play.Logger; public class Global extends GlobalSettings { @Override public void onStart(Application app) { TPGraph tpgraph = TPGraph.getInstance(); tpgraph.setPath(null); Graph graph = tpgraph.newGraph(); Vertex claimV = graph.addVertex(null); tpgraph.setClaimRootId(claimV.getId()); Vertex userV = graph.addVertex(null); tpgraph.setUserRootId(userV.getId()); } @Override public void onStop(Application app) { Logger.info("Application shutdown..."); } }