Examples of reload()


Examples of com.orientechnologies.orient.core.metadata.security.ORole.reload()

      if (Logger.isDebugEnabled()) Logger.debug("creating " + r.toString() + "...");
      if (!r.isOrientRole()){ //creates the new baasbox role
        newRole = RoleDao.createRole(r.toString(), r.getInheritsFrom());
      }else//retrieve the existing OrientDB role
        newRole=r.getORole();
        newRole.reload();
      }
      newRole.getDocument().field(FIELD_INTERNAL,true);
      newRole.getDocument().field(FIELD_MODIFIABLE,false);
      newRole.getDocument().field(FIELD_DESCRIPTION,r.getDescription())
      newRole.getDocument().field(FIELD_ASSIGNABLE,r.isAssignable());
View Full Code Here

Examples of com.orientechnologies.orient.core.record.ORecord.reload()

        OFetchHelper.checkFetchPlanValid(iFetchPlan);
        if (callbackHooks(TYPE.BEFORE_READ, record) == ORecordHook.RESULT.SKIP)
          return null;

        if (record.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
          record.reload();

        if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_SHARED_LOCK)
          record.lock(false);
        else if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_EXCLUSIVE_LOCK)
          record.lock(true);
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ODocument.reload()

    doc.field("nick", "LucaPhotoTest");
    doc.field("photo", "testPhoto"); // THIS IS DECLARED TRANSIENT IN SCHEMA (see SchemaTest.java)
    doc.save();

    // RELOAD FROM THE CACHE
    doc.reload(null, false);
    Assert.assertEquals(doc.field("nick"), "LucaPhotoTest");
    Assert.assertTrue(doc.containsField("photo"));

    // RELOAD FROM DISK
    doc.reload();
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ORecordBytes.reload()

      record.setDirty();
      record.fromStream("This is the second version".getBytes());
      record.save();
      database.commit();

      record.reload();
      Assert.assertEquals(record.getRecordVersion().getCounter(), v1 + 1);
      Assert.assertTrue(new String(record.toStream()).contains("second"));
    } finally {
      database.close();
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ORecordFlat.reload()

    ORecordFlat record1 = new ORecordFlat(db1);
    record1.value("This is the first version").save();

    // RE-READ THE RECORD
    record1.reload();
    ORecordFlat record2 = db2.load(record1.getIdentity());

    record2.value("This is the second version").save();
    record2.value("This is the third version").save();
View Full Code Here

Examples of com.orientechnologies.orient.object.db.OObjectDatabaseTx.reload()

      Assert.assertEquals(account.getAddresses().size(), 1); // before rollback this is fine because one of the books was removed

      database.rollback(); // rollback the transaction

      account = database.reload(account, true); // ignore cache, get a copy of author from the datastore
      Assert.assertEquals(account.getAddresses().size(), 2); // this is fine, author still linked to 2 books
      Assert.assertEquals(account.getName(), originalName); // name is restored

      int bookCount = 0;
      for (Address b : database.browseClass(Address.class)) {
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord.reload()

    public String addFollowing() {
        String username = p("username");
      ActiveRecord user = Account.findFirst("username='" + username + "'");

        ActiveRecord loginUser = LoginHelper.loginUser();
        loginUser.reload();
        loginUser.allAssociated("followings").add(user);

        return redirectTo("/" + loginUser.getField("username"));
    }
}
View Full Code Here

Examples of com.sshtools.common.mru.MRUList.reload()

                    if (log.isDebugEnabled()) {
                        log.debug("Loading MRU from " + f.getAbsolutePath());
                    }

                    in = new FileInputStream(f);
                    mru.reload(in);
                } else {
                    if (log.isDebugEnabled()) {
                        log.debug("MRU file " + f.getAbsolutePath() +
                            " doesn't exist, creating empty list");
                    }
View Full Code Here

Examples of com.tulskiy.musique.audio.AudioFileReader.reload()

                            if (trackData.isFile() && trackData.getSubsongIndex() == 0) {
                                currentTrack = trackData.getFile().getName();
                                progress = (float) i / tracks.size();
                                AudioFileReader reader = TrackIO.getAudioFileReader(trackData.getFile().getName());
                                trackData.clearTags();
                                reader.reload(track);
                            }
                        }
                        playlist.firePlaylistChanged();
                    }
View Full Code Here

Examples of com.xiaoleilu.hutool.Setting.reload()

    //有时候需要在key对应value不存在的时候(没有这项设置的时候)告知用户,故有此方法打印一个debug日志
    setting.getWithLog("name");
    setting.getWithLog("name", "group1");
   
    //重新读取配置文件,可以启用一个定时器调用此方法来定时更新配置
    setting.reload();
   
    //当通过代码加入新的键值对的时候,调用store会保存到文件,但是会覆盖原来的文件,并丢失注释
    setting.setSetting("name1", "value");
    setting.store("/home/looly/XXX.setting");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.