Package org.exolab.castor.mapping.xml

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


        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

        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

        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

        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

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.