Examples of KeyValue


Examples of at.riemers.zero.base.model.KeyValue

    List<PermissionTemplate> objects = new ArrayList<PermissionTemplate>();
    objects.add(new PermissionTemplate(this, AUTH_USER_EDIT, false));
    PermissionTemplate userPermission = new PermissionTemplate(this, AUTH_USER, true);
   
    List<UserGroup> userGroups = userGroupDao.findAll();
    userPermission.addValue(new KeyValue("*","All Groups"));
    for(UserGroup userGroup : userGroups) {
        KeyValue v = new KeyValue(userGroup.getGroupKey(), userGroup.getGroupKey() + " - " + userGroup.getDescription());
        userPermission.addValue(v);
    }
   
    objects.add(userPermission);
   
View Full Code Here

Examples of be.bagofwords.util.KeyValue

    public List<KeyValue<T>> removeAllValues() {
        final List<KeyValue<T>> valuesToRemove = new ArrayList<>();
        doActionOnValues(new ValueAction() {
            @Override
            public void doAction(long key, Object value) {
                valuesToRemove.add(new KeyValue(key, value));
            }
        });
        clear(); //also clear old cached objects
        return valuesToRemove;
    }
View Full Code Here

Examples of co.cask.cdap.data2.dataset2.lib.table.leveldb.KeyValue

    public byte[] get(byte[] key) {
      return getTable().get(createKey(key));
    }

    private static byte[] createKey(byte[] rowKey) {
      return new KeyValue(rowKey, DATA_COLFAM, DEFAULT_COLUMN, 1, KeyValue.Type.Put).getKey();
    }
View Full Code Here

Examples of com.bacoder.parser.javaproperties.api.KeyValue

  @Override
  public KeyValue adapt(KeyValueContext context) {
    KeyContext keyContext = getChild(context, KeyContext.class);
    ValueContext valueContext = getChild(context, ValueContext.class);
    if (keyContext != null && valueContext != null) {
      KeyValue keyValue = createData(context);
      keyValue.setKey(getAdapter(KeyAdapter.class).adapt(keyContext));
      keyValue.setValue(getAdapter(ValueAdapter.class).adapt(valueContext));
      return keyValue;
    } else {
      return null;
    }
  }
View Full Code Here

Examples of com.bj58.spat.gaea.server.core.communication.http.KeyValue

  }

  @Test
  public void testDel() throws Exception {
    String url = "http://127.0.0.1:8099/del/";
    KeyValue[] kv = new KeyValue[] { new KeyValue("newsID", "101001") };
    String content = JsonHelper.toJsonExt(kv);
    System.out.println(content);

    byte[] buffer = content.getBytes("utf-8");
View Full Code Here

Examples of com.cosmo.util.KeyValue

   public List<KeyValue> getPropertiesList()
   {
      List<KeyValue> values = new ArrayList<KeyValue>();
      for (String key : properties.keySet())
      {
         values.add(new KeyValue(key, this.properties.get(key)));
      }

      return values;
   }
View Full Code Here

Examples of com.foundationdb.KeyValue

    @Override
    public Void next() {
        Map<String,Object> value = new HashMap<>();
        Tuple2 lastKey = null;
        while (true) {
            KeyValue kv;
            if (pending != null) {
                kv = pending;
                pending = null;
            } else {
                try {
                    if (underlying.hasNext()) {
                        kv = underlying.next();
                    } else {
                        break;
                    }
                } catch (RuntimeException e) {
                    throw FDBAdapter.wrapFDBException(storeData.session, e);
                }
            }
           
            Tuple2 key = Tuple2.fromBytes(kv.getKey());
            String name = key.getString(key.size() - 1);
            key = key.popBack();
            if (lastKey == null) {
                lastKey = key;
            }
            else if (!key.equals(lastKey)) {
                pending = kv;
                break;
            }
            value.put(name, Tuple2.fromBytes(kv.getValue()).get(0));
        }
        storeData.rawKey = lastKey.pack();
        storeData.otherValue = value;
        count++;
        return null;
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.KeyValue

      for (int j = 0; j < 10000; j++) {
        valueValues.add(new KeyValue<>(-i, valueStrings));
      }

      @SuppressWarnings({"unchecked", "rawtypes"})
      ByteBuffer bytes = m.toBytes(new KeyValue(key, valueValues));
      KeyValue<KeyValue<Integer, ? extends Iterable<String>>,
          Iterable<KeyValue<Integer, ? extends Iterable<String>>>> reconstructed =
              m.fromBytes(bytes.slice());
      validateEqual(key.getKey(), keyStrings, reconstructed.getKey());
View Full Code Here

Examples of com.mossle.form.keyvalue.KeyValue

    public String execute(CommandContext commandContext) {
        String taskId = getParameter(OPERATION_TASK_ID);
        String businessKey = getParameter(OPERATION_BUSINESS_KEY);
        String bpmProcessId = getParameter(OPERATION_BPM_PROCESS_ID);
        String userId = SpringSecurityUtils.getCurrentUserId();
        KeyValue keyValue = getKeyValue();

        if (this.notEmpty(taskId)) {
            // 如果是任务草稿,直接通过processInstanceId获得record,更新数据
            // TODO: 分支肯定有问题
            Task task = getProcessEngine().getTaskService().createTaskQuery()
                    .taskId(taskId).singleResult();

            if (task == null) {
                throw new IllegalStateException("任务不存在");
            }

            String processInstanceId = task.getProcessInstanceId();
            Record record = keyValue.findByRef(processInstanceId);

            if (record != null) {
                record = new RecordBuilder().build(record, STATUS_DRAFT_TASK,
                        getParameters());
                keyValue.save(record);
                businessKey = record.getCode();
            }
        } else if (this.notEmpty(businessKey)) {
            // 如果是流程草稿,直接通过businessKey获得record,更新数据
            Record record = keyValue.findByCode(businessKey);

            record = new RecordBuilder().build(record, STATUS_DRAFT_PROCESS,
                    getParameters());
            keyValue.save(record);
        } else {
            // 如果是第一次保存草稿,肯定是流程草稿,先初始化record,再保存数据
            Record record = new RecordBuilder().build(bpmProcessId,
                    STATUS_DRAFT_PROCESS, getParameters(), userId);
            keyValue.save(record);
            businessKey = record.getCode();
        }

        return businessKey;
    }
View Full Code Here

Examples of com.pinterest.secor.io.KeyValue

    }

    @Override
    public KeyValue next() throws IOException {
        if (mReader.next(mKey, mValue)) {
            return new KeyValue(mKey.get(), mValue.getBytes());
        } else {
            return null;
        }
    }
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.