2014-03-04 78 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;