Examples of serviceIdentity()


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

            fkValues = ord.getForeignKeyValues(owner,cld);
            if (isNull(fkValues))
            {
                continue;
            }
            id = pb.serviceIdentity().buildIdentity(null, topLevelClass, fkValues);
            if (cache.lookup(id) != null)
            {
                children.add(pb.getObjectByIdentity(id));
                continue;
            }
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()

        {
            PersistenceBroker broker = null;
            try
            {
                broker = PersistenceBrokerFactory.defaultPersistenceBroker();
                return (PerfArticle) broker.getObjectByIdentity(broker.serviceIdentity().buildIdentity(PerfArticleImpl.class, articleId));
            }
            finally
            {
                if (broker != null) broker.close();
            }
View Full Code Here

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

        HashMap realSubjectsMap = new HashMap(realSubjects.size());

        for (Iterator it = realSubjects.iterator(); it.hasNext(); )
        {
            realSubject = it.next();
            realSubjectsMap.put(pb.serviceIdentity().buildIdentity(realSubject), realSubject);
        }

        for (Iterator it = proxies.iterator(); it.hasNext(); )
        {
            proxy = it.next();
View Full Code Here

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

        Iterator iter = owners.iterator();
        while (iter.hasNext())
        {
            owner = iter.next();
            id = pb.serviceIdentity().buildIdentity(cld, owner);
            idsSubset.add(id);
            if (idsSubset.size() == pkLimit)
            {
                queries.add(buildMtoNImplementorQuery(idsSubset));
                idsSubset.clear();
View Full Code Here

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

        // initialize the owner list map
        for (Iterator it = owners.iterator(); it.hasNext();)
        {
            Object owner = it.next();
            Identity oid = pb.serviceIdentity().buildIdentity(owner);
            ownerIdsToLists.put(oid, new ArrayList());
        }

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

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

        // build the children map
        for (Iterator it = children.iterator(); it.hasNext();)
        {
            Object child = it.next();
            Identity oid = pb.serviceIdentity().buildIdentity(child);
            childMap.put(oid, child);
        }

        int ownerPkLen = getOwnerClassDescriptor().getPkFields().length;
        int childPkLen = getItemClassDescriptor().getPkFields().length;
View Full Code Here

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

            // BRJ: apply the FieldConversions, OJB296
            ownerPk = convert(ownerFc, ownerPk);
            childPk = convert(childFc, childPk);

            Identity ownerId = pb.serviceIdentity().buildIdentity(null, ownerTopLevelClass, ownerPk);
            Identity childId = pb.serviceIdentity().buildIdentity(null, childTopLevelClass, childPk);

            // Identities may not be equal due to type-mismatch
            Collection list = (Collection) ownerIdsToLists.get(ownerId);
            Object child = childMap.get(childId);
View Full Code Here

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

            // BRJ: apply the FieldConversions, OJB296
            ownerPk = convert(ownerFc, ownerPk);
            childPk = convert(childFc, childPk);

            Identity ownerId = pb.serviceIdentity().buildIdentity(null, ownerTopLevelClass, ownerPk);
            Identity childId = pb.serviceIdentity().buildIdentity(null, childTopLevelClass, childPk);

            // Identities may not be equal due to type-mismatch
            Collection list = (Collection) ownerIdsToLists.get(ownerId);
            Object child = childMap.get(childId);
            list.add(child);
View Full Code Here

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

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

            List list = (List) ownerIdsToLists.get(ownerId);

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