Package org.apache.cayenne.map.naming

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


     * Listeners of merge process.
     */
    protected List<EntityMergeListener> listeners;

    public EntityMergeSupport(DataMap map) {
        this(map, new BasicNamingStrategy(), true);
    }
View Full Code Here


    /**
     * Creates new DbLoader.
     */
    public DbLoader(Connection connection, DbAdapter adapter, DbLoaderDelegate delegate) {
        this(connection, adapter, delegate, new BasicNamingStrategy());
    }
View Full Code Here

    /**
     * Creates new DbLoader.
     */
    public DbLoader(Connection connection, DbAdapter adapter, DbLoaderDelegate delegate) {
        this(connection, adapter, delegate, new BasicNamingStrategy());
    }
View Full Code Here

     * Listeners of merge process.
     */
    protected List<EntityMergeListener> listeners;

    public EntityMergeSupport(DataMap map) {
        this(map, new BasicNamingStrategy(), true);
    }
View Full Code Here

    /**
     * Creates new DbLoader.
     */
    public DbLoader(Connection connection, DbAdapter adapter,
            DbLoaderDelegate delegate) {
        this(connection, adapter, delegate, new BasicNamingStrategy());
    }
View Full Code Here

    /**
     * Creates new DbLoader.
     */
    public DbLoader(Connection connection, DbAdapter adapter, DbLoaderDelegate delegate) {
        this(connection, adapter, delegate, new BasicNamingStrategy());
    }
View Full Code Here

import org.apache.cayenne.map.naming.BasicNamingStrategy;
import 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");
        assertEquals(strategy.createObjEntityName(new DbEntity("ARTIST_WORK")), "ArtistWork");
       
        assertEquals(strategy.createObjAttributeName(new DbAttribute("NAME")), "name");
        assertEquals(strategy.createObjAttributeName(new DbAttribute("ARTIST_NAME")), "artistName");
       
        assertEquals(strategy.createObjRelationshipName(new DbRelationship("toArtist")), "toArtist");
        assertEquals(strategy.createObjRelationshipName(new DbRelationship("paintingArray")), "paintingArray");
    }
View Full Code Here

     * Listeners of merge process.
     */
    protected List<EntityMergeListener> listeners;

    public EntityMergeSupport(DataMap map) {
        this(map, new BasicNamingStrategy(), true);
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.map.naming.BasicNamingStrategy

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.