Package org.exist.xquery.value

Examples of org.exist.xquery.value.IntegerValue


          throw new XPathException(this,
          "error while checking out a working copy for the location '"
                    + uri + "'", svne);
    }
   
    return new IntegerValue(rev);
  }
View Full Code Here


            // execute the SQL statement
            stmt = con.prepareStatement( sql );

            // store the PreparedStatement and return the uid handle of the PreparedStatement
            return( new IntegerValue( SQLModule.storePreparedStatement( context, new PreparedStatementWithSQL( sql, stmt ) ) ) );
        }
        catch( SQLException sqle ) {
            LOG.error( "sql:prepare() Caught SQLException \"" + sqle.getMessage() + "\" for SQL: \"" + sql + "\"", sqle );

            throw( new XPathException( this, "sql:prepare() Caught SQLException \"" + sqle.getMessage() + "\" for SQL: \"" + sql + "\"", sqle ) );
View Full Code Here

    {
        DateValue d = (DateValue)args[0].itemAt(0);
        GregorianCalendar cal = d.calendar.toGregorianCalendar();
        int days = cal.getActualMaximum(Calendar.DAY_OF_MONTH);

        return new IntegerValue(days);
    }
View Full Code Here

    {
        DateValue d = (DateValue)args[0].itemAt(0);
        GregorianCalendar cal = d.calendar.toGregorianCalendar();
        int weekInMonth = cal.get(Calendar.WEEK_OF_MONTH);

        return new IntegerValue(weekInMonth);
    }
View Full Code Here

   
    XMPPConnection connection = new XMPPConnection(config);
   
    // store the connection and return the handle of the connection
     
    IntegerValue integerValue = new IntegerValue( XMPPModule.storeConnection( connection ) );
    return integerValue;
  }
View Full Code Here

  public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
    DateValue d = (DateValue) args[0].itemAt(0);
    GregorianCalendar cal = d.calendar.toGregorianCalendar();
    int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);

    return new IntegerValue(dayOfWeek);
  }
View Full Code Here

    super(context, signature);
  }

  public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {

    IntegerValue value = (IntegerValue) args[0].itemAt(0);
    Date date = new Date(value.getLong());
   
    return new DateTimeValue( date );
  }
View Full Code Here

                con = ds.getConnection( jndiUser, jndiPassword );
            }

            // store the connection and return the uid handle of the connection
            return( new IntegerValue( SQLModule.storeConnection( context, con ) ) );
        }
        catch( Exception e ) {
            throw( new XPathException( this, e.getMessage() ) );
        }
    }
View Full Code Here

                // try and get the connection
                con = DriverManager.getConnection( dbURL, dbUser, dbPassword );
            }

            // store the Connection and return the uid handle of the Connection
            return( new IntegerValue( SQLModule.storeConnection( context, con ) ) );
        }
        catch( IllegalAccessException iae ) {
            logger.error( "sql:get-connection() Illegal Access to database driver class: " + dbDriver, iae );
            throw( new XPathException( this, "sql:get-connection() Illegal Access to database driver class: " + dbDriver, iae ) );
        }
View Full Code Here

        if (hints != null) {
            Object vstart = hints.get(START_VALUE);
            Object vend = hints.get(END_VALUE);
            start = vstart == null ? null : vstart.toString();
            end = vend == null ? null : vend.toString();
            IntegerValue vmax = (IntegerValue) hints.get(VALUE_COUNT);
            max = vmax == null ? Long.MAX_VALUE : vmax.getValue();
        }
        return scanIndexByQName(qnames, docs, nodes, start, end, max);
    }
View Full Code Here

TOP

Related Classes of org.exist.xquery.value.IntegerValue

Copyright © 2018 www.massapicom. 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.