开发者

2D array object in Google Cloud Datastore

开发者 https://www.devze.com 2023-04-08 15:32 出处:网络
I was just wondering if we are able to add a 2D array object into Google Cloud Datastore. Will the following code for adding using persistence manager be able to work?

I was just wondering if we are able to add a 2D array object into Google Cloud Datastore.

Will the following code for adding using persistence manager be able to work? TwoDArray is a 2 Dimension object. Below is a method in my Data Manager. Than开发者_C百科ks!

public static void add(String username) {
        TwoDArray twoArray = new TwoDArray(username);
        PersistenceManager pm = PMF.get().getPersistenceManager();
        try {
            pm.makePersistent(twoArray);
        } finally {
            pm.close();
        }
}


You can make almost any object persistent, as long as it follows the rules for JDO persistence. That is about as specific as we can get unless you show us what your TwoDArray class looks like.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号