001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.db;
020
021import lucee.runtime.exp.PageException;
022
023/**
024 * a Item of a SQL Statement
025 */
026public interface SQLItem {
027
028    /**
029     * @return Returns the nulls.
030     */
031    public abstract boolean isNulls();
032
033    /**
034     * @param nulls The nulls to set.
035     */
036    public abstract void setNulls(boolean nulls);
037
038    /**
039     * @return Returns the scale.
040     */
041    public abstract int getScale();
042
043    /**
044     * @param scale The scale to set.
045     */
046    public abstract void setScale(int scale);
047
048    /**
049     * @return Returns the value.
050     */
051    public abstract Object getValue();
052
053    /**
054     * @param value The value to set.
055     */
056    public abstract void setValue(Object value);
057
058    /**
059     * @return Returns the cfsqltype.
060     */
061    public abstract int getType();
062
063    /**
064     * @param type The cfsqltype to set.
065     */
066    public abstract void setType(int type);
067
068    /**
069     * @param object
070     * @return cloned SQL Item
071     */
072    public abstract SQLItem clone(Object object);
073
074    /**
075     * @return CF combatible Type
076     * @throws PageException
077     */
078    public abstract Object getValueForCF() throws PageException;
079
080    /**
081     * @return Returns the isValueSet.
082     */
083    public abstract boolean isValueSet();
084
085}