Examples of fromString()


Examples of org.apache.cassandra.db.marshal.AbstractType.fromString()

                if (urlQuery.containsKey("comparator"))
                    comparator = TypeParser.parse(urlQuery.get("comparator"));
                if (urlQuery.containsKey("slice_start"))
                    slice_start = comparator.fromString(urlQuery.get("slice_start"));
                if (urlQuery.containsKey("slice_end"))
                    slice_end = comparator.fromString(urlQuery.get("slice_end"));
                if (urlQuery.containsKey("reversed"))
                    slice_reverse = Boolean.parseBoolean(urlQuery.get("reversed"));
                if (urlQuery.containsKey("limit"))
                    limit = Integer.parseInt(urlQuery.get("limit"));
                if (urlQuery.containsKey("allow_deletes"))
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.fromString()

        private Map<String, ByteBuffer> previousRowKey = new HashMap<String, ByteBuffer>(); // previous CF row key

        public RowIterator()
        {
            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(quote(keyspace)).getTable(quote(cfName)).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.fromString()

        private Map<String, ByteBuffer> previousRowKey = new HashMap<String, ByteBuffer>(); // previous CF row key

        public RowIterator()
        {
            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(quote(keyspace)).getTable(quote(cfName)).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.CompositeType.fromString()

        try {
            AbstractType type = TypeParser.parse(comparatorType);
            if (type instanceof CompositeType) {
                CompositeType ctype = (CompositeType) type;

                ByteBuffer data = ctype.fromString(columnName);
                String columnName2 = ctype.getString(data);
                Assert.assertEquals(columnName, columnName2);
            } else {
                Assert.fail();
            }
View Full Code Here

Examples of org.apache.clerezza.triaxrs.headerDelegate.CookieHeaderDelegate.fromString()

    if(cookieStrings == null) {
      return null;
    }
   
    for (String cookieString : cookieStrings){
      Cookie cookie = cp.fromString(cookieString);
      cookies.put(cookie.getName(), cookie);   
    }
    return cookies;
  }
View Full Code Here

Examples of org.apache.clerezza.triaxrs.headerDelegate.LocaleProvider.fromString()

  @Test
  public void testLocaleProviderFromString() {
    LocaleProvider lp = new LocaleProvider();
    boolean illegaleArugmentOccured = false;

    assertEquals("en_UK", lp.fromString("en-uk;q = .7").toString());
    assertEquals("us__slang", lp.fromString("us-slang").toString());
    assertEquals("en_UK_cockney", lp.fromString("en-uk-cockney").toString());

    // only 2 letter language tags are allowed
    try {
View Full Code Here

Examples of org.candlepin.resteasy.parameter.CandlepinParameterUnmarshaller.fromString()

            .getDeclaredMethod("createKeyValueParam", String.class, String.class)
            .getAnnotations();
        CandlepinParameterUnmarshaller unmarshaller =
            new CandlepinParameterUnmarshaller();
        unmarshaller.setAnnotations(annotations);
        return (KeyValueParameter) unmarshaller.fromString(key + ":" + val);
    }
}
View Full Code Here

Examples of org.drools.guvnor.server.util.Discussion.fromString()

    protected List<DiscussionRecord> addToDiscussionForAsset(String assetId,
                                                             String comment) {
        RulesRepository repository = getRulesRepository();
        AssetItem asset = repository.loadAssetByUUID( assetId );
        Discussion dp = new Discussion();
        List<DiscussionRecord> discussion = dp.fromString( asset.getStringProperty( Discussion.DISCUSSION_PROPERTY_KEY ) );
        discussion.add( new DiscussionRecord( repository.getSession().getUserID(),
                                              StringEscapeUtils.escapeXml( comment ) ) );
        asset.updateStringProperty( dp.toString( discussion ),
                                    Discussion.DISCUSSION_PROPERTY_KEY,
                                    false );
View Full Code Here

Examples of org.drools.guvnor.server.util.Discussion.fromString()

    protected List<DiscussionRecord> addToDiscussionForAsset(String assetId,
            String comment) {
        AssetItem asset = rulesRepository.loadAssetByUUID(assetId);
        Discussion dp = new Discussion();
        List<DiscussionRecord> discussion = dp.fromString(asset.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));
        discussion.add(new DiscussionRecord(rulesRepository.getSession().getUserID(),
                StringEscapeUtils.escapeXml(comment)));
        asset.updateStringProperty(dp.toString(discussion),
                Discussion.DISCUSSION_PROPERTY_KEY,
                false);
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId.fromString()

      throws IOException {
    if (!walk.shallowCommitsInitialized)
      walk.initializeShallowCommits();

    final MutableObjectId idBuffer = walk.idBuffer;
    idBuffer.fromString(raw, 5);
    tree = walk.lookupTree(idBuffer);

    int ptr = 46;
    if (parents == null) {
      RevCommit[] pList = new RevCommit[1];
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.