Examples of toObjectId()


Examples of org.apache.cayenne.lifecycle.id.EntityIdCoder.toObjectId()

            }
            else {
                query = queriesByEntity.get(entityName);
            }

            ObjectId id = coder.toObjectId(uuid);
            Expression idExp = ExpressionFactory.matchAllDbExp(
                    id.getIdSnapshot(),
                    Expression.EQUAL_TO);
            query.orQualifier(idExp);
        }
View Full Code Here

Examples of org.apache.cayenne.lifecycle.id.EntityIdCoder.toObjectId()

        ObjectId id = new ObjectId("x", "ID", 3);

        EntityIdCoder coder = new EntityIdCoder(entity);
        assertEquals("x:3", coder.toStringId(id));

        ObjectId parsedId = coder.toObjectId("x:3");
        assertEquals(id, parsedId);
    }

    public void testSingleLongPk() {
        DbEntity dbEntity = new DbEntity("X");
View Full Code Here

Examples of org.apache.cayenne.lifecycle.id.EntityIdCoder.toObjectId()

        ObjectId id = new ObjectId("x", "ID", 3l);

        EntityIdCoder coder = new EntityIdCoder(entity);
        assertEquals("x:3", coder.toStringId(id));

        ObjectId parsedId = coder.toObjectId("x:3");
        assertEquals(id, parsedId);
    }

    public void testSingleStringPk() {
        DbEntity dbEntity = new DbEntity("X");
View Full Code Here

Examples of org.apache.cayenne.lifecycle.id.EntityIdCoder.toObjectId()

        EntityIdCoder coder = new EntityIdCoder(entity);

        ObjectId id = new ObjectId("x", "ID", "AbC");
        assertEquals("x:AbC", coder.toStringId(id));

        ObjectId parsedId = coder.toObjectId("x:AbC");
        assertEquals(id, parsedId);
    }

    public void testIdEncoding() {
        DbEntity dbEntity = new DbEntity("X");
View Full Code Here

Examples of org.apache.cayenne.lifecycle.id.EntityIdCoder.toObjectId()

        EntityIdCoder coder = new EntityIdCoder(entity);

        ObjectId id = new ObjectId("x", "ID", "Ab:C");
        assertEquals("x:Ab%3AC", coder.toStringId(id));

        ObjectId parsedId = coder.toObjectId("x:Ab%3AC");
        assertEquals(id, parsedId);
    }

    public void testMixedCompoundPk() {
        DbEntity dbEntity = new DbEntity("X");
View Full Code Here

Examples of org.apache.cayenne.lifecycle.id.EntityIdCoder.toObjectId()

        idMap.put("ABC", 6783463l);
        idMap.put("ZZZ", "'_'");
        ObjectId id = new ObjectId("x", idMap);
        assertEquals("x:6783463:X%3BY:%27_%27", coder.toStringId(id));

        ObjectId parsedId = coder.toObjectId("x:6783463:X%3BY:%27_%27");
        assertEquals(id, parsedId);
    }
}
View Full Code Here

Examples of org.apache.cayenne.lifecycle.id.EntityIdCoder.toObjectId()

            }
            else {
                query = queriesByEntity.get(entityName);
            }

            ObjectId id = coder.toObjectId(uuid);
            Expression idExp = ExpressionFactory.matchAllDbExp(
                    id.getIdSnapshot(),
                    Expression.EQUAL_TO);
            query.orQualifier(idExp);
        }
View Full Code Here

Examples of org.apache.cayenne.lifecycle.uuid.UuidCoder.toObjectId()

     */
    public Object getReferenceable(ObjectContext context, String uuid) {

        String entityName = UuidCoder.getEntityName(uuid);
        UuidCoder coder = getCoder(entityName);
        ObjectId oid = coder.toObjectId(uuid);
        return Cayenne.objectForPK(context, oid);
    }

    public String getUuid(Object referenceable) {

View Full Code Here

Examples of org.apache.cayenne.lifecycle.uuid.UuidCoder.toObjectId()

            }
            else {
                query = queriesByEntity.get(entityName);
            }

            ObjectId id = coder.toObjectId(uuid);
            Expression idExp = ExpressionFactory.matchAllDbExp(
                    id.getIdSnapshot(),
                    Expression.EQUAL_TO);
            query.orQualifier(idExp);
        }
View Full Code Here

Examples of org.apache.cayenne.lifecycle.uuid.UuidCoder.toObjectId()

        ObjectId id = new ObjectId("x", "ID", 3);

        UuidCoder coder = new UuidCoder(entity);
        assertEquals("x:3", coder.toUuid(id));

        ObjectId parsedId = coder.toObjectId("x:3");
        assertEquals(id, parsedId);
    }

    public void testSingleLongPk() {
        DbEntity dbEntity = new DbEntity("X");
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.