Package org.apache.empire.jsf2.utils

Examples of org.apache.empire.jsf2.utils.ParameterMap


    @Override
    public Options getFieldOptions(DBColumn column)
    {
        if (column.equals(T.DEPARTMENT_ID))
        {
            SampleDB db = (SampleDB) getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.NAME);
            cmd.orderBy(db.T_DEPARTMENTS.NAME);
            return db.queryOptionList(cmd, SampleUtils.getConnection());
        }
        // base class implementation
        return super.getFieldOptions(column);
    }
View Full Code Here


    }
    return conn;
  }

  private void initDatabase() {
    sampleDB = new SampleDB();

    // Open Database (and create if not existing)
    log.info("*** open database ***");
    String driverProvider = config.getDatabaseProvider();
    DBDatabaseDriver driver = getDatabaseDriver(driverProvider);
View Full Code Here

    @Override
    public Options getFieldOptions(DBColumn column)
    {
        if (column.equals(T.DEPARTMENT_ID))
        {
            SampleDB db = (SampleDB) getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.NAME);
            cmd.orderBy(db.T_DEPARTMENTS.NAME);
            return db.queryOptionList(cmd, SampleUtils.getConnection());
        }
        // base class implementation
        return super.getFieldOptions(column);
    }
View Full Code Here

      TDepartments DEP = getDatabase().T_DEPARTMENTS;

      DBCommand queryCmd = createQueryCommand();
      queryCmd.select(DEP.DEPARTMENT_ID,DEP.NAME);
     
      SampleDB db = getDatabase();
        return db.queryOptionList(queryCmd, getConnection());
    }
View Full Code Here

    }
    return conn;
  }

  private void initDatabase() {
    sampleDB = new SampleDB();

    // Open Database (and create if not existing)
    log.info("*** open database ***");
    String driverProvider = config.getDatabaseProvider();
    DBDatabaseDriver driver = getDatabaseDriver(driverProvider);
View Full Code Here

    }
    return conn;
  }

  private void initDatabase() {
    sampleDB = new SampleDB();

    // Open Database (and create if not existing)
    log.info("*** open database ***");
    String driverProvider = config.getDatabaseProvider();
    DBDatabaseDriver driver = getDatabaseDriver(driverProvider);
View Full Code Here

      TDepartments DEP = getDatabase().T_DEPARTMENTS;

      DBCommand queryCmd = createQueryCommand();
      queryCmd.select(DEP.DEPARTMENT_ID,DEP.NAME);
     
      SampleDB db = getDatabase();
        return db.queryOptionList(queryCmd.getSelect(), getConnection());
    }
View Full Code Here

    @Override
    public Options getFieldOptions(DBColumn column)
    {
        if (column.equals(T.DEPARTMENT_ID))
        {
            SampleDB db = (SampleDB) getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.NAME);
            cmd.orderBy(db.T_DEPARTMENTS.NAME);
            return db.queryOptionList(cmd.getSelect(), SampleUtils.getConnection());
        }
        // base class implementation
        return super.getFieldOptions(column);
    }
View Full Code Here

  @Override
  public void preRenderViewAction() {
    if (employeeRecord == null) {
      employeeRecord = new EmployeeRecord();
      SampleDB sampleDB = FacesUtils.getDatabase();
      String id = FacesUtils.getHttpRequest().getParameter("id");
      if (id != null) {
        try {
          employeeRecord.read(sampleDB.T_EMPLOYEES,
              new String[] { id }, FacesUtils.getConnection());
View Full Code Here

  public EmployeeListPage() {
  }

  @Override
  public void preRenderViewAction() {
    SampleDB sampleDB = FacesUtils.getDatabase();

    DBColumnExpr C_FULL_NAME = sampleDB.T_EMPLOYEES.C_LAST_NAME.append(", ")
        .append(sampleDB.T_EMPLOYEES.C_FIRST_NAME).as("NAME");
    DBColumnExpr C_DEPARTMENT = sampleDB.T_DEPARTMENTS.C_NAME
        .as("DEPARTMENT");
    // lade Liste aus der Datenbank

    SampleDB.Employees EMP = sampleDB.T_EMPLOYEES;
    SampleDB.Departments DEP = sampleDB.T_DEPARTMENTS;

    DBCommand cmd = sampleDB.createCommand();
    cmd.select(EMP.C_EMPLOYEE_ID);
    cmd.select(C_FULL_NAME, EMP.C_GENDER, EMP.C_DATE_OF_BIRTH);
    cmd.select(C_DEPARTMENT);
    cmd.join(DEP.C_DEPARTMENT_ID, EMP.C_DEPARTMENT_ID);
View Full Code Here

TOP

Related Classes of org.apache.empire.jsf2.utils.ParameterMap

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.