Examples of addNature()


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

                new JClass("Book")), "title");
        // Set node type
        attributeField.addNature(XMLInfoNature.class.getName());
        new XMLInfoNature(attributeField).setNodeType(NodeType.ATTRIBUTE);
        // Set column name
        attributeField.addNature(JDOFieldInfoNature.class.getName());
        jdoField = new JDOFieldInfoNature(attributeField);
        jdoField.setColumnName("title");
        classInfo.addFieldInfo(attributeField);
       
        FieldInfo textField = factory.createFieldInfo(new XSClass(
View Full Code Here

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

        classInfo.addFieldInfo(attributeField);
       
        FieldInfo textField = factory.createFieldInfo(new XSClass(
                new JClass("Book")), "price");
        // Set node type
        textField.addNature(XMLInfoNature.class.getName());
        new XMLInfoNature(textField).setNodeType(NodeType.TEXT);
        // Set column name
        textField.addNature(JDOFieldInfoNature.class.getName());
        jdoField = new JDOFieldInfoNature(textField);
        jdoField.setColumnName("price");
View Full Code Here

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

                new JClass("Book")), "price");
        // Set node type
        textField.addNature(XMLInfoNature.class.getName());
        new XMLInfoNature(textField).setNodeType(NodeType.TEXT);
        // Set column name
        textField.addNature(JDOFieldInfoNature.class.getName());
        jdoField = new JDOFieldInfoNature(textField);
        jdoField.setColumnName("price");
        classInfo.addFieldInfo(textField);
       
        // Add JDO Nature to ClassInfo.
View Full Code Here

Examples of org.exolab.castor.mapping.loader.ClassDescriptorImpl.addNature()

        }

        JPAClassNature nature = new JPAClassNature(classInfo);

        ClassDescriptorImpl descriptor = new ClassDescriptorImpl();
        descriptor.addNature(ClassDescriptorJDONature.class.getName());
        ClassDescriptorJDONature jdoNature = new ClassDescriptorJDONature(
                descriptor);

        /*
         * set classDescriptor infos
View Full Code Here

Examples of org.exolab.castor.mapping.loader.ClassDescriptorImpl.addNature()

            return null;
        }

        // Create the class descriptor, and register the JDO nature with it.
        ClassDescriptorImpl clsDesc = new ClassDescriptorImpl();
        clsDesc.addNature(ClassDescriptorJDONature.class.getName());
        ClassDescriptorJDONature jdoNature = new ClassDescriptorJDONature(clsDesc);
       
        // Set reference to class mapping on class descriptor.
        clsDesc.setMapping(classMapping);
       
View Full Code Here

Examples of org.exolab.castor.mapping.loader.FieldDescriptorImpl.addNature()

        }

        // Instantiate title field descriptor
        idFieldDescr = new FieldDescriptorImpl(idFieldName, idType, idHandler, false);
       
        idFieldDescr.addNature(FieldDescriptorJDONature.class.getName());
        FieldDescriptorJDONature idJdoNature = new FieldDescriptorJDONature(idFieldDescr);
       
        idJdoNature.setSQLName(new String[] { idFieldName });
        idJdoNature.setSQLType(new int[] { SQLTypeInfos.javaType2sqlTypeNum(java.lang.Integer.class) });
        idJdoNature.setManyKey(null);
View Full Code Here

Examples of org.exolab.castor.mapping.loader.FieldDescriptorImpl.addNature()

        descriptor.setRequired(false);

        /*
         * FieldDescriptorJDONature
         */
        descriptor.addNature(FieldDescriptorJDONature.class.getName());
        FieldDescriptorJDONature jdoNature = new FieldDescriptorJDONature(
                descriptor);

        /*
         * working!
 
View Full Code Here

Examples of org.exolab.castor.mapping.loader.FieldDescriptorImpl.addNature()

        }

        // create FieldDescriptor(Impl) instance, and apply JDO nature
        FieldDescriptorImpl fieldDescriptor =
            new FieldDescriptorImpl(fieldName, typeInfo, handler, fieldMap.getTransient());
        fieldDescriptor.addNature(FieldDescriptorJDONature.class.getName());
       
        fieldDescriptor.setRequired(fieldMap.getRequired());

        // If we're using an ExtendedFieldHandler we need to set the FieldDescriptor
        if (exfHandler != null) {
View Full Code Here

Examples of org.exolab.castor.mapping.loader.FieldDescriptorImpl.addNature()

        } catch (NoSuchMethodException e1) {
            throw new RuntimeException(e1.getMessage());
        }
        // Instantiate ssnr field descriptor
        ssnrFieldDescr = new FieldDescriptorImpl(ssnrFieldName, ssnrType,ssnrHandler, false);
        ssnrFieldDescr.addNature(FieldDescriptorJDONature.class.getName());
        FieldDescriptorJDONature ssnrFieldJdoNature = new FieldDescriptorJDONature(ssnrFieldDescr);
        ssnrFieldJdoNature.setSQLName(new String[] { "ssnr" });
        ssnrFieldJdoNature.setSQLType(new int[] {SQLTypeInfos.javaType2sqlTypeNum(java.lang.Long.class) });
        ssnrFieldJdoNature.setManyTable(null);
        ssnrFieldJdoNature.setManyKey(new String[] {});
View Full Code Here

Examples of org.exolab.castor.mapping.loader.FieldDescriptorImpl.addNature()

        } catch (NoSuchMethodException e1) {
            throw new RuntimeException(e1.getMessage());
        }
        // Instantiate firstName field descriptor
        firstNameFieldDescr = new FieldDescriptorImpl(firstNameFieldName, firstNameType,firstNameHandler, false);
        firstNameFieldDescr.addNature(FieldDescriptorJDONature.class.getName());
        FieldDescriptorJDONature firstNameFieldJdoNature = new FieldDescriptorJDONature(firstNameFieldDescr);
        firstNameFieldJdoNature.setSQLName(new String[] { "firstName" });
        firstNameFieldJdoNature.setSQLType(new int[] {SQLTypeInfos.javaType2sqlTypeNum(java.lang.String.class) });
        firstNameFieldJdoNature.setManyTable(null);
        firstNameFieldJdoNature.setManyKey(new String[] {});
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.