Examples of cache()


Examples of com.gargoylesoftware.htmlunit.Cache.cache()

            sheet_ = new Stylesheet(this, cached, uri);
        }
        else {
            final InputSource source = new InputSource(new StringReader(css));
            sheet_ = new Stylesheet(this, source, uri);
            cache.cache(css, sheet_.getWrappedSheet());
        }

        return sheet_;
    }
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.PatchSetApproval.cache()

    for (final ApprovalCategoryValue.Id want : approvals) {
      PatchSetApproval a = mine.get(want.getParentKey());
      if (a == null) {
        a = new PatchSetApproval(new PatchSetApproval.Key(//
            patchSetId, user.getAccountId(), want.getParentKey()), want.get());
        a.cache(change);
        ins.add(a);
        all.add(a);
        mine.put(a.getCategoryId(), a);
        dirty.add(a.getCategoryId());
      }
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.PatchSetApproval.cache()

        functionStateFactory.create(ctl, patchSetId, all);
    for (final ApprovalCategoryValue.Id want : approvals) {
      final PatchSetApproval a = mine.get(want.getParentKey());
      final short o = a.getValue();
      a.setValue(want.get());
      a.cache(change);
      if (!ApprovalCategory.SUBMIT.equals(a.getCategoryId())) {
        functionState.normalize(types.byId(a.getCategoryId()), a);
      }
      if (want.get() != a.getValue()) {
        throw new InvalidChangeOperationException(
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.PatchSetApproval.cache()

    // Update dashboards for everyone else.
    //
    for (PatchSetApproval a : all) {
      if (!user.getAccountId().equals(a.getAccountId())) {
        a.cache(change);
        upd.add(a);
      }
    }

    db.patchSetApprovals().update(upd);
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.PatchSetApproval.cache()

  private PatchSetApproval dummyApproval(final Change change,
      final PatchSet.Id patchSetId, final Account.Id reviewerId) {
    final PatchSetApproval dummyApproval =
        new PatchSetApproval(new PatchSetApproval.Key(patchSetId, reviewerId,
            addReviewerCategoryId), (short) 0);
    dummyApproval.cache(change);
    return dummyApproval;
  }

  public static boolean isLegalReviewerGroup(final AccountGroup.UUID groupUUID) {
    return !(AccountGroup.ANONYMOUS_USERS.equals(groupUUID)
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.PatchSetApproval.cache()

    ApprovalCategory.Id catId = allTypes.get(allTypes.size() - 1).getCategory().getId();
    for (Account.Id account : need) {
      PatchSetApproval psa = new PatchSetApproval(
          new PatchSetApproval.Key(ps.getId(), account, catId),
          (short) 0);
      psa.cache(change);
      cells.add(psa);
    }
    db.patchSetApprovals().insert(cells);
  }
}
View Full Code Here

Examples of com.jengine.orm.model.Model.cache()

        Field pk = item.getPrimaryKey().getModelField();
        if (values.containsKey(pk.getFieldName()) && values.get(pk.getFieldName()) != null) {
            Model obj = item.getModelClass().newInstance();
            obj.setNew(false);
            obj.setData(values);
            obj.cache();

            return obj;
        } else {
            return null;
        }
View Full Code Here

Examples of com.vaadin.server.LegacyCommunicationManager.ClientCache.cache()

            ClientCache clientCache = manager.getClientCache(ui);

            List<Class<? extends ClientConnector>> newConnectorTypes = new ArrayList<Class<? extends ClientConnector>>();

            for (Class<? extends ClientConnector> class1 : usedClientConnectors) {
                if (clientCache.cache(class1)) {
                    // client does not know the mapping key for this type, send
                    // mapping to client
                    newConnectorTypes.add(class1);

                    if (!typeMappingsOpen) {
View Full Code Here

Examples of net.sf.lapg.templates.api.impl.DefaultEvaluationCache.cache()

public class ApiTests extends TemplateTestCase {

  public void testCache() {
    DefaultEvaluationCache cache = new DefaultEvaluationCache();
    cache.cache(3, 1, 2, 5);
    Assert.assertEquals(3, cache.lookup(1, 2, 5));
    Assert.assertEquals(null, cache.lookup(1, 2, 6));
    cache.cache(8, new Object[] { 3,4,7}, 9);
    Assert.assertEquals(8, cache.lookup(new Object[] { 3,4,7}, 9));
    Assert.assertEquals(null, cache.lookup(new Object[] { 3,5,7}, 9));
View Full Code Here

Examples of net.sf.lapg.templates.api.impl.DefaultEvaluationCache.cache()

  public void testCache() {
    DefaultEvaluationCache cache = new DefaultEvaluationCache();
    cache.cache(3, 1, 2, 5);
    Assert.assertEquals(3, cache.lookup(1, 2, 5));
    Assert.assertEquals(null, cache.lookup(1, 2, 6));
    cache.cache(8, new Object[] { 3,4,7}, 9);
    Assert.assertEquals(8, cache.lookup(new Object[] { 3,4,7}, 9));
    Assert.assertEquals(null, cache.lookup(new Object[] { 3,5,7}, 9));
  }

  public void testIds() {
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.