Package org.jpox.store.exceptions

Examples of org.jpox.store.exceptions.NotYetFlushedException


        ClassLoaderResolver clr = om.getClassLoaderResolver();
        ApiAdapter api = om.getApiAdapter();

        int n = 0;
        boolean foundClassAssignableFromValue = false;
        NotYetFlushedException notYetFlushed = null;

        if (value != null)
        {
          if (!om.isInserting(value))
          {
View Full Code Here


                    if (om.isInserting(value))
                    {
                        // Object is in the process of being inserted, but has no id yet so provide a null for now
                        // The "NotYetFlushedException" is caught by ParameterSetter and processed as an update being required.
                        getDataStoreMapping(0).setObject(ps, param[0], null);
                        throw new NotYetFlushedException(value);
                    }
                    else
                    {
                        // Object is not persist, nor in the process of being made persistent
                        om.persistObjectInternal(value, null, null, -1, StateManager.PC);
View Full Code Here

                        }
                    }
                    catch (NotYetFlushedException e)
                    {
                        setObjectAsNull(om, ps, param);
                        throw new NotYetFlushedException(value);
                    }
                }

                if (sm != null)
                {
                    sm.setStoringPC();
                }

                // If the field doesnt map to any datastore fields, omit the set process
                if (getNumberOfDatastoreFields() > 0)
                {
                    if (id instanceof OID)
                    {
                        super.setObject(om, ps, param, id);
                    }
                    else
                    {
                        // TODO Factor out this PersistenceCapable reference
                        ((PersistenceCapable)value).jdoCopyKeyFieldsFromObjectId(new AppIDObjectIdFieldConsumer(param, om, ps,
                            javaTypeMappings), id);
                    }
                }
            }
            else
            {
                if (sm != null)
                {
                    sm.setStoringPC();
                }

                if (getNumberOfDatastoreFields() > 0)
                {
                    // Object is in the process of being inserted so we cant use its id currently and we need to store
                    // a foreign key to it (which we cant yet do). Just put "null" in and throw "NotYetFlushedException",
                    // to be caught by ParameterSetter and will signal to the PC object being inserted that it needs
                    // to inform this object when it is inserted.
                    setObjectAsNull(om, ps, param);
                    throw new NotYetFlushedException(value);
                }
            }
        }
        finally
        {
View Full Code Here

TOP

Related Classes of org.jpox.store.exceptions.NotYetFlushedException

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.