Examples of addNature()


Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testGetForeignKeyNothingAdded() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo address = factory.createFieldInfo(new XSClass(new JClass(
                "Employee")), "address");
        address.addNature(JDOOneToOneNature.class.getName());
        JDOOneToOneNature relation = new JDOOneToOneNature(address);
        assertNull(relation.getForeignKeys());
    }
   
    /**
 
View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testAddGetForeignKey() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo address = factory.createFieldInfo(new XSClass(new JClass(
                "Employee")), "address");
        address.addNature(JDOOneToOneNature.class.getName());
        JDOOneToOneNature relation = new JDOOneToOneNature(address);
        relation.addForeignKey("fk_address");
        assertEquals("fk_address", (String) relation.getForeignKeys().get(0));
    }

View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testAddGetForeignKeys() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo address = factory.createFieldInfo(new XSClass(new JClass(
                "Employee")), "token");
        address.addNature(JDOOneToOneNature.class.getName());
        JDOOneToOneNature relation = new JDOOneToOneNature(address);
        relation.addForeignKey("fk_sin");
        relation.addForeignKey("fk_dateofbirth");
       
        List keys = relation.getForeignKeys();
View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testReadOnly() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo address = factory.createFieldInfo(
                new XSClass(new JClass("Employee")), "address");
        address.addNature(JDOOneToOneNature.class.getName());
        JDOOneToOneNature relation = new JDOOneToOneNature(address);
        relation.setReadOnly(true);
        assertEquals(true, relation.isReadOnly());
    }

View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testDirty() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo address = factory.createFieldInfo(
                new XSClass(new JClass("Employee")), "address");
        address.addNature(JDOOneToOneNature.class.getName());
        JDOOneToOneNature jdo = new JDOOneToOneNature(address);
        jdo.setDirty(true);
        assertEquals(true, jdo.isDirty());
    }

View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testGetForeignKeyNothingAdded() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo flat = factory.createFieldInfo(new XSClass(new JClass(
                "House")), "flat");
        flat.addNature(JDOOneToManyNature.class.getName());
        JDOOneToManyNature relation = new JDOOneToManyNature(flat);
        assertNull(relation.getForeignKeys());
    }
   
    /**
 
View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testAddGetForeignKey() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo flat = factory.createFieldInfo(new XSClass(new JClass(
                "House")), "flat");
        flat.addNature(JDOOneToManyNature.class.getName());
        JDOOneToManyNature relation = new JDOOneToManyNature(flat);
        relation.addForeignKey("fk_flat");
        assertEquals("fk_flat", (String) relation.getForeignKeys().get(0));
    }

View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testAddGetForeignKeys() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo flat = factory.createFieldInfo(new XSClass(new JClass(
                "House")), "token");
        flat.addNature(JDOOneToManyNature.class.getName());
        JDOOneToManyNature relation = new JDOOneToManyNature(flat);
        relation.addForeignKey("fk_1");
        relation.addForeignKey("fk_2");
       
        List keys = relation.getForeignKeys();
View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testReadOnly() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo flat = factory.createFieldInfo(
                new XSClass(new JClass("House")), "flat");
        flat.addNature(JDOOneToManyNature.class.getName());
        JDOOneToManyNature relation = new JDOOneToManyNature(flat);
        relation.setReadOnly(true);
        assertEquals(true, relation.isReadOnly());
    }

View Full Code Here

Examples of org.exolab.castor.builder.info.FieldInfo.addNature()

     */
    public void testDirty() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo flat = factory.createFieldInfo(
                new XSClass(new JClass("House")), "flat");
        flat.addNature(JDOOneToManyNature.class.getName());
        JDOOneToManyNature jdo = new JDOOneToManyNature(flat);
        jdo.setDirty(true);
        assertEquals(true, jdo.isDirty());
    }
}
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.