Examples of buildIdentity()


Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

    final IdentityFactory idf = (IdentityFactory) idfControl.getMock();

    Identity identity = new Identity(String.class, Object.class, new Object[] {"id"});
    pb.serviceIdentity();
    pbControl.setReturnValue(idf, 1);
    idf.buildIdentity(String.class, "id");
    idfControl.setReturnValue(identity, 1);
    pb.getObjectByIdentity(identity);
    pbControl.setReturnValue("", 1);
    pb.close();
    pbControl.setReturnValue(true, 1);
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

            Identity oid;
            Object obj;
            while(it.hasNext())
            {
                obj = it.next();
                oid = idFac.buildIdentity(obj);
                if(!hasTransientIdentity && oid.isTransient())
                {
                    hasTransientIdentity = true;
                }
                references.put(oid, obj);
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

                {
                    oid = (Identity) list.get(i);
                    if(oid.isTransient())
                    {
                        obj = references.remove(oid);
                        newOid = idFac.buildIdentity(obj);
                        references.put(newOid, obj);
                        if(!hasTransientIdentity && oid.isTransient())
                        {
                            hasTransientIdentity = true;
                        }
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

        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());
        }

        // build the children lists for the owners
        for (Iterator it = children.iterator(); it.hasNext();)
        {
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

            Object child = it.next();
            // BRJ: use cld for real class, relatedObject could be Proxy
            ClassDescriptor cld = getDescriptorRepository().getDescriptorFor(ProxyHelper.getRealClass(child));

            Object[] fkValues = cds.getForeignKeyValues(child, cld);
            Identity ownerId = identityFactory.buildIdentity(null, ownerTopLevelClass, fkValues);
            List list = (List) ownerIdsToLists.get(ownerId);
            if (list != null)
            {
                list.add(child);
            }
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

        // connect children list to owners
        for (Iterator it = owners.iterator(); it.hasNext();)
        {
            Object result;
            Object owner = it.next();
            Identity ownerId = identityFactory.buildIdentity(owner);
            List list = (List) ownerIdsToLists.get(ownerId);

            if ((collectionClass == null) && field.getType().isArray())
            {
                int length = list.size();
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

        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());
        }

        // build the children lists for the owners
        for (Iterator it = children.iterator(); it.hasNext();)
        {
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

            Object child = it.next();
            // BRJ: use cld for real class, relatedObject could be Proxy
            ClassDescriptor cld = getDescriptorRepository().getDescriptorFor(ProxyHelper.getRealClass(child));

            Object[] fkValues = cds.getForeignKeyValues(child, cld);
            Identity ownerId = identityFactory.buildIdentity(null, ownerTopLevelClass, fkValues);
            List list = (List) ownerIdsToLists.get(ownerId);
            if (list != null)
            {
                list.add(child);
            }
View Full Code Here

Examples of org.apache.ojb.broker.IdentityFactory.buildIdentity()

        // connect children list to owners
        for (Iterator it = owners.iterator(); it.hasNext();)
        {
            Object result;
            Object owner = it.next();
            Identity ownerId = identityFactory.buildIdentity(owner);
            List list = (List) ownerIdsToLists.get(ownerId);

            if ((collectionClass == null) && field.getType().isArray())
            {
                int length = list.size();
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.