Package com.google.apphosting.api.DatastorePb

Examples of com.google.apphosting.api.DatastorePb.Schema


        GetSchemaRequest req = new GetSchemaRequest();
        req.setApp(ApiProxy.getCurrentEnvironment().getAppId());
        byte[] resBuf =
            ApiProxy.makeSyncCall(DATASTORE_SERVICE, GET_SCHEMA_METHOD, req
                .toByteArray());
        Schema schema = new Schema();
        schema.mergeFrom(resBuf);
        return schema;
    }
View Full Code Here


    public static List<String> getKinds() throws IllegalStateException {
        if (AppEngineUtil.isProduction()) {
            throw new IllegalStateException(
                "This method does not work on production server.");
        }
        Schema schema = getSchema();
        List<EntityProto> entityProtoList = schema.kinds();
        List<String> kindList = new ArrayList<String>(entityProtoList.size());
        for (EntityProto entityProto : entityProtoList) {
            kindList.add(getKind(entityProto.getKey()));
        }
        return kindList;
View Full Code Here

        GetSchemaRequest req = new GetSchemaRequest();
        req.setApp(ApiProxy.getCurrentEnvironment().getAppId());
        byte[] resBuf =
            ApiProxy.makeSyncCall(DATASTORE_SERVICE, GET_SCHEMA_METHOD, req
                .toByteArray());
        Schema schema = new Schema();
        schema.mergeFrom(resBuf);
        return schema;
    }
View Full Code Here

    public static List<String> getKinds() throws IllegalStateException {
        if (AppEngineUtil.isProduction()) {
            throw new IllegalStateException(
                "This method does not work on production server.");
        }
        Schema schema = getSchema();
        List<EntityProto> entityProtoList = schema.kinds();
        List<String> kindList = new ArrayList<String>(entityProtoList.size());
        for (EntityProto entityProto : entityProtoList) {
            kindList.add(getKind(entityProto.getKey()));
        }
        return kindList;
View Full Code Here

        }
      }

    } else {

      Schema schema = DatastoreUtil.getSchema();
      List<EntityProto> entityProtoList = schema.kinds();
      EntityProto targetEntity = null;
      for (EntityProto entityProto : entityProtoList) {
        String kindName = DatastoreUtil.getKind(entityProto.getKey());
        if (kind.equals(kindName)) {
          targetEntity = entityProto;
View Full Code Here

    }
    GetSchemaRequest req = new GetSchemaRequest();
    req.setApp(ApiProxy.getCurrentEnvironment().getAppId());
    byte[] resBuf =
      ApiProxy.makeSyncCall(DATASTORE_SERVICE, GET_SCHEMA_METHOD, req.toByteArray());
    Schema schema = new Schema();
    schema.mergeFrom(resBuf);
    return schema;
  }
View Full Code Here

   */
  public static List<String> getKinds() throws IllegalStateException {
    if (AppEngineUtil.isProduction()) {
      throw new IllegalStateException("This method does not work on production server.");
    }
    Schema schema = getSchema();
    List<EntityProto> entityProtoList = schema.kinds();
    List<String> kindList = new ArrayList<String>(entityProtoList.size());
    for (EntityProto entityProto : entityProtoList) {
      kindList.add(getKind(entityProto.getKey()));
    }
    return kindList;
View Full Code Here

TOP

Related Classes of com.google.apphosting.api.DatastorePb.Schema

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.