Examples of addFieldMapping()


Examples of org.exolab.castor.mapping.xml.ClassChoice.addFieldMapping()

            classMapping.setClassChoice(classChoice);
        }

        //-- create field mapping
        FieldMapping fieldMap = new FieldMapping();
        classChoice.addFieldMapping(fieldMap);
        String fieldName = member.getName();
        if (fieldName.charAt(0) == '_') {
            fieldName = fieldName.substring(1);
        }
        fieldMap.setName(fieldName);
View Full Code Here

Examples of org.exolab.castor.mapping.xml.ClassChoice.addFieldMapping()

        ClassChoice cc = resolveCm.getClassChoice();
        if (cc == null) {
            cc = new ClassChoice();
            resolveCm.setClassChoice(cc);
        }
        cc.addFieldMapping(resolveFm);

        Sql sql = new Sql();
        String[] sqlname = fm.getSql().getManyKey();
        if (sqlname == null || sqlname.length == 0) {
            _mappingHelper.getClassMappingSqlIdentity(cm, true);
View Full Code Here

Examples of org.exolab.castor.mapping.xml.ClassChoice.addFieldMapping()

        Sql ssnrSql = new Sql();
        ssnrSql.addName("ssnr");
        ssnrSql.setType("integer");
        ssnrFM.setSql(ssnrSql);
        ssnrFM.setType("long");
        choice.addFieldMapping(ssnrFM);

        //firstName field
        String firstNameFieldName = "firstName";
        FieldDescriptorImpl firstNameFieldDescr;
        FieldMapping firstNameFM = new FieldMapping();
View Full Code Here

Examples of org.exolab.castor.mapping.xml.ClassChoice.addFieldMapping()

        Sql firstNameSql = new Sql();
        firstNameSql.addName("firstName");
        firstNameSql.setType("varchar");
        firstNameFM.setSql(firstNameSql);
        firstNameFM.setType("java.lang.String");
        choice.addFieldMapping(firstNameFM);

        //lastName field
        String lastNameFieldName = "lastName";
        FieldDescriptorImpl lastNameFieldDescr;
        FieldMapping lastNameFM = new FieldMapping();
View Full Code Here

Examples of org.exolab.castor.mapping.xml.ClassChoice.addFieldMapping()

        Sql lastNameSql = new Sql();
        lastNameSql.addName("lastName");
        lastNameSql.setType("varchar");
        lastNameFM.setSql(lastNameSql);
        lastNameFM.setType("java.lang.String");
        choice.addFieldMapping(lastNameFM);

        setFields(new FieldDescriptor[] {firstNameFieldDescr,lastNameFieldDescr});
        setIdentities(new FieldDescriptor[] {ssnrFieldDescr});
    }
View Full Code Here

Examples of org.exolab.castor.mapping.xml.ClassMapping.addFieldMapping()

               
            //-- handle XML Specific information
            fieldMap.setBindXml( new BindXml() );
            fieldMap.getBindXml().setName( ( (XMLFieldDescriptor) fdesc ).getXMLName() );
            fieldMap.getBindXml().setNode( BindXmlNodeType.valueOf( ((XMLFieldDescriptor) fields[ i ]).getNodeType().toString() ) );
            classMap.addFieldMapping( fieldMap );
           
            if (deep) {
                if ( _mappings.get(fieldType) != null) continue;
                if (Types.isSimpleType(fieldType)) continue;               
                //-- recursive add needed classes
View Full Code Here

Examples of org.exolab.castor.mapping.xml.ClassMapping.addFieldMapping()

               
            //-- handle XML Specific information
            fieldMap.setBindXml( new BindXml() );
            fieldMap.getBindXml().setName( ( (XMLFieldDescriptor) fdesc ).getXMLName() );
            fieldMap.getBindXml().setNode( BindXmlNodeType.valueOf( ((XMLFieldDescriptor) fields[ i ]).getNodeType().toString() ) );
            classMap.addFieldMapping( fieldMap );
           
            if (deep) {
                if ( _mappings.get(fieldType) != null) continue;
                if (Types.isSimpleType(fieldType)) continue;               
                //-- recursive add needed classes
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.