Package org.jpox

Examples of org.jpox.StateManager


        }

        if (om.getApiAdapter().isTransactional(pc))
        {
            // transactional instances are not validated, so we check if a deleted instance has been flushed
            StateManager sm = om.findStateManager(pc);
            if (om.getApiAdapter().isDeleted(pc))
            {
                try
                {
                    sm.locate();
                }
                catch (JPOXObjectNotFoundException ex)
                {
                    // the instance has been flushed, and it was not found, so we return null
                    return null;
View Full Code Here


                throw new JPOXException(LOCALISER.msg("041016",
                    value.getClass(), value)).setFatal();
            }

            AbstractClassMetaData embCmd = om.getMetaDataManager().getMetaDataForClass(value.getClass().getName(), om.getClassLoaderResolver());
            StateManager embSM = om.findStateManager(value);
            if (embSM == null || ObjectManagerHelper.getObjectManager(value) == null)
            {
                // Assign a StateManager to manage our embedded object
                embSM = StateManagerFactory.newStateManagerForEmbedded(om, value, false);
                embSM.addEmbeddedOwner(ownerSM, ownerFieldNumber);
                embSM.setPcObjectType(objectType);
            }

            int n = 0;
            for (int i=0; i<javaTypeMappings.size(); i++)
            {
                JavaTypeMapping mapping = ((JavaTypeMapping)javaTypeMappings.get(i));
                int[] posMapping = new int[mapping.getNumberOfDatastoreFields()];
                for (int j=0; j<posMapping.length; j++)
                {
                    posMapping[j] = param[n++];
                }

                // Retrieve value of field from Embedded StateManager
                int embAbsFieldNum = embCmd.getAbsolutePositionOfMember(mapping.getFieldMetaData().getName());
                Object fieldValue = embSM.provideField(embAbsFieldNum);

                if (mapping instanceof EmbeddedPCMapping)
                {
                    mapping.setObject(om, ps, posMapping, fieldValue, embSM, embAbsFieldNum);
                }
View Full Code Here

        if (fmd.getFieldTypes() != null && fmd.getFieldTypes().length > 0)
        {
            // Embedded type has field-type defined so use that as our embedded type
            embeddedType = om.getClassLoaderResolver().classForName(fmd.getFieldTypes()[0]);
        }
        StateManager embSM = StateManagerFactory.newStateManagerForHollow(om, embeddedType, (Object)null);
        embSM.setPcObjectType(objectType);
        value = embSM.getObject();

        String nullColumn = null;
        String nullValue = null;
        if (emd != null)
        {
            nullColumn = emd.getNullIndicatorColumn();
            nullValue = emd.getNullIndicatorValue();
        }

        int n = 0;
        for (int i=0; i<javaTypeMappings.size(); i++)
        {
            JavaTypeMapping mapping = ((JavaTypeMapping)javaTypeMappings.get(i));
            int embAbsFieldNum = embCmd.getAbsolutePositionOfMember(mapping.getFieldMetaData().getName());
            if (mapping instanceof EmbeddedPCMapping)
            {
                // We have a nested embedded
                int numSubParams = mapping.getNumberOfDatastoreFields();
                int[] subParam = new int[numSubParams];
                int k = 0;
                for (int j=n;j<n+numSubParams;j++)
                {
                    subParam[k++] = param[j];
                }
                n += numSubParams;

                // Use the sub-object mapping to extract the value for that object
                Object subValue = mapping.getObject(om, rs, subParam, embSM, embAbsFieldNum);
                if (subValue != null)
                {
                    embSM.replaceField(embAbsFieldNum, subValue, true);
                }

                // TODO Check the null column and its value in the sub-embedded ?
            }
            else
            {
                // Extract the value(s) for this field and update the PC if it is not null
                int[] posMapping = new int[mapping.getNumberOfDatastoreFields()];
                for (int j=0; j<posMapping.length; j++)
                {
                    posMapping[j] = param[n++];
                }
                Object fieldValue = mapping.getObject(om, rs, posMapping);
                if (fieldValue != null)
                {
                    embSM.replaceField(embAbsFieldNum, fieldValue, true);
                }
                else
                {
                    // If the value is null, but the field is not a primitive update it
                    AbstractMemberMetaData embFmd = embCmd.getMetaDataForManagedMemberAtAbsolutePosition(embAbsFieldNum);
                    if (!embFmd.getType().isPrimitive())
                    {
                        embSM.replaceField(embAbsFieldNum, fieldValue, true);
                    }
                }

                // Check for the null column and its value
                if (nullColumn != null &&
                    mapping.getFieldMetaData().getColumnMetaData()[0].getName().equals(nullColumn))
                {
                    if ((nullValue == null && fieldValue == null) ||
                        (nullValue != null && fieldValue.toString().equals(nullValue)))
                    {
                        value = null;
                        break;
                    }
                }
            }
        }

        // Update owner field in the element (if present)
        if (emd != null)
        {
            String ownerField = emd.getOwnerMember();
            if (ownerField != null)
            {
                int ownerFieldNumberInElement = embCmd.getAbsolutePositionOfMember(ownerField);
                if (ownerFieldNumberInElement >= 0)
                {
                    embSM.replaceField(ownerFieldNumberInElement, ownerSM.getObject(), true);
                }
            }
        }
       
        // Register our owner now that we have our values set
        if (value != null && ownerSM != null)
        {
            embSM.addEmbeddedOwner(ownerSM, ownerFieldNumber);
        }

        return value;
    }
View Full Code Here

                            Object obj = om.findObject(api.getIdForObject(object), true, false, object.getClass().getName());
                            if (obj != null)
                            {
                                // PM.getObjectById creates a dummy object to represent this object and automatically
                                // enlists it in the txn. Evict it to avoid issues with reachability
                                StateManager objSM = om.findStateManager(obj);
                                if (objSM != null)
                                {
                                    om.evictFromTransaction(objSM);
                                }
                            }
                            exists = true;
                        }
                        catch (JPOXObjectNotFoundException onfe)
                        {
                            exists = false;
                        }
                    }
                }
                if (!exists)
                {
                    // Persist the object
                    om.persistObjectInternal(object, fieldValues, null, -1, StateManager.PC);
                    persisted = true;
                }
            }
            else
            {
                // Persistent, but is it flushed to the datastore?
                StateManager objectSM = om.findStateManager(object);
                if (objectSM.isWaitingToBeFlushedToDatastore())
                {
                    // Newly persistent but still not flushed (e.g in optimistic txn)
                    // Process any fieldValues
                    if (fieldValues != null)
                    {
                        objectSM.loadFieldValues(fieldValues);
                    }

                    // Now flush it
                    objectSM.flush();
                }
            }
        }
        return persisted;
    }
View Full Code Here

        {
            throw new JPOXException(LOCALISER.msg("041016",
                value.getClass(), value)).setFatal();
        }

        StateManager sm = om.findStateManager(value);

        try
        {
            ClassLoaderResolver clr = om.getClassLoaderResolver();

            // Check if the field is attributed in the datastore
            boolean hasDatastoreAttributedPrimaryKeyValues = hasDatastoreAttributedPrimaryKeyValues(
                om.getMetaDataManager(), om.getStoreManager(), clr);

            boolean inserted = false;
            if (ownerFieldNumber >= 0)
            {
                // Field mapping : is this field of the related object present in the datastore?
                inserted = om.isInserted(value, ownerFieldNumber);
            }
            else if (fmd == null)
            {
                // Identity mapping : is the object inserted far enough to be considered of this mapping type?
                inserted = om.isInserted(value, type);
            }

            if (sm != null)
            {
                if (om.getApiAdapter().isDetached(value) && sm.getReferencedPC() != null && ownerSM != null && fmd != null)
                {
                    // 1-1, N-1 mapping
                    // The value is really still detached but has a temporary StateManager whilst attaching so
                    // replace this field reference to be for the newly attached object
                    // Note that we have "fmd != null" here hence omitting any M-N relations where this is a join table
                    // mapping
                    ownerSM.replaceField(ownerFieldNumber, sm.getReferencedPC(), true);
                }

                if (sm.isWaitingToBeFlushedToDatastore())
                {
                    // Related object is not yet flushed to the datastore so flush it so we can set the FK
                    sm.flush();
                }
            }

            // we can execute this block when
            // 1) the pc has been inserted; OR
            // 2) is not in process of being inserted; OR
            // 3) is being inserted yet is inserted enough to use this mapping; OR
            // 4) the PC PK values are not attributed by the database and this mapping is for a PK field (compound identity)
            if (inserted || !om.isInserting(value) ||
                (!hasDatastoreAttributedPrimaryKeyValues && (this.fmd != null && this.fmd.isPrimaryKey())))
            {
                // The PC is either already inserted, or inserted down to the level we need, or not inserted at all,
                // or the field is a PK and identity not attributed by the datastore

                // Object either already exists, or is not yet being inserted.
                id = api.getIdForObject(value);

                // Check if the PersistenceCapable exists in this datastore
                boolean requiresPersisting = false;
                if (om.getApiAdapter().isDetached(value) && ownerSM != null)
                {
                    // Detached object so needs attaching
                    if (ownerSM.isInserting())
                    {
                        // Inserting other object, and this object is detached but if detached from this datastore
                        // we can just return the value now and attach later (in InsertRequest)
                        if (!om.getOMFContext().getPersistenceConfiguration().getBooleanProperty("org.jpox.attachSameDatastore"))
                        {
                            if (om.getObjectFromCache(api.getIdForObject(value)) != null)
                            {
                                // Object is in cache so exists for this datastore, so no point checking
                            }
                            else
                            {
                                try
                                {
                                    Object obj = om.findObject(api.getIdForObject(value), true, false,
                                        value.getClass().getName());
                                    if (obj != null)
                                    {
                                        // Make sure this object is not retained in cache etc
                                        StateManager objSM = om.findStateManager(obj);
                                        if (objSM != null)
                                        {
                                            om.evictFromTransaction(objSM);
                                        }
                                        om.removeObjectFromCache(value, api.getIdForObject(value), true, true);
                                    }
                                }
                                catch (JPOXObjectNotFoundException onfe)
                                {
                                    // Object doesnt yet exist
                                    requiresPersisting = true;
                                }
                            }
                        }
                    }
                    else
                    {
                        requiresPersisting = true;
                    }
                }
                else if (id == null)
                {
                    // Transient object, so we need to persist it
                    requiresPersisting = true;
                }
                else
                {
                    ObjectManager pcPM = ObjectManagerHelper.getObjectManager(value);
                    if (pcPM != null && om != pcPM)
                    {
                        throw new JPOXUserException(LOCALISER.msg("041015"), id);
                    }
                }

                if (requiresPersisting)
                {
                    // PERSISTENCE-BY-REACHABILITY
                    // This PC object needs persisting (new or detached) to do the "set"
                    if (fmd != null && !fmd.isCascadePersist() && !om.getApiAdapter().isDetached(value))
                    {
                        // Related PC object not persistent, but cant do cascade-persist so throw exception
                        if (JPOXLogger.REACHABILITY.isDebugEnabled())
                        {
                            JPOXLogger.REACHABILITY.debug(LOCALISER.msg("007006",
                                fmd.getFullFieldName()));
                        }
                        throw new ReachableObjectNotCascadedException(fmd.getFullFieldName(), value);
                    }

                    if (JPOXLogger.REACHABILITY.isDebugEnabled())
                    {
                        JPOXLogger.REACHABILITY.debug(LOCALISER.msg("007007",
                            fmd != null ? fmd.getFullFieldName() : null));
                    }

                    try
                    {
                        Object pcNew = om.persistObjectInternal(value, null, null, -1, StateManager.PC);
                        if (hasDatastoreAttributedPrimaryKeyValues)
                        {
                            om.flushInternal(false);
                        }
                        id = api.getIdForObject(pcNew);
                        if (om.getApiAdapter().isDetached(value) && ownerSM != null)
                        {
                            // Update any detached reference to refer to the attached variant
                            ownerSM.replaceField(ownerFieldNumber, pcNew, true);
                            int relationType = fmd.getRelationType(clr);
                            if (relationType == Relation.MANY_TO_ONE_BI)
                            {
                                // TODO Update the container to refer to the attached object
                                if (JPOXLogger.PERSISTENCE.isInfoEnabled())
                                {
                                    JPOXLogger.PERSISTENCE.info("PCMapping.setObject : object " + ownerSM.getInternalObjectId() +
                                        " has field " + ownerFieldNumber + " that is 1-N bidirectional." +
                                        " Have just attached the N side so should really update the reference in the 1 side collection" +
                                        " to refer to this attached object. Not yet implemented");
                                }
                            }
                            else if (relationType == Relation.ONE_TO_ONE_BI)
                            {
                                AbstractMemberMetaData[] relatedMmds = fmd.getRelatedMemberMetaData(clr);
                                // TODO Cater for more than 1 related field
                                StateManager relatedSM = om.findStateManager(pcNew);
                                relatedSM.replaceField(relatedMmds[0].getAbsoluteFieldNumber(), ownerSM.getObject(), true);
                            }
                        }
                    }
                    catch (NotYetFlushedException e)
                    {
View Full Code Here

        int relationType = fmd.getRelationType(clr);
        if (pc != null)
        {
            if (relationType == Relation.ONE_TO_ONE_BI)
            {
                StateManager otherSM = sm.getObjectManager().findStateManager(pc);
                AbstractMemberMetaData relatedMmd = fmd.getRelatedMemberMetaDataForObject(clr, sm.getObject(), pc);
                Object relatedValue = otherSM.provideField(relatedMmd.getAbsoluteFieldNumber());
                if (relatedValue == null)
                {
                    // Managed Relations : Other side not set so update it in memory
                    if (JPOXLogger.PERSISTENCE.isDebugEnabled())
                    {
                        JPOXLogger.PERSISTENCE.debug(LOCALISER.msg("041018",
                            StringUtils.toJVMIDString(sm.getObject()), fmd.getFullFieldName(),
                            StringUtils.toJVMIDString(pc), relatedMmd.getFullFieldName()));
                    }
                    otherSM.replaceField(relatedMmd.getAbsoluteFieldNumber(), sm.getObject(), false);
                }
                else if (relatedValue != sm.getObject())
                {
                    // Managed Relations : Other side is inconsistent so throw exception
                    throw new JPOXUserException(
                        LOCALISER.msg("041020",
                            StringUtils.toJVMIDString(sm.getObject()), fmd.getFullFieldName(),
                            StringUtils.toJVMIDString(pc),
                            StringUtils.toJVMIDString(relatedValue)));
                }
            }
            else if (relationType == Relation.MANY_TO_ONE_BI && relatedMmds[0].hasCollection())
            {
                // TODO Make sure we have this PC in the collection at the other side
                StateManager otherSM = sm.getObjectManager().findStateManager(pc);
                if (otherSM != null)
                {
                    // Managed Relations : add to the collection on the other side
                    Collection relatedColl = (Collection)otherSM.provideField(relatedMmds[0].getAbsoluteFieldNumber());
                    if (relatedColl != null && !(relatedColl instanceof SCOCollection))
                    {
                        // TODO Make sure the collection is a wrapper
                        boolean contained = relatedColl.contains(sm.getObject());
                        if (!contained)
View Full Code Here

            return;
        }

        if (pc != null)
        {
            StateManager otherSM = sm.getObjectManager().findStateManager(pc);
            if (otherSM == null)
            {
                ClassLoaderResolver clr = sm.getObjectManager().getClassLoaderResolver();
                int relationType = fmd.getRelationType(clr);
                if (relationType == Relation.ONE_TO_ONE_BI || relationType == Relation.MANY_TO_ONE_BI)
View Full Code Here

                {
                    // We're deleting the FK at this side so shouldnt be an issue
                    AbstractMemberMetaData relatedMmd = fmd.getRelatedMemberMetaDataForObject(clr, sm.getObject(), pc);
                    if (relatedMmd != null)
                    {
                        StateManager otherSM = sm.getObjectManager().findStateManager(pc);
                        if (otherSM != null)
                        {
                            // Managed Relations : 1-1 bidir, so null out the object at the other
                            if (JPOXLogger.PERSISTENCE.isDebugEnabled())
                            {
                                JPOXLogger.PERSISTENCE.debug(LOCALISER.msg("041019",
                                    StringUtils.toJVMIDString(pc), relatedMmd.getFullFieldName(),
                                    StringUtils.toJVMIDString(sm.getObject())));
                            }
                            otherSM.replaceField(relatedMmd.getAbsoluteFieldNumber(), null, true);
                        }
                    }
                }
            }
            else if (relationType == Relation.ONE_TO_ONE_BI && fmd.getMappedBy() != null)
            {
                // 1-1 with FK at other side
                DatastoreClass relatedTable = storeMgr.getDatastoreClass(relatedMmds[0].getClassName(), clr);
                JavaTypeMapping relatedMapping = relatedTable.getFieldMapping(relatedMmds[0]);
                boolean isNullable = relatedMapping.isNullable();
                StateManager otherSM = sm.getObjectManager().findStateManager(pc);
                if (dependent)
                {
                    if (isNullable)
                    {
                        // Null out the FK in the datastore using a direct update (since we are deleting)
                        otherSM.replaceField(relatedMmds[0].getAbsoluteFieldNumber(), null, true);
                        otherSM.getStoreManager().getPersistenceHandler().updateObject(otherSM, new int[]{relatedMmds[0].getAbsoluteFieldNumber()});
                    }
                    // Mark the other object for deletion
                    sm.getObjectManager().deleteObjectInternal(pc);
                }
                else if (!hasFK)
                {
                    if (isNullable())
                    {
                        // Null out the FK in the datastore using a direct update (since we are deleting)
                        otherSM.replaceField(relatedMmds[0].getAbsoluteFieldNumber(), null, true);
                        otherSM.getStoreManager().getPersistenceHandler().updateObject(otherSM, new int[]{relatedMmds[0].getAbsoluteFieldNumber()});
                    }
                    else
                    {
                        // TODO Remove it
                    }
                }
                else
                {
                    // User has a FK defined (in MetaData) so let the datastore take care of it
                }
            }
            else if (relationType == Relation.MANY_TO_ONE_BI)
            {
                StateManager otherSM = sm.getObjectManager().findStateManager(pc);
                if (relatedMmds[0].getJoinMetaData() == null)
                {
                    // N-1 with FK at this side
                    if (otherSM.isDeleting())
                    {
                        // Other object is being deleted too but this side has the FK so just delete this object
                    }
                    else
                    {
                        // Other object is not being deleted so delete it if necessary
                        if (dependent)
                        {
                            if (isNullable())
                            {
                                // TODO Datastore nullability info can be unreliable so try to avoid this call
                                // Null out the FK in the datastore using a direct update (since we are deleting)
                                sm.replaceField(fieldNumber, null, true);
                                sm.getStoreManager().getPersistenceHandler().updateObject(sm, new int[]{fieldNumber});
                            }

                            if (sm.getObjectManager().getApiAdapter().isDeleted(pc))
                            {
                                // Object is already tagged for deletion but we're deleting the FK so leave til flush()
                            }
                            else
                            {
                                // Mark the other object for deletion
                                sm.getObjectManager().deleteObjectInternal(pc);
                            }
                        }
                        else
                        {
                            // Managed Relations : remove element from collection/map
                            if (relatedMmds[0].hasCollection())
                            {
                                Collection otherColl = (Collection)otherSM.provideField(relatedMmds[0].getAbsoluteFieldNumber());
                                if (otherColl != null)
                                {
                                    // TODO Remove from any cached SCO collection
                                }
                            }
                            else if (relatedMmds[0].hasMap())
                            {
                                // TODO Cater for maps, but what is the key/value pair ?
                            }
                        }
                    }
                }
                else
                {
                    // N-1 with join table so no FK here so need to remove from Collection/Map first? (managed relations)
                    if (dependent)
                    {
                        // Mark the other object for deletion
                        sm.getObjectManager().deleteObjectInternal(pc);
                    }
                    else
                    {
                        // Managed Relations : remove element from collection/map
                        if (relatedMmds[0].hasCollection())
                        {
                            Collection otherColl = (Collection)otherSM.provideField(relatedMmds[0].getAbsoluteFieldNumber());
                            if (otherColl != null)
                            {
                                // TODO Add log message
                                otherColl.remove(sm.getObject());
                            }
View Full Code Here

                while (elementsIter.hasNext())
                {
                    Object elem = elementsIter.next();
                    if (api.isPersistable(elem))
                    {
                        StateManager sm = om.findStateManager(elem);
                        if (sm != null)
                        {
                            if (smsColl == null)
                            {
                                smsColl = new HashSet();
                            }
                            smsColl.add(sm);
                        }
                    }
                }
            }
            else if (value instanceof java.util.Map)
            {
                Iterator entriesIter = ((java.util.Map)value).entrySet().iterator();
                while (entriesIter.hasNext())
                {
                    Map.Entry entry = (Map.Entry)entriesIter.next();
                    Object key = entry.getKey();
                    Object val = entry.getValue();
                    if (api.isPersistable(key))
                    {
                        StateManager sm = om.findStateManager(key);
                        if (sm != null)
                        {
                            if (smsColl == null)
                            {
                                smsColl = new HashSet();
                            }
                            smsColl.add(sm);
                        }
                    }
                    if (api.isPersistable(val))
                    {
                        StateManager sm = om.findStateManager(val);
                        if (sm != null)
                        {
                            if (smsColl == null)
                            {
                                smsColl = new HashSet();
View Full Code Here

                      // Update any detached reference to refer to the attached variant
                      ownerSM.replaceField(ownerFieldNumber, pcNew, true);
                        int relationType = fmd.getRelationType(clr);
                        if (relationType == Relation.ONE_TO_ONE_BI)
                        {
                            StateManager relatedSM = om.findStateManager(pcNew);
                            AbstractMemberMetaData[] relatedMmds = fmd.getRelatedMemberMetaData(clr);
                            // TODO Allow for multiple related fields
                            relatedSM.replaceField(relatedMmds[0].getAbsoluteFieldNumber(), ownerSM.getObject(), true);
                        }
                        else if (relationType == Relation.MANY_TO_ONE_BI)
                        {
                            // TODO Update the container element with the attached variant
                            if (JPOXLogger.PERSISTENCE.isInfoEnabled())
                            {
                                JPOXLogger.PERSISTENCE.info("PCMapping.setObject : object " + ownerSM.getInternalObjectId() +
                                    " has field " + ownerFieldNumber +
                                    " that is 1-N bidirectional - should really update the reference in the relation. Not yet supported");
                            }
                        }
                  }
              }       
            if (getNumberOfDatastoreFields() <= 0)
            {
                // If the field doesnt map to any datastore fields, omit the set process
              return;
            }         
          }
        }

        Class type = null;
        StateManager sm = null;
        if (value != null)
        {
            sm = om.findStateManager(value);
        }
        try
        {
          if (pos == null)
          {
            return;
          }
          if (sm != null)
          {
              sm.setStoringPC();
          }

            MetaDataManager mmgr = om.getStoreManager().getOMFContext().getMetaDataManager();
          boolean isPersistentInterface = mmgr.getMetaDataForInterface(clr.classForName(getType()), clr) != null;
          if (isPersistentInterface)
          {
              // Field is declared as a "persistent-interface" type so all impls of that type should match
              type = clr.classForName(getType());
          }
          else if (fmd != null && fmd.getFieldTypes() != null && fmd.getFieldTypes().length == 1)
          {
              isPersistentInterface = mmgr.getMetaDataForInterface(clr.classForName(fmd.getFieldTypes()[0]), clr) != null;
              if (isPersistentInterface)
              {
                  // Field is declared as interface and accepts "persistent-interface" value, so all impls should match
                  type = clr.classForName(fmd.getFieldTypes()[0]);
              }
          }

          for (int i=0; i<javaTypeMappings.length; i++)
          {
              if (n >=pos.length)
              {
                //this means we store all implementations to the same columns, so we reset the index
                n = 0;
                }
              int[] posMapping;
              if (javaTypeMappings[i].getReferenceMapping() != null)
              {          
                  posMapping = new int[javaTypeMappings[i].getReferenceMapping().getNumberOfDatastoreFields()];             
              }
              else
              {
                posMapping = new int[javaTypeMappings[i].getNumberOfDatastoreFields()];
              }
              for (int j=0; j<posMapping.length; j++)
              {
                  posMapping[j] = pos[n++];
              }
              try
              {
                    if (!isPersistentInterface)
                    {
                        // Normal interface
                        type = clr.classForName(javaTypeMappings[i].getType());
                    }
                    if (value != null && type.isAssignableFrom(value.getClass()))
                    {
                        foundClassAssignableFromValue = true;
                        javaTypeMappings[i].setObject(om, ps, posMapping, value);
                    }
                    else
                    {
                        javaTypeMappings[i].setObject(om, ps, posMapping, null);
                    }
                }
              catch (NotYetFlushedException e)
              {
                  notYetFlushed = e;
              }
          }
          if (notYetFlushed != null)
          {
              throw notYetFlushed;
          }
        }
        finally
        {
            if (sm != null)
            {
                sm.unsetStoringPC();
            }         
        }
        if (value != null && !foundClassAssignableFromValue)
        {
            // as required by the JDO spec, a ClassCastException is thrown
View Full Code Here

TOP

Related Classes of org.jpox.StateManager

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.