Examples of StringKey


Examples of cgl.imr.types.StringKey

      for (int i = 1; i <= 1000; i++) {
        if (edgeWeights.get(i) != Integer.MAX_VALUE)
          n.setEdgeWeight(i, edgeWeights.get(i));
      }

      collector.collect(new StringKey("" + n.getID()), new BytesValue(n
          .getBytes()));
    } catch (SerializationException e) {
      e.printStackTrace();
      throw new TwisterException(e);
    }
View Full Code Here

Examples of cgl.imr.types.StringKey

              sumOfEdgeWeights = thisNode.getEdgeWeight(id)
                  + thisNode.getEdgeWeight(v1);
              adjacentNode.setEdgeWeight(v1, sumOfEdgeWeights);
            }
          }
          collector.collect(new StringKey("" + adjacentNode.getID()),
              new BytesValue(adjacentNode.getBytes()));
          setNodeToNullForGarbageCollection(adjacentNode);
        }
        collector.collect(new StringKey("" + thisNode.getID()),
            new BytesValue(thisNode.getBytes()));
      }
    } catch (SerializationException e) {
      throw new TwisterException(e);
    }
View Full Code Here

Examples of cgl.imr.types.StringKey

          + " contains the following nodes");
      for (int y : x.getNodes().keySet())
        System.out.print(y + "| ");
      count++;
    }
    StringKey key = null;
    BytesValue value = null;

    int keyNo = 0;
    for (Graph g : subgraphs) {
      key = new StringKey("" + keyNo);
      try {
        value = new BytesValue(g.getBytes());
      } catch (SerializationException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of lupos.datastructures.simplifiedfractaltree.StringKey

    if (type1 == null) {
      System.err.println("Unsupported key/value type! Falling back to default java deserialization!");
      final ObjectInputStream ois = new ObjectInputStream(in);
      return (FractalTreeEntry) ois.readObject();
    }
    final StringKey key;
    final Object value, pointer, flag;

    try {
      // reads the key
      key = new StringKey(Registration.deserializeWithoutId(String.class, in));
      if (key.string == null) {
        return new FractalTreeEntry<>();
      }
      // reads the value
      value = Registration.deserializeWithoutId(Integer.class, in);
View Full Code Here

Examples of org.apache.torque.om.StringKey

        if (prop == null)
        {
            return;
        }

        defaultValue = new StringKey(prop);
    }
View Full Code Here

Examples of org.apache.torque.om.StringKey

        if (prop == null)
        {
            return;
        }

        emptyValue = new StringKey(prop);
    }
View Full Code Here

Examples of org.apache.torque.om.StringKey

            String[] ss = parser.getStrings(getKey());
            StringKey[] ival = new StringKey[ss.length];
            for (int i = 0; i < ss.length; i++)
            {
                ival[i] = (StringUtils.isNotEmpty(ss[i]))
                        ? new StringKey(ss[i]) : (StringKey) getEmptyValue();
            }
            setTestValue(ival);
        }
        else
        {
            String val = parser.getString(getKey());
            setTestValue((StringUtils.isNotEmpty(val))
                    ? new StringKey(val) : (StringKey) getEmptyValue());
        }
    }
View Full Code Here

Examples of org.apache.torque.om.StringKey

            attr = attribs.get(attrName);
            if (attr != null && attr.get() != null)
            {
                try
                {
                    setPrimaryKey(new StringKey(attr.get().toString()));
                }
                catch (Exception ex)
                {
                    log.error("Exception caught:", ex);
                }
View Full Code Here

Examples of org.apache.torque.om.StringKey

     * @return A StringKey, or <code>null</code> if unparsable.
     * @deprecated no replacement
     */
    public StringKey getStringKey(String name)
    {
        StringKey result = null;
        try
        {
            String value = getString(name);
            if (StringUtils.isNotEmpty(value))
            {
                result = new StringKey(value);
            }
        }
        catch (ClassCastException e)
        {
            log.error("Parameter ("
View Full Code Here

Examples of org.apache.torque.om.StringKey

     * test boolean values
     * @throws Exception if the test fails
     */
    public void testBooleanValues() throws Exception
    {
        BooleanCheck bc = BooleanCheckPeer.retrieveByPK(new StringKey("t1"));
        assertTrue("BOOLEANINT should be true but is: "
                + bc.getBintValue(), bc.getBintValue());
        assertTrue("BOOLEANCHAR should be true but is: "
                + bc.getBcharValue(), bc.getBcharValue());
        bc = BooleanCheckPeer.retrieveByPK(new StringKey("f1"));
        assertFalse("BOOLEANINT should be false but is: "
                + bc.getBintValue(), bc.getBintValue());
        assertFalse("BOOLEANCHAR should be false but is: "
                + bc.getBcharValue(), bc.getBcharValue());
    }
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.