隐藏Endpoint API的属性

时间:2014-03-04 15:44:56

标签: api google-app-engine properties hide endpoint

我正在使用Google App Engine后端和端点解决方案。我创建了一个具有多个属性的类,我不想向API公开,因此无法设置它。例如,主键或“活动”状态。我该如何隐藏它们?

公共类用户{

public static final String NAME="User";

@PrimaryKey
@Persistent
private String userKey; <------- want to hide this from user

@Persistent
private String email_address; <----- expose this only

@Persistent
private boolean active; <---- want to hide this from user

}

1 个答案:

答案 0 :(得分:0)

@Persistent
@ApiResourceProperty(ignored = AnnotationBoolean.FALSE)
private String userKey;