Examples of ExportedKey


Examples of org.apache.cayenne.map.naming.ExportedKey

public class BasicNamingStrategyTest extends TestCase {
    public void testStrategy() throws Exception {
        BasicNamingStrategy strategy = new BasicNamingStrategy();
       
        ExportedKey key = new ExportedKey("ARTIST", "ARTIST_ID", null,
                "PAINTING", "ARTIST_ID", null);
        assertEquals(strategy.createDbRelationshipName(key, false), "toArtist");
        assertEquals(strategy.createDbRelationshipName(key, true), "paintingArray");
       
        key = new ExportedKey("PERSON", "PERSON_ID", null,
                "PERSON", "MOTHER_ID", null);
        assertEquals(strategy.createDbRelationshipName(key, false), "toPerson");
        assertEquals(strategy.createDbRelationshipName(key, true), "personArray");
       
        assertEquals(strategy.createObjEntityName(new DbEntity("ARTIST")), "Artist");
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.