Examples of ObjectNotValidException


Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @param conn a valid connection to the database.
     */
    public void update(Connection conn)
    {
        if (!isValid())
            throw new ObjectNotValidException(this);
        if (!isModified())
          return; /* Not modified. Nothing to do! */
        // update
        rowset.updateRecord(this, conn);
    }
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @param conn a valid connection to the database.
     */
    public void delete(Connection conn)
    {
        if (isValid()==false)
            throw new ObjectNotValidException(this);
        // Delete only if record is not new
        if (!isNew())
        {
            Object[] keys = rowset.getRecordKey(this);
            rowset.deleteRecord(keys, conn);
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     */
    @Override
    public int addColumnDesc(Element parent)
    {
        if (!isValid())
            throw new ObjectNotValidException(this);
        // Add Field Description
        int count = 0;
        List<DBColumn> columns = rowset.getColumns();
        for (int i = 0; i < columns.size(); i++)
        { // Add Field
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     */
    @Override
    public int addRowValues(Element parent)
    {
        if (!isValid())
            throw new ObjectNotValidException(this);
        // set row key
        DBColumn[] keyColumns = rowset.getKeyColumns();
        if (keyColumns != null && keyColumns.length > 0)
        { // key exits
            if (keyColumns.length > 1)
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     */
    @Override
    public Document getXmlDocument()
    {
        if (!isValid())
            throw new ObjectNotValidException(this);
        // Create Document
        DBXmlDictionary xmlDic = getXmlDictionary();
        Element root = XMLUtil.createDocument(xmlDic.getRowSetElementName());
        if (rowset.getName() != null)
            root.setAttribute("name", rowset.getName());
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

    @Override
    public synchronized void getSelect(StringBuilder buf)
    {
        resetParamUsage();
        if (select == null)
            throw new ObjectNotValidException(this); // invalid!
        // Prepares statement
        addSelect(buf);
        // From clause
        addFrom(buf);
        // Add Where
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @return true if the field was modified
     */
    public boolean wasModified(int index)
    {
        if (!isValid())
            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

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @param isModified modified or not
     */
    public void setModified(DBColumn column, boolean isModified)
    {  // Check valid
        if (state == State.Invalid)
            throw new ObjectNotValidException(this);
        // Check modified
        if (modified == null)
        {   // Init array
            modified = new boolean[fields.length];
            for (int j = 0; j < fields.length; j++)
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     */
    @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

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @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
TOP
Copyright © 2018 www.massapi.com. 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.