Package org.apache.empire.commons

Examples of org.apache.empire.commons.Options


                elem.setAttribute("size", String.valueOf(size));
            // add All Attributes
            if (attributes != null)
                attributes.addXml(elem, flags);
            // add All Options
            Options fieldOptions = getOptions();
            if (fieldOptions != null)
                fieldOptions.addXml(elem, flags);
            // done
            return elem;
        }
View Full Code Here


            {   // Not enough columns
                error(Errors.InvalidArg, sqlCmd, "sqlCmd");
                return null;
            }
            // Check Result
            Options result = new Options();
            while (rs.next())
            {
                Object value = rs.getObject(1);
                String text  = rs.getString(2);
                result.add(value, text, true);
            }
            // No Value
            if (log.isInfoEnabled())
                log.info("queryOptionList retured "+String.valueOf(result.size())+" items. Query completed in " + String.valueOf(System.currentTimeMillis() - start) + " ms");
            clearError();
            return result;
        } catch (SQLException e)
        {
            error(DBErrors.QueryFailed, e);
View Full Code Here

     * @param conn a valid connection to the database.
     * @return an Options object containing a set a of values and their corresponding names
     */
    public final Options queryOptionList(DBCommand cmd, Connection conn)
    {   // Execute the  Statement
        Options options = new Options();
        queryOptionList(cmd.getSelect(), cmd.getParamValues(), conn, options);
        return options;
    }
View Full Code Here

      return this.actionConfigParams.containsKey(key);
    }

    public Options getLanguages()
    {
        Options o = new Options();
        o.add(new OptionEntry(Locale.ENGLISH, Locale.ENGLISH.getDisplayLanguage()));
        o.add(new OptionEntry(Locale.GERMAN, Locale.GERMAN.getDisplayLanguage()));
        return o;
    }
View Full Code Here

                elem.setAttribute("size", String.valueOf(size));
            // add All Attributes
            if (attributes != null)
                attributes.addXml(elem, flags);
            // add All Options
            Options fieldOptions = getOptions();
            if (fieldOptions != null)
                fieldOptions.addXml(elem, flags);
            // done
            return elem;
        }
View Full Code Here

            addIndex("EMPLOYEE_NAME_IDX", true, new DBColumn[] { FIRSTNAME, LASTNAME, DATE_OF_BIRTH });
            // Set timestamp column for save updates
            setTimestampColumn(UPDATE_TIMESTAMP);

            // Create Options for GENDER column
            Options genders = new Options();
            genders.set("M", "Male");
            genders.set("F", "Female");
            GENDER.setOptions(genders);
        }
View Full Code Here

      return this.actionConfigParams.containsKey(key);
    }

    public Options getLanguages()
    {
        Options o = new Options();
        o.add(new OptionEntry(Locale.ENGLISH, Locale.ENGLISH.getDisplayLanguage()));
        o.add(new OptionEntry(Locale.GERMAN, Locale.GERMAN.getDisplayLanguage()));
        return o;
    }
View Full Code Here

            addIndex("EMPLOYEE_NAME_IDX", true, new DBColumn[] { FIRSTNAME, LASTNAME, DATE_OF_BIRTH });
            // Set timestamp column for save updates
            setTimestampColumn(UPDATE_TIMESTAMP);

            // Create Options for GENDER column
            Options genders = new Options();
            genders.set("M", "Male");
            genders.set("F", "Female");
            GENDER.setOptions(genders);
        }
View Full Code Here

            addIndex("EMPLOYEE_NAME_IDX", true, new DBColumn[] { C_FIRSTNAME, C_LASTNAME, C_DATE_OF_BIRTH });
            // Set timestamp column for save updates
            setTimestampColumn(C_UPDATE_TIMESTAMP);

            // Create Options for GENDER column
            Options genders = new Options();
            genders.set("M", "Male");
            genders.set("F", "Female");
            C_GENDER.setOptions(genders);
           
            // Define Column Expressions
            C_FULLNAME = C_LASTNAME.append(", ").append(C_FIRSTNAME).as("FULL_NAME");
           
View Full Code Here

            {   // Not enough columns
                error(Errors.InvalidArg, sqlCmd, "sqlCmd");
                return null;
            }
            // Check Result
            Options result = new Options();
            while (rs.next())
            {
                Object value = rs.getObject(1);
                String text  = rs.getString(2);
                result.add(value, text, true);
            }
            // No Value
            if (log.isInfoEnabled())
                log.info("queryOptionList retured " + result.size() + " items. Query completed in " + (System.currentTimeMillis() - start) + " ms");
            clearError();
            return result;
        } catch (SQLException e)
        {
            error(DBErrors.QueryFailed, e);
View Full Code Here

TOP

Related Classes of org.apache.empire.commons.Options

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.