Package org.exolab.castor.xml.schema.annotations.jdo

Examples of org.exolab.castor.xml.schema.annotations.jdo.Column


        appInfos = annotation.getAppInfo();
        appInfo = (AppInfo) appInfos.nextElement();
        jdoContent = appInfo.getJdoContent();

        assertEquals(1, jdoContent.size());
        Column c = (Column) jdoContent.get(0);
        assertEquals("isbn", c.getName());
        assertEquals("jdo:string", c.getType());

        ElementDecl title = bookType.getElementDecl("title");
        annotations = title.getAnnotations();
        annotation = (Annotation) annotations.nextElement();
        appInfos = annotation.getAppInfo();
        appInfo = (AppInfo) appInfos.nextElement();
        jdoContent = appInfo.getJdoContent();

        assertEquals(1, jdoContent.size());
        c = (Column) jdoContent.get(0);
        assertEquals("title", c.getName());
        assertEquals("jdo:string", c.getType());
    }
View Full Code Here


        appInfos = annotation.getAppInfo();
        appInfo = (AppInfo) appInfos.nextElement();
        jdoContent = appInfo.getJdoContent();

        assertEquals(1, jdoContent.size());
        Column c = (Column) jdoContent.get(0);
        assertEquals("isbn", c.getName());
        assertEquals("varchar", c.getType());

        ElementDecl title = bookType.getElementDecl("title");
        annotations = title.getAnnotations();
        annotation = (Annotation) annotations.nextElement();
        appInfos = annotation.getAppInfo();
        appInfo = (AppInfo) appInfos.nextElement();
        jdoContent = appInfo.getJdoContent();

        assertEquals(1, jdoContent.size());
        c = (Column) jdoContent.get(0);
        assertEquals("title", c.getName());
        assertEquals("varchar", c.getType());
       
        ElementDecl author = bookType.getElementDecl("author");
        annotations = author.getAnnotations();
        annotation = (Annotation) annotations.nextElement();
        appInfos = annotation.getAppInfo();
View Full Code Here

        appInfos = annotation.getAppInfo();
        appInfo = (AppInfo) appInfos.nextElement();
        jdoContent = appInfo.getJdoContent();

        assertEquals(1, jdoContent.size());
        Column c = (Column) jdoContent.get(0);
        assertEquals("isbn", c.getName());
        assertEquals("varchar", c.getType());

        ElementDecl title = bookType.getElementDecl("title");
        annotations = title.getAnnotations();
        annotation = (Annotation) annotations.nextElement();
        appInfos = annotation.getAppInfo();
        appInfo = (AppInfo) appInfos.nextElement();
        jdoContent = appInfo.getJdoContent();

        assertEquals(1, jdoContent.size());
        c = (Column) jdoContent.get(0);
        assertEquals("title", c.getName());
        assertEquals("varchar", c.getType());
       
        ElementDecl author = bookType.getElementDecl("author");
        annotations = author.getAnnotations();
        annotation = (Annotation) annotations.nextElement();
        appInfos = annotation.getAppInfo();
View Full Code Here

                    while (it.hasNext()) {
                        Object tmpObject = it.next();
                        if (tmpObject instanceof Column) {
                            fInfo.addNature(JDOFieldInfoNature.class.getName());
                            JDOFieldInfoNature fNature = new JDOFieldInfoNature(fInfo);
                            Column column = (Column) tmpObject;
                            fNature.setColumnName(column.getName());
                            fNature.setColumnType(column.getType());
                            fNature.setReadOnly(column.isReadOnly());
                            fNature.setDirty(false);
                            fNature.setDirty(column.getDirty());
                        } else if (tmpObject instanceof OneToOne) {
                            OneToOne relation = (OneToOne) tmpObject;
                            fInfo.addNature(JDOOneToOneNature.class.getName());
                            JDOOneToOneNature oneNature = new JDOOneToOneNature(fInfo);
                            oneNature.addForeignKey(relation.getName());
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.schema.annotations.jdo.Column

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.