Examples of XSClass


Examples of org.exolab.castor.builder.types.XSClass

    /**
     * Tests set and get of the _xml schema type.
     */
    public void testSchemaType() {
        JClass jClass = new JClass("Book");
        XSClass xsClass = new XSClass(jClass, "Book");
        _xml.setSchemaType(xsClass);
        assertEquals(xsClass, _xml.getSchemaType());
    }
View Full Code Here

Examples of org.exolab.castor.builder.types.XSClass

    /**
     * Test get foreign key method.
     */
    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.types.XSClass

    /**
     * Test add and get foreign key methods.
     */
    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.types.XSClass

    /**
     * Test add and get foreign key methods with multiple foreign keys.
     */
    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");
View Full Code Here

Examples of org.exolab.castor.builder.types.XSClass

     * Tests get and set of read only.
     */
    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.types.XSClass

     * Tests get and set of dirty.
     */
    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

Examples of org.exolab.castor.builder.types.XSClass

     * SetUp sets the PropertyHolder to test.
     */
    protected void setUp() throws Exception {
        FieldInfoFactory factory = new FieldInfoFactory();
        _holder = factory.createFieldInfo(
                new XSClass(new JClass("Book")), "isbn");
    }
View Full Code Here

Examples of org.exolab.castor.builder.types.XSClass

     * Tests get and set of column name.
     */
    public void testColumnName() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo isbn = factory.createFieldInfo(
                new XSClass(new JClass("Book")), "isbn");
        isbn.addNature(JDOFieldInfoNature.class.getName());
        JDOFieldInfoNature jdo = new JDOFieldInfoNature(isbn);

        jdo.setColumnName("ISBN");
        assertEquals("ISBN", jdo.getColumnName());
View Full Code Here

Examples of org.exolab.castor.builder.types.XSClass

     * Tests get and set of column type.
     */
    public void testColumnType() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo isbn = factory.createFieldInfo(
                new XSClass(new JClass("Book")), "isbn");
        isbn.addNature(JDOFieldInfoNature.class.getName());
        JDOFieldInfoNature jdo = new JDOFieldInfoNature(isbn);

        jdo.setColumnType("varchar");
        assertEquals("varchar", jdo.getColumnType());
View Full Code Here

Examples of org.exolab.castor.builder.types.XSClass

     * Tests get and set of read only.
     */
    public void testReadOnly() {
        FieldInfoFactory factory = new FieldInfoFactory();
        FieldInfo isbn = factory.createFieldInfo(
                new XSClass(new JClass("Book")), "isbn");
        isbn.addNature(JDOFieldInfoNature.class.getName());
        JDOFieldInfoNature jdo = new JDOFieldInfoNature(isbn);
        jdo.setReadOnly(true);
        assertEquals(true, jdo.isReadOnly());
    }
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.