2014-03-04 39 views
0

我正在使用Google App Engine后端和端点解决方案。我创建了一个包含多个不想公开给API的属性的类,因此使用无法设置它。例如,主键或“活动”状态。我如何隐藏它们?从Endpoint 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 

}

回答

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