Examples of first()


Examples of org.nlogo.api.LogoList.first()

    if (obj instanceof LogoList) {
      LogoList list = (LogoList) obj;
      if (list.isEmpty()) {
        throw new EngineException(context, this, I18N.errorsJ().get("org.nlogo.prim.etc.$common.emptyList"));
      }
      return list.first();
    } else if (obj instanceof String) {
      String string = (String) obj;
      if (string.length() == 0) {
        throw new EngineException(context, this, I18N.errorsJ().get("org.nlogo.prim.etc.$common.emptyString"));
      }
View Full Code Here

Examples of org.ofbiz.service.calendar.TemporalExpression.first()

                    temporalExpression = TemporalExpressionWorker.getTemporalExpression(delegator, tempExprId);
                } catch (GenericEntityException e) {
                    Debug.logWarning("Error while getting temporal expression, id = " + tempExprId + ": " + e, module);
                }
                if (temporalExpression != null) {
                    eventDateTime = temporalExpression.first(cal).getTime();
                    Date reminderDateTime = null;
                    long reminderOffset = reminder.get("reminderOffset") == null ? 0 : reminder.getLong("reminderOffset").longValue();
                    if (reminderStamp == null) {
                        if (reminderOffset != 0) {
                            cal.setTime(eventDateTime);
View Full Code Here

Examples of org.openjena.atlas.web.AcceptList.first()

            return defaultMediaType ;
       
        AcceptList headerList = new AcceptList(headerString) ;
       
        if ( myPrefs == null )
            return headerList.first() ;
   
        MediaType i = AcceptList.match(headerList, myPrefs) ;
        if ( i == null )
            return defaultMediaType ;
        return i ;
View Full Code Here

Examples of org.skife.jdbi.v2.Query.first()

                                        BindType.Position, q, args);
        if (args != null) bindArguments(method.isAnnotationPresent(BindBy.class) ?
                                        method.getAnnotation(BindBy.class).value() :
                                        BindType.Position, q, args);
        q.setMaxRows(1);
        return q.first();
    }

    private Object handleDML(String s, Method method, Object[] args)
    {
        Update u = handle.createStatement(s);
View Full Code Here

Examples of org.springframework.jdbc.support.rowset.SqlRowSet.first()

    @Override
    public LikelihoodData retrieve(final Long likelihoodId) {
        final SqlRowSet likelihood = this._getLikelihood(likelihoodId);

        likelihood.first();

        return new LikelihoodData(likelihood.getLong("id"), likelihood.getString("name"), likelihood.getString("code"),
                likelihood.getLong("enabled")

        );
View Full Code Here

Examples of org.suigeneris.jrcs.diff.delta.Chunk.first()

        {
            m_index++;

            Chunk orig = delta.getOriginal();

            if (orig.first() > m_firstElem)
            {
                // We "skip" some lines in the output.
                // So flush out the last Change, if one exists.
                flushChanges();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeDataTable.first()

    @Test(expected = SqlJetException.class)
    public void verifySchemaCookie() throws SqlJetException {
        final SqlJetSchema schema = new SqlJetSchema(db, btreeCopy);
        btreeCopy.setSchema(schema);
        final ISqlJetBtreeDataTable data = new SqlJetBtreeDataTable(btreeCopy, REP_CACHE_TABLE, true);
        data.first();
        final SqlJetOptions meta = new SqlJetOptions(btreeCopy, db);
        btreeCopy.beginTrans(SqlJetTransactionMode.WRITE);
        meta.changeSchemaVersion();
        btreeCopy.commit();
        db.getOptions().verifySchemaVersion(true);
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeIndexTable.first()

        btreeCopy.setSchema(schema);
        final String idx = schema.getIndexes(REP_CACHE_TABLE).iterator().next().getName();
        Assert.assertNotNull(idx);
        final ISqlJetBtreeIndexTable index = new SqlJetBtreeIndexTable(btreeCopy, idx, true);
        String prev = null;
        for (index.first(); !index.eof(); index.next()) {
            final String hash = index.getString(0);
            logger.info(hash);
            if (prev != null && hash != null) {
                Assert.assertTrue(hash.compareTo(prev) > 0);
            }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.first()

    private void movePage(final int page, final int moved) throws SqlJetException {
        final ISqlJetBtreeSchemaTable schemaTable = openSchemaTable(true);
        try {
            schemaTable.lock();
            try {
                for (schemaTable.first(); !schemaTable.eof(); schemaTable.next()) {
                    final long pageField = schemaTable.getPageField();
                    if (pageField == moved) {
                        final String nameField = schemaTable.getNameField();
                        schemaTable.updateRecord(schemaTable.getRowId(), schemaTable.getTypeField(), nameField,
                                schemaTable.getTableField(), page, schemaTable.getSqlField());
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeDataTable.first()

    @Test(expected = SqlJetException.class)
    public void verifySchemaCookie() throws SqlJetException {
        final SqlJetSchema schema = new SqlJetSchema(db, btreeCopy);
        btreeCopy.setSchema(schema);
        final ISqlJetBtreeDataTable data = new SqlJetBtreeDataTable(btreeCopy, REP_CACHE_TABLE, true);
        data.first();
        final SqlJetOptions meta = new SqlJetOptions(btreeCopy, db);
        btreeCopy.beginTrans(SqlJetTransactionMode.WRITE);
        meta.changeSchemaVersion();
        btreeCopy.commit();
        db.getOptions().verifySchemaVersion(true);
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.