Examples of first()


Examples of java.sql.ResultSet.first()

        PreparedStatement prep2 = conn
                .prepareStatement("CALL TRIM(CHAR(0) FROM UTF8TOSTRING(DECRYPT('AES', RAWTOHEX(?), ?)))");
        prep2.setCharacterStream(1, new StringReader(key), -1);
        prep2.setCharacterStream(2, new StringReader(encrypted), -1);
        ResultSet rs2 = prep2.executeQuery();
        rs2.first();
        String decrypted = rs2.getString(1);
        prep2.close();
        assertEquals(value, decrypted);
        conn.close();
    }
View Full Code Here

Examples of java.text.AttributedCharacterIterator.first()

                    int yearDiff = Math.abs(typedCal.get(Calendar.YEAR) - projectStartCal.get(Calendar.YEAR));
                    if (yearDiff > 1500) {
                      AttributedCharacterIterator iter = formats[i].formatToCharacterIterator(typedDate);
                      int additionalZeroes = -1;
                      StringBuffer result = new StringBuffer();
                      for (char c = iter.first(); c!=iter.DONE; c = iter.next()) {
                        if (iter.getAttribute(DateFormat.Field.YEAR)!=null && additionalZeroes==-1) {
                              additionalZeroes = iter.getRunLimit(DateFormat.Field.YEAR) - iter.getIndex();
                          for (int j=0; j<additionalZeroes; j++) {
                            result.append('0');
                          }
View Full Code Here

Examples of java.text.BreakIterator.first()

    final CharacterEntityParser entityParser = HtmlCharacterEntities.getEntityParser();
    final BreakIterator instance = BreakIterator.getLineInstance();
    instance.setText(text);

    int start = instance.first();
    int end = instance.next();

    boolean flagStart = true;
    while (end != BreakIterator.DONE)
    {
View Full Code Here

Examples of java.text.CharacterIterator.first()

        this.add('"');
        if(!matcher.reset(string).find()){
          add(string);
        }else {
          CharacterIterator it = new StringCharacterIterator(string);
          for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) {
              if (c == '"') {
                  this.add("\\\"");
              } else if (c == '\\') {
                  this.add("\\\\");
              } else if (c == '/') {
View Full Code Here

Examples of java.text.StringCharacterIterator.first()

        this.add('"');
        if(!matcher.reset(string).find()){
          add(string);
        }else {
          CharacterIterator it = new StringCharacterIterator(string);
          for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) {
              if (c == '"') {
                  this.add("\\\"");
              } else if (c == '\\') {
                  this.add("\\\\");
              } else if (c == '/') {
View Full Code Here

Examples of java.util.NavigableSet.first()

        NavigableSet keySet;
        String firstKey1 = new Integer(100).toString();
        String firstKey2 = new Integer(101).toString();

        keySet = navigableMap_startExcluded_endExcluded.navigableKeySet();
        assertEquals(firstKey2, keySet.first());

        keySet = navigableMap_startExcluded_endIncluded.navigableKeySet();
        assertEquals(firstKey2, keySet.first());

        keySet = navigableMap_startIncluded_endExcluded.navigableKeySet();
View Full Code Here

Examples of java.util.SortedSet.first()

      if (seriesColors.size() == 1)
      {
        // Add the single color to the beginning of the color cycle, using all the default
        // colors.  To replace the defaults you have to specify at least two colors.
        Paint[] colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + 1];
        colors[0] = ((JRSeriesColor)seriesColors.first()).getColor();
        System.arraycopy(DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE, 0, colors, 1, DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length);
        plot.setDrawingSupplier(new DefaultDrawingSupplier(colors,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
View Full Code Here

Examples of java.util.TreeSet.first()

        oUnionDates.add(sDate);
    } // next
    int nUnionDates = oUnionDates.size();
    oRetVal = new WorkingCalendar(nUnionDates,
                                  getStringNull(DB.nm_calendar,"")+"+"+oLocalCalendar.getStringNull(DB.nm_calendar,""),
                                  toDate(oUnionDates.first().toString()),
                                  toDate(oUnionDates.last().toString()));
    Iterator oIter = oUnionDates.iterator();
    int iCurrentDateIndex = 0;
    while (oIter.hasNext()) {
      int iDate = Integer.parseInt((String) oIter.next());
View Full Code Here

Examples of javax.sql.rowset.CachedRowSet.first()

        /*
         * Test empty JoinRowSet
         */
        CachedRowSet emptyToCrset = jrs.toCachedRowSet();
        assertNull(emptyToCrset.getMetaData());
        assertFalse(emptyToCrset.first());

        /*
         * The first CachedRowSet
         */
        jrs = newJoinRowSet();
View Full Code Here

Examples of javax.sql.rowset.FilteredRowSet.first()

        filteredRowSet.populate(rs);

        /*
         * Mark the first row as delete.
         */
        assertTrue(filteredRowSet.first());
        assertEquals(1, filteredRowSet.getInt(1));
        filteredRowSet.deleteRow();

        Predicate range = new RangeOne();
        filteredRowSet.setFilter(range);
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.