Package org.apache.empire.data

Examples of org.apache.empire.data.DataType


        String tbl = getName().toLowerCase();  
        String key = MESSAGE_KEY_PREFIX + tbl + "." + col;
        column.setTitle(key);

        // Set Default Control Type
        DataType type = column.getDataType();
        column.setControlType((type==DataType.BOOL) ? "checkbox" : "text");

        // Add Column
        return super.addColumn(column);
    }
View Full Code Here


     */
    @SuppressWarnings("unchecked")
    public DBColumnExpr decode(Map valueMap, Object otherwise)
    {
        // Detect data type
        DataType dataType = DataType.UNKNOWN;
        if (otherwise!=null)
        {
            dataType = detectDataType(otherwise);
        }
        if (dataType==DataType.UNKNOWN)
View Full Code Here

        }
    }
   
    private boolean useCmdParam(DBColumn col)
    {
        DataType dt = col.getDataType();
        return ( dt==DataType.BLOB || dt==DataType.CLOB );
    }
View Full Code Here

            log.error("Index out of range: " + index);
            return null;
        }
        try
        { // Get Value from Resultset
            DataType dataType = colList[index].getDataType();
            return db.driver.getResultValue(rset, index + 1, dataType);

        } catch (Exception e)
        {
            log.error("getValue exception", e);
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public DBColumnExpr decode(Map valueMap, Object otherwise)
    {
        // Detect data type
        DataType dataType = DataType.UNKNOWN;
        if (otherwise!=null)
        {
            dataType = detectDataType(otherwise);
        }
        if (dataType==DataType.UNKNOWN)
View Full Code Here

     * @return the auto-generated value
     */
    public Object getColumnAutoValue(DBDatabase db, DBTableColumn column, Connection conn)
    {
        // Supports sequences?
        DataType type = column.getDataType();
        if (type == DataType.AUTOINC)
        {   // Use a numeric sequence
            if (isSupported(DBDriverFeature.SEQUENCES)==false)
                return null; // Create Later
            String SeqName = column.getSequenceName();
View Full Code Here

            return false;
        // Check if prepared statements are enabled
        if (db.isPreparedStatementsEnabled())
            return true;
        // Only use a command param if column is of type BLOB or CLOB
        DataType dt = col.getDataType();
        return ( dt==DataType.BLOB || dt==DataType.CLOB );
    }
View Full Code Here

     * @return the auto-generated value
     */
    public Object getColumnAutoValue(DBDatabase db, DBTableColumn column, Connection conn)
    {
        // Supports sequences?
        DataType type = column.getDataType();
        if (type == DataType.AUTOINC)
        {   // Use a numeric sequence
            if (isSupported(DBDriverFeature.SEQUENCES)==false)
                return null; // Create Later
            String SeqName = column.getSequenceName();
View Full Code Here

            return false;
        // Check if prepared statements are enabled
        if (db.isPreparedStatementsEnabled())
            return true;
        // Only use a command param if column is of type BLOB or CLOB
        DataType dt = col.getDataType();
        return ( dt==DataType.BLOB || dt==DataType.CLOB );
    }
View Full Code Here

     *
     * @return true if column is a character based column
     */
    public boolean isTextColumn()
    {
        DataType type = getDataType();
        return (type==DataType.TEXT || type==DataType.CHAR || type==DataType.CLOB);
    }
View Full Code Here

TOP

Related Classes of org.apache.empire.data.DataType

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.