Package com.vaadin.data.util

Examples of com.vaadin.data.util.QueryContainer


    // TODO where deleted=?
    final String q = "SELECT DISTINCT(" + Resource.PROPERTY_ID_CATEGORY
        + ") FROM " + Resource.TABLE + " ORDER BY "
        + Resource.PROPERTY_ID_CATEGORY;
    try {
      return new QueryContainer(q, connection,
          ResultSet.TYPE_SCROLL_INSENSITIVE,
          ResultSet.CONCUR_READ_ONLY);
    } catch (final SQLException e) {
      throw new RuntimeException(e);
    }
View Full Code Here


          + "'"; // FIXME ->
      // PreparedStatement!
    }

    try {
      return new QueryContainer(q, connection,
          ResultSet.TYPE_SCROLL_INSENSITIVE,
          ResultSet.CONCUR_READ_ONLY);
    } catch (final SQLException e) {
      throw new RuntimeException(e);
    }
View Full Code Here

      q += " HAVING " + Reservation.PROPERTY_ID_RESOURCE_ID + " IN (" + s
          + ")";
    }
    q += " ORDER BY " + Reservation.PROPERTY_ID_RESERVED_FROM;
    try {
      final QueryContainer qc = new QueryContainer(q, connection,
          ResultSet.TYPE_SCROLL_INSENSITIVE,
          ResultSet.CONCUR_READ_ONLY);
      if (qc.size() < 1) {
        return null;
      } else {
        return qc;
      }
    } catch (final SQLException e) {
View Full Code Here

  public Container getUsers() {
    // TODO where deleted=?
    final String q = "SELECT * FROM " + User.TABLE + " ORDER BY "
        + User.PROPERTY_ID_FULLNAME;
    try {
      final QueryContainer qc = new QueryContainer(q, connection,
          ResultSet.TYPE_SCROLL_INSENSITIVE,
          ResultSet.CONCUR_READ_ONLY);
      return qc;
    } catch (final SQLException e) {
      throw new RuntimeException(e);
View Full Code Here

  /**
   * Populates table component with all rows from calendar table.
   */
  private void initCalendars() {
    try {
      final QueryContainer qc = new QueryContainer("SELECT * FROM "
          + CalendarDB.DB_TABLE_NAME, sampleDatabase
          .getConnection());
      from.setContainerDataSource(qc);
      to.setContainerDataSource(qc);
    } catch (final SQLException e) {
View Full Code Here

TOP

Related Classes of com.vaadin.data.util.QueryContainer

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.