Package javax.jdo.identity

Examples of javax.jdo.identity.StringIdentity


            }
           
        } else {

            if("s".equals(distinguisher)) {
                return new StringIdentity(objectTypeClassFor(oid), keyStr);
            }
            if("i".equals(distinguisher)) {
                return new IntIdentity(objectTypeClassFor(oid), keyStr);
            }
            if("l".equals(distinguisher)) {
View Full Code Here


        {
            throw new ClassCastException("key class is not javax.jdo.identity.StringIdentity or null");
        }
        else
        {
            StringIdentity o = (StringIdentity) oid;
            className = o.getKey();
            return;
        }
    }
View Full Code Here

        }
    }

    public final Object jdoNewObjectIdInstance()
    {
        return new StringIdentity(getClass(), className);
    }
View Full Code Here

        {
            throw new IllegalArgumentException("key is null");
        }
        if (!(key instanceof String))
        {
            return new StringIdentity(getClass(), (String) key);
        }
        else
        {
            return new StringIdentity(getClass(), (String) key);
        }
    }
View Full Code Here

            }
           
        } else {

            if("s".equals(firstPart)) {
                return new StringIdentity(objectTypeClassFor(oid), keyStr);
            }
            if("i".equals(firstPart)) {
                return new IntIdentity(objectTypeClassFor(oid), keyStr);
            }
            if("l".equals(firstPart)) {
View Full Code Here

        assertNotNull(entity.getForceOwner().getId(), "Force.com Owner id was not found");
        assertNotNull(entity.getForceOwner().getName(), "Force.com Owner name was not found");
       
        // Assert that the Force.com Owner is in the cache
        ObjectManager om = (ObjectManager) em.getDelegate();
        assertNotNull(om.getObjectFromCache(new StringIdentity(ForceOwner.class, entity.getForceOwner().getId())));
        tx.commit();
       
        // Force.com Owner is eagerly fetched on AccountCustomFields so
        // it should be available outside of the find transaction
        assertNotNull(entity.getForceOwner(), "Force.com Owner field did not get eagerly fetched");
View Full Code Here

                } catch (Exception e) {
                    throw new NucleusUserException(e.getMessage(), e);
                }
            } else {
                // We return just a hollow object with ID that will have its fields fetched later
                return ec.findObject(new StringIdentity(ammd.getType(), (String) o), false, false, ammd.getTypeName());

            }
        case picklist:
            if (ammd.getType().isEnum()) {
                if (PersistenceUtils.isOrdinalEnum(ammd))
View Full Code Here

        Object ret = null;
        AbstractMemberMetaData ammd = acmd.getMetaDataForManagedMemberAtAbsolutePosition(acmd.getPKMemberPositions()[0]);
        try {
            ret = PersistenceUtils.getMemberValue(acmd, acmd.getPKMemberPositions()[0], entity);
            if (ret instanceof String) {
                ret = new StringIdentity(ammd.getType(), (String) ret);
            }
            return ret;
        } catch (Exception e) {
            throw new NucleusDataStoreException(e.getMessage(), e);
        }
View Full Code Here

TOP

Related Classes of javax.jdo.identity.StringIdentity

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.