【问题标题】:GAE Not able to access Public methods of Entity Class in ClientsideGAE 无法访问客户端实体类的公共方法
【发布时间】:2015-09-21 07:19:04
【问题描述】:

我正在使用 Objectify 在端点类中执行数据存储操作。 我有一个实体类

有一个公共方法:

    public void setRegistrationRecord(RegistrationRecord registrationRecord) {
        this.registrationRecord = Ref.create(Key.create(RegistrationRecord.class, registrationRecord.getId()));
    }

在客户端我无法访问此方法

请告诉我我做错了什么。

提前致谢

【问题讨论】:

  • 上课呢public.?无法表示.. 有什么错误吗?
  • @satya 是的,它是一个公共课程。

标签: java android google-app-engine objectify


【解决方案1】:

Objectify 是一个服务器端框架。创建 Key 需要 GAE SDK,它在客户端不可用。

【讨论】:

  • 感谢您的回复。端点方法不允许参数中包含多个实体类。所以在数据存储中存储一个实体我需要先创建实体然后键。只有在服务器端才有可能。在客户端有什么办法吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-09
  • 2013-09-11
  • 1970-01-01
相关资源
最近更新 更多