private static void populateTestAccounts(Collection<TestSession.TestAccount> paramCollection, GraphObject paramGraphObject) { try { paramCollection = paramCollection.iterator(); while (paramCollection.hasNext()) { TestSession.TestAccount localTestAccount = (TestSession.TestAccount)paramCollection.next(); localTestAccount.setName(((GraphUser)paramGraphObject.getPropertyAs(localTestAccount.getId(), GraphUser.class)).getName()); storeTestAccount(localTestAccount); } } finally {} }
private Photo(GraphObject graphObject) { if (graphObject == null) return; // id mId = Utils.getPropertyString(graphObject, ID); // album mAlbum = Album.create(graphObject.getPropertyAs(ALBUM, GraphObject.class)); // back date time mBackDatetime = Utils.getPropertyLong(graphObject, BACKDATED_TIME); // back date time granularity String granularity = Utils.getPropertyString(graphObject, BACKDATED_TIME_GRANULARITY); mBackDatetimeGranularity = BackDatetimeGranularity.fromValue(granularity); // created time mCreatedTime = Utils.getPropertyLong(graphObject, CREATED_TIME); // from mFrom = Utils.createUser(graphObject, FROM); // height mHeight = Utils.getPropertyInteger(graphObject, HEIGHT); // icon mIcon = Utils.getPropertyString(graphObject, ICON); // image sources mImageSources = Utils.createList( graphObject, IMAGES, new Converter<ImageSource>() { @Override public ImageSource convert(GraphObject graphObject) { ImageSource imageSource = new ImageSource(); imageSource.mHeight = Utils.getPropertyInteger(graphObject, HEIGHT); imageSource.mWidth = Utils.getPropertyInteger(graphObject, WIDTH); imageSource.mSource = Utils.getPropertyString(graphObject, SOURCE); return imageSource; } }); // link mLink = Utils.getPropertyString(graphObject, LINK); // name mName = Utils.getPropertyString(graphObject, NAME); // page story id mPageStoryId = Utils.getPropertyString(graphObject, PAGE_STORY_ID); // picture mPicture = Utils.getPropertyString(graphObject, PICTURE); // source mSource = Utils.getPropertyString(graphObject, SOURCE); // updated time mUpdatedTime = Utils.getPropertyLong(graphObject, UPDATED_TIME); // width mWidth = Utils.getPropertyInteger(graphObject, WIDTH); // place mPlace = Place.create(graphObject.getPropertyAs(PLACE, GraphObject.class)); }