Package org.apache.empire.exceptions

Examples of org.apache.empire.exceptions.ObjectNotValidException


     * @return the insert into SQL-Command
     */
    protected String getInsertInto(DBTable table, DBColumnExpr[] select, List<DBColumnExpr> columns)
    {
        if (select == null)
            throw new ObjectNotValidException(this);
        // prepare buffer
        StringBuilder buf = new StringBuilder("INSERT INTO ");
        table.addSQL(buf, CTX_FULLNAME);
        // destination columns
        if (columns != null && columns.size() > 0)
View Full Code Here


     */
    public final String getInsertInto(DBTable table)
    {
        DBColumnExpr[] select = getSelectExprList();
        if (select == null || select.length < 1)
            throw new ObjectNotValidException(this);
        // Match Columns
        List<DBColumnExpr> inscols = new ArrayList<DBColumnExpr>(select.length);
        for (int i = 0; i < select.length; i++)
        {
            DBColumnExpr expr = select[i];
View Full Code Here

     * @return true if the field was modified
     */
    public boolean wasModified(int index)
    {
        if (rowset == null)
            throw new ObjectNotValidException(this);
        if (index < 0 || index >= fields.length)
            throw new InvalidArgumentException("index", index);
        // Check modified
        if (modified == null)
            return false;
View Full Code Here

     */
    @Override
    public Object getValue(int index)
    {   // Check state
        if (fields == null)
            throw new ObjectNotValidException(this);
        // Check index
        if (index < 0 || index>= fields.length)
            throw new InvalidArgumentException("index", index);
        // Special check for NO_VALUE
        if (fields[index] == ObjectUtils.NO_VALUE)
View Full Code Here

     * @return true if a valid value is supplied for the given field or false if value is {@link ObjectUtils#NO_VALUE
     */
    public boolean isValueValid(int index)
    {   // Check state
        if (fields == null)
            throw new ObjectNotValidException(this);
        // Check index
        if (index < 0 || index>= fields.length)
        {   // Index out of range
            throw new InvalidArgumentException("index", index);
        }
View Full Code Here

     * @param value the value
     */
    public void setValue(int index, Object value)
    {
        if (rowset == null)
            throw new ObjectNotValidException(this);
        if (index < 0 || index >= fields.length)
            throw new InvalidArgumentException("index", index);
        // Strings special
        if ((value instanceof String) && ((String)value).length()==0)
            value = null;
View Full Code Here

     * @param value the value
     */
    public final void setValue(Column column, Object value)
    {
        if (rowset == null)
            throw new ObjectNotValidException(this);
        // Get Column Index
        setValue(rowset.getColumnIndex(column), value);
    }
View Full Code Here

     * @return true if the field is read only
     */
    public boolean isFieldReadOnly(DBColumn column)
    {
        if (rowset==null)
            throw new ObjectNotValidException(this);
        // Ask RowSet
        return (rowset.isColumnReadOnly(column));
    }
View Full Code Here

     * @return true if the column is visible or false if not
     */
    public boolean isFieldVisible(DBColumn column)
    {
        if (rowset==null)
            throw new ObjectNotValidException(this);
        // Check if field is present and the value is valid
        int index = rowset.getColumnIndex(column);
        return (index>=0 && isValueValid(index));
    }
View Full Code Here

     * @param conn a valid connection to the database.
     */
    public void update(Connection conn)
    {
        if (rowset == null)
            throw new ObjectNotValidException(this);
        // update
        rowset.updateRecord(this, conn);
    }
View Full Code Here

TOP

Related Classes of org.apache.empire.exceptions.ObjectNotValidException

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.