Examples of serviceIdentity()


Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

            // replace the Identity too, maybe a temporary
            // used PK value was replaced by the real one,
            // see in docs SequenceManagerNativeImpl
            if(beforeImage != null)
            {
                oid = broker.serviceIdentity().buildIdentity(myObj);
            }
            if(currentImage != null)
            {
                beforeImage = currentImage;
            }
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

                    {
                        addReference(tempHandler.getIdentity(), tempObj);
                    }
                    else
                    {
                        addReference(broker.serviceIdentity().buildIdentity(tempObj), tempObj);
                    }
                }
            }
            finally
            {
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

     * @return the resulting ObjectEnvelope
     */
    public ObjectEnvelope get(Object pKey, boolean isNew)
    {
        PersistenceBroker broker = transaction.getBroker();
        Identity oid = broker.serviceIdentity().buildIdentity(pKey);
        return get(oid, pKey, isNew);
    }

    /**
     * retrieve an objects ObjectEnvelope state from the hashtable.
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

                while(it.hasNext())
                {
                    Object colObj =  it.next();
                    if(colObj != null)
                    {
                        Identity oid = pb.serviceIdentity().buildIdentity(colObj);
                        /*
                        arminw:
                        only when the main object need insert we start with FK assignment
                        of the 1:n and m:n relations. If the main objects need update (was already persisted)
                        it should be handled by the object state detection in ObjectEnvelope
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

            {
                Iterator it = BrokerHelper.getCollectionIterator(collOrArray);
                while(it.hasNext())
                {
                    Object colObj =  ProxyHelper.getRealObject(it.next());
                    Identity oid = pb.serviceIdentity().buildIdentity(colObj);
                    ObjectEnvelope colMod = get(oid, colObj, false);
                    if(cascadeDelete)
                    {
                        colMod.setModificationState(colMod.getModificationState().markDelete());
                        cascadeDeleteFor(colMod, alreadyPrepared);
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

            // replace the Identity too, maybe a temporary
            // used PK value was replaced by the real one,
            // see in docs SequenceManagerNativeImpl
            if(beforeImage != null)
            {
                oid = broker.serviceIdentity().buildIdentity(myObj);
            }
            if(currentImage != null)
            {
                beforeImage = currentImage;
            }
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

                    {
                        addReference(tempHandler.getIdentity(), tempObj);
                    }
                    else
                    {
                        addReference(broker.serviceIdentity().buildIdentity(tempObj), tempObj);
                    }
                }
            }
            finally
            {
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

        PersistenceBroker pb = getBroker();
        Class ownerTopLevelClass = pb.getTopLevelClass(getOwnerClassDescriptor().getClassOfObject());
        Class collectionClass = cds.getCollectionClass(); // this collection type will be used:
        HashMap ownerIdsToLists = new HashMap(owners.size());

        IdentityFactory identityFactory = pb.serviceIdentity();
        // initialize the owner list map
        for (Iterator it = owners.iterator(); it.hasNext();)
        {
            Object owner = it.next();
            ownerIdsToLists.put(identityFactory.buildIdentity(getOwnerClassDescriptor(), owner), new ArrayList());
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

        {
            try
            {
                PersistenceBroker broker = tx.getBroker();
                // build Identity to lookup entry
                Identity oid = broker.serviceIdentity().buildIdentity(NamedEntry.class, key);
                entry = (NamedEntry) broker.getObjectByIdentity(oid);
            }
            catch(Exception e)
            {
                log.error("Can't materialize bound object for key '" + key + "'", e);
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceIdentity()

            }
        }
        NamedEntry oldEntry = localLookup(name);
        if(oldEntry == null)
        {
            Identity oid = broker.serviceIdentity().buildIdentity(NamedEntry.class, name);
            oldEntry = (NamedEntry) broker.getObjectByIdentity(oid);
        }
        if(oldEntry != null)
        {
            throw new ObjectNameNotUniqueException("The name of the specified named object already exist, name=" + name);
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.