Package org.apache.empire.jsf2.websample.db

Examples of org.apache.empire.jsf2.websample.db.SampleDB


   
    public Options getDepartments()
    {
        if (departments==null)
        {
            SampleDB db = getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.C_DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.C_NAME);
            cmd.orderBy(db.T_DEPARTMENTS.C_NAME);
            departments = db.queryOptionList(cmd.getSelect(), getConnection());
        }
        return departments;
    }
View Full Code Here


        return doList();
    }

    public String doList()
    {
        SampleDB db = getDatabase();
        SampleDB.Employees EMP = db.T_EMPLOYEES;
        SampleDB.Departments DEP = db.T_DEPARTMENTS;
       
        DBCommand cmd = db.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

    // ------- Action Construction -------
   
    public EmployeeListAction()
    {
        SampleDB db = getDatabase();
        C_FULL_NAME = db.T_EMPLOYEES.C_LASTNAME.append(", ").append(db.T_EMPLOYEES.C_FIRSTNAME).as("NAME");
        C_DEPARTMENT = db.T_DEPARTMENTS.C_NAME.as("DEPARTMENT");
       
        // Set Title (optional)
        C_FULL_NAME .setTitle("!label.name");
View Full Code Here

   
    public Options getDepartments()
    {
        if (departments==null)
        {
            SampleDB db = getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.C_DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.C_NAME);
            cmd.orderBy(db.T_DEPARTMENTS.C_NAME.asc());
            departments = db.queryOptionList(cmd.getSelect(), getConnection());
        }
        return departments;
    }
View Full Code Here

        return doList();
    }

    public String doList()
    {
        SampleDB db = getDatabase();
        SampleDB.Employees EMP = db.T_EMPLOYEES;
        SampleDB.Departments DEP = db.T_DEPARTMENTS;
       
        DBCommand cmd = db.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

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

    // ------- Action Construction -------
   
    public EmployeeListAction()
    {
        SampleDB db = getDatabase();
        C_FULL_NAME = db.T_EMPLOYEES.C_LASTNAME.append(", ").append(db.T_EMPLOYEES.C_FIRSTNAME).as("NAME");
        C_DEPARTMENT = db.T_DEPARTMENTS.C_NAME.as("DEPARTMENT");
       
        // Set Title (optional)
        C_FULL_NAME .setTitle("!label.name");
View Full Code Here

   
    public Options getDepartments()
    {
        if (departments==null)
        {
            SampleDB db = getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.C_DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.C_NAME);
            cmd.orderBy(db.T_DEPARTMENTS.C_NAME.asc());
            departments = db.queryOptionList(cmd.getSelect(), getConnection());
        }
        return departments;
    }
View Full Code Here

        return doList();
    }

    public String doList()
    {
        SampleDB db = getDatabase();
        SampleDB.Employees EMP = db.T_EMPLOYEES;
        SampleDB.Departments DEP = db.T_DEPARTMENTS;
       
        DBCommand cmd = db.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

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

TOP

Related Classes of org.apache.empire.jsf2.websample.db.SampleDB

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.