⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datavaluefactoryimpl.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
                {                        return new SQLDouble();                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public BooleanDataValue getNullBoolean(BooleanDataValue dataValue)        {                if (dataValue == null)                {                        return new SQLBoolean();                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public BitDataValue             getNullBit(BitDataValue dataValue) throws StandardException        {                if (dataValue == null)                {                        return getBitDataValue((byte[]) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public BitDataValue             getNullVarbit(BitDataValue dataValue) throws StandardException        {                if (dataValue == null)                {                        return getVarbitDataValue((byte[]) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        // LONGVARBIT        public BitDataValue getNullLongVarbit(BitDataValue dataValue) throws StandardException        {                if (dataValue == null)                {                        return getLongVarbitDataValue((byte[]) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        /// BLOB        public BitDataValue getNullBlob(BitDataValue dataValue) throws StandardException        {                if (dataValue == null)                {                        return getBlobDataValue((byte[]) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        // CHAR        public StringDataValue          getNullChar(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getCharDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public StringDataValue          getNullVarchar(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getVarcharDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public StringDataValue          getNullLongvarchar(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getLongvarcharDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public StringDataValue          getNullClob(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getClobDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public StringDataValue          getNullNationalChar(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getNationalCharDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public StringDataValue          getNullNationalVarchar(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getNationalVarcharDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public StringDataValue          getNullNationalLongvarchar(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getNationalLongvarcharDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public StringDataValue          getNullNClob(StringDataValue dataValue)        {                if (dataValue == null)                {                        return getNClobDataValue((String) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public UserDataValue            getNullObject(UserDataValue dataValue)        {                if (dataValue == null)                {                        return getDataValue((Object) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public RefDataValue             getNullRef(RefDataValue dataValue)        {                if (dataValue == null)                {                        return getDataValue((RowLocation) null);                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public DateTimeDataValue        getNullDate(DateTimeDataValue dataValue)        {                if (dataValue == null)                {                    try                    {                        return getDataValue((Date) null);                    }                    catch( StandardException se)                    {                        if( SanityManager.DEBUG)                        {                            SanityManager.THROWASSERT( "Could not get a null date.", se);                        }                        return null;                    }                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public DateTimeDataValue        getNullTime(DateTimeDataValue dataValue)        {                if (dataValue == null)                {                    try                    {                        return getDataValue((Time) null);                    }                    catch( StandardException se)                    {                        if( SanityManager.DEBUG)                        {                            SanityManager.THROWASSERT( "Could not get a null time.", se);                        }                        return null;                    }                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }        public DateTimeDataValue        getNullTimestamp(DateTimeDataValue dataValue)        {                if (dataValue == null)                {                    try                    {                        return getDataValue((Timestamp) null);                    }                    catch( StandardException se)                    {                        if( SanityManager.DEBUG)                        {                            SanityManager.THROWASSERT( "Could not get a null timestamp.", se);                        }                        return null;                    }                }                else                {                        dataValue.setToNull();                        return dataValue;                }        }    public DateTimeDataValue getDateValue( String dateStr, boolean isJdbcEscape) throws StandardException    {        return new SQLDate( dateStr, isJdbcEscape, getLocaleFinder());    } // end of getDateValue( String dateStr)    public DateTimeDataValue getTimeValue( String timeStr, boolean isJdbcEscape) throws StandardException    {        return new SQLTime( timeStr, isJdbcEscape, getLocaleFinder());    } // end of getTimeValue( String timeStr)    public DateTimeDataValue getTimestampValue( String timestampStr, boolean isJdbcEscape) throws StandardException    {        return new SQLTimestamp( timestampStr, isJdbcEscape, getLocaleFinder());    } // end of getTimestampValue( String timestampStr)    /**     * getXMLDataValue:     * Get a SQL null value with XML type.     * @return An XMLDataValue instance corresponding to a     *  a NULL value.     */    public XMLDataValue getXMLDataValue()    {        return new XML();    }    /**     * getXMLDataValue:     * Get a null XML  value.  If a non-null XMLDataValue is     * received then re-use that instance, otherwise create	 * a new one.     * @param previous An XMLDataValue instance to re-use.     * @return An XMLDataValue instance corresponding to a     *  NULL value.  If an XMLDataValue was received, the     *  returned XMLDataValue is the same instance as the one     *  received, but the actual data has been set to a     *  SQL null value.     * @exception StandardException Thrown on error     */    public XMLDataValue getXMLDataValue(XMLDataValue previous)		throws StandardException    {		return getNullXML(previous);    }    /**     * getNullXML:     * Get an XML with a SQL null value. If the supplied value is     * null then get a new value, otherwise set it to null and return      * that value.     * @param dataValue An XMLDataValue instance to re-use.     * @return An XMLDataValue instance corresponding to a     *  NULL value.  If an XMLDataValue was received, the     *  returned XMLDataValue is the same instance as the one     *  received, but the actual data has been set to null.     */    public XMLDataValue getNullXML(XMLDataValue dataValue)    {        if (dataValue == null)            return getXMLDataValue();        else {            dataValue.setToNull();            return dataValue;        }    }        // RESOLVE: This is here to find the LocaleFinder (i.e. the Database)        // on first access. This is necessary because the Monitor can't find        // the Database at boot time, because the Database is not done booting.        // See LanguageConnectionFactory.        private LocaleFinder getLocaleFinder()        {                if (localeFinder == null)                {                        DatabaseContext dc = (DatabaseContext) ContextService.getContext(DatabaseContext.CONTEXT_ID);                        if( dc != null)                            localeFinder = dc.getDatabase();                }                return localeFinder;        }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -