Package com.netflix.paas.json

Examples of com.netflix.paas.json.JsonObject


    @POST
    @Path("{db}/{table}")
    @Consumes(MediaType.TEXT_PLAIN)
    public void updateRow(@PathParam("db") String db,
            @PathParam("table") String table, String rowObject) {
        metadao.writeRow(db, table, new JsonObject(rowObject));
        // TODO Auto-generated method stub
    }
View Full Code Here


    }
    private String convertResultSet(ResultSet rs) {
        // TODO Auto-generated method stub
        String colStr = "";
        String rowStr = "";
        JsonObject response = new JsonObject();
        List<Row> rows = rs.all();
        if (!rows.isEmpty() && rows.size()==1) {
            rowStr = rows.get(0).toString();
        }
        ColumnDefinitions colDefs = rs.getColumnDefinitions();
        colStr = colDefs.toString();
        response.putString("columns", colStr.substring(8,colStr.length()-1));
        response.putString("values", rowStr.substring(4,rowStr.length()-1));
        return response.toString();
       
//        for (Row ro:rows) {
//            Print(ro.toString());
////            ro.getColumnDefinitions()
//        }
View Full Code Here

    @Override
    public void createSchema(String payLoad) {
        // TODO Auto-generated method stub
        if (payLoad!=null) {
            JsonObject jsonPayLoad =  new JsonObject(payLoad);
            PaasDBEntity pdbe = PaasDBEntity.builder().withJsonPayLoad(jsonPayLoad).build();
            metadao.writeMetaEntity(pdbe);
//            Dao<DbEntity> dbDao = provider.getDao("configuration", DbEntity.class);
//            DbEntity dbe = DbEntity.builder().withName(schema.getString("name")).build();
//            boolean exists = dbDao.isExists();
View Full Code Here

    @Override
    public void createTable(@PathParam("schema") String schemaName, String payLoad) {
        // TODO Auto-generated method stub
        if (payLoad!=null) {
            JsonObject jsonPayLoad =  new JsonObject(payLoad);
            PaasTableEntity ptbe = PaasTableEntity.builder().withJsonPayLoad(jsonPayLoad, schemaName).build();
            metadao.writeMetaEntity(ptbe);
            //create new ks
            //create new cf
        }      
View Full Code Here

TOP

Related Classes of com.netflix.paas.json.JsonObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.