Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PersistenceBrokerException


        {
            throw new PersistenceBrokerSQLException("Could not build statement ask for", e);
        }
        catch (LookupException e)
        {
            throw new PersistenceBrokerException("Used ConnectionManager instance could not obtain a connection", e);
        }
    }
View Full Code Here


        {
            throw new PersistenceBrokerSQLException("Could not build statement ask for", e);
        }
        catch (LookupException e)
        {
            throw new PersistenceBrokerException("Used ConnectionManager instance could not obtain a connection", e);
        }
    }
View Full Code Here

            {
                throw (SQLException) e;
            }
            else
            {
                throw new PersistenceBrokerException("Unexpected error while bind values for class '"
                        + (cld != null ? cld.getClassNameOfObject() : null) + "', using stored procedure: "+ proc);
            }
        }

        // If we have a return value, then register it.
View Full Code Here

            init_jdbcTypes();
        }
        catch (SQLException e)
        {
            releaseDbResources();
            throw new PersistenceBrokerException(e);
        }
    }
View Full Code Here

                }
                result[i] = val;
            }
            catch (SQLException e)
            {
                throw new PersistenceBrokerException(e);
            }
        }
        return result;
    }
View Full Code Here

     * Constructor used by {@link PersistenceBrokerFactoryIF} implementation.
     */
    public PersistenceBrokerImpl(PBKey key, PersistenceBrokerFactoryIF pbf)
    {
        refresh();
        if(key == null) throw new PersistenceBrokerException("Could not instantiate broker with PBKey 'null'");
        this.pbf = pbf;
        this.pbKey = key;
        /*
        be careful when changing initializing order
        */
 
View Full Code Here

        ValueContainer[] refPkValues;
        FieldDescriptor fld;
        FieldDescriptor[] objFkFields = rds.getForeignKeyFieldDescriptors(cld);
        if (objFkFields == null)
        {
            throw new PersistenceBrokerException("No foreign key fields defined for class '"+cld.getClassNameOfObject()+"'");
        }
        if(referencedObject == null)
        {
            refPkValues = null;
        }
View Full Code Here

                {
                    referencesBroker.retrieveReference(pInstance, cld, ord, true);
                }
                else
                {
                    throw new PersistenceBrokerException("did not find attribute " + pAttributeName +
                            " for class " + pInstance.getClass().getName());
                }
            }
            // do locally remove the object to avoid problems with object state detection (insert/update),
            // because objects found in the cache detected as 'old' means 'update'
View Full Code Here

            // creation of Identity. so we have to get them here
            pkValues = serviceBrokerHelper().getKeyValues(cld, obj);
            if (!serviceBrokerHelper().assertValidPksForStore(cld.getPkFields(), pkValues))
            {
                String append = insert ? " on insert" : " on update" ;
                throw new PersistenceBrokerException("assertValidPkFields failed for Object of type: " + cld.getClassNameOfObject() + append);
            }
        }

        // get super class cld then store it with the object
        /*
 
View Full Code Here

        {
            return descriptorRepository.getTopLevelClass(clazz);
        }
        catch (ClassNotPersistenceCapableException e)
        {
            throw new PersistenceBrokerException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.PersistenceBrokerException

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.