Package org.eclipse.persistence.mappings.converters

Examples of org.eclipse.persistence.mappings.converters.EnumTypeConverter


       
        XMLDirectMapping enumeratedMapping = new XMLDirectMapping();
        enumeratedMapping.setAttributeName("m_enumerated");
        enumeratedMapping.setGetMethodName("getEnumerated");
        enumeratedMapping.setSetMethodName("setEnumerated");
        enumeratedMapping.setConverter(new EnumTypeConverter(enumeratedMapping, EnumType.class, false));
        enumeratedMapping.setXPath("orm:enumerated/text()");
        descriptor.addMapping(enumeratedMapping);
       
        descriptor.addMapping(getConvertMapping());
        descriptor.addMapping(getPropertiesMapping());
View Full Code Here


       
        XMLDirectMapping cacheTypeMapping = new XMLDirectMapping();
        cacheTypeMapping.setAttributeName("m_type");
        cacheTypeMapping.setGetMethodName("getType");
        cacheTypeMapping.setSetMethodName("setType");
        cacheTypeMapping.setConverter(new EnumTypeConverter(cacheTypeMapping, CacheType.class, false));
        cacheTypeMapping.setXPath("@type");
        descriptor.addMapping(cacheTypeMapping);
       
        XMLDirectMapping alwaysRefreshMapping = new XMLDirectMapping();
        alwaysRefreshMapping.setAttributeName("m_alwaysRefresh");
        alwaysRefreshMapping.setGetMethodName("getAlwaysRefresh");
        alwaysRefreshMapping.setSetMethodName("setAlwaysRefresh");
        alwaysRefreshMapping.setXPath("@always-refresh");
        descriptor.addMapping(alwaysRefreshMapping);
       
        XMLDirectMapping refreshOnlyIfNewerMapping = new XMLDirectMapping();
        refreshOnlyIfNewerMapping.setAttributeName("m_refreshOnlyIfNewer");
        refreshOnlyIfNewerMapping.setGetMethodName("getRefreshOnlyIfNewer");
        refreshOnlyIfNewerMapping.setSetMethodName("setRefreshOnlyIfNewer");
        refreshOnlyIfNewerMapping.setXPath("@refresh-only-if-newer");
        descriptor.addMapping(refreshOnlyIfNewerMapping);
       
        XMLDirectMapping disableHitsMapping = new XMLDirectMapping();
        disableHitsMapping.setAttributeName("m_disableHits");
        disableHitsMapping.setGetMethodName("getDisableHits");
        disableHitsMapping.setSetMethodName("setDisableHits");
        disableHitsMapping.setXPath("@disable-hits");
        descriptor.addMapping(disableHitsMapping);
       
        XMLDirectMapping coordinationTypeMapping = new XMLDirectMapping();
        coordinationTypeMapping.setAttributeName("m_coordinationType");
        coordinationTypeMapping.setGetMethodName("getCoordinationType");
        coordinationTypeMapping.setSetMethodName("setCoordinationType");
        coordinationTypeMapping.setConverter(new EnumTypeConverter(coordinationTypeMapping, CacheCoordinationType.class, false));
        coordinationTypeMapping.setXPath("@coordination-type");
        descriptor.addMapping(coordinationTypeMapping);
     
        return descriptor;
    }
View Full Code Here

   
        XMLDirectMapping typeMapping = new XMLDirectMapping();
        typeMapping.setAttributeName("m_type");
        typeMapping.setGetMethodName("getType");
        typeMapping.setSetMethodName("setType");
        typeMapping.setConverter(new EnumTypeConverter(typeMapping, ChangeTrackingType.class, false));
        typeMapping.setXPath("@type");
        descriptor.addMapping(typeMapping);
       
        return descriptor;       
    }
View Full Code Here

       
        XMLDirectMapping discriminatorTypeMapping = new XMLDirectMapping();
        discriminatorTypeMapping.setAttributeName("m_discriminatorType");
        discriminatorTypeMapping.setGetMethodName("getDiscriminatorType");
        discriminatorTypeMapping.setSetMethodName("setDiscriminatorType");
        discriminatorTypeMapping.setConverter(new EnumTypeConverter(discriminatorTypeMapping, DiscriminatorType.class, false));
        discriminatorTypeMapping.setXPath("@discriminator-type");
        descriptor.addMapping(discriminatorTypeMapping);
       
        descriptor.addMapping(getColumnDefinitionAttributeMapping());
        descriptor.addMapping(getLengthAttributeMapping());
View Full Code Here

       
        XMLDirectMapping strategyMapping = new XMLDirectMapping();
        strategyMapping.setAttributeName("m_strategy");
        strategyMapping.setGetMethodName("getStrategy");
        strategyMapping.setSetMethodName("setStrategy");
        strategyMapping.setConverter(new EnumTypeConverter(strategyMapping, GenerationType.class, false));
        strategyMapping.setXPath("@strategy");
        descriptor.addMapping(strategyMapping);
       
        XMLDirectMapping generatorMapping = new XMLDirectMapping();
        generatorMapping.setAttributeName("m_generator");
View Full Code Here

       
        XMLDirectMapping strategyMapping = new XMLDirectMapping();
        strategyMapping.setAttributeName("m_strategy");
        strategyMapping.setGetMethodName("getStrategy");
        strategyMapping.setSetMethodName("setStrategy");
        strategyMapping.setConverter(new EnumTypeConverter(strategyMapping, InheritanceType.class, false));
        strategyMapping.setXPath("@strategy");
        descriptor.addMapping(strategyMapping);
       
        return descriptor;
    }
View Full Code Here

       
        XMLDirectMapping typeMapping = new XMLDirectMapping();
        typeMapping.setAttributeName("m_type");
        typeMapping.setGetMethodName("getType");
        typeMapping.setSetMethodName("setType");
        typeMapping.setConverter(new EnumTypeConverter(typeMapping, OptimisticLockingType.class, false));
        typeMapping.setXPath("@type");
        descriptor.addMapping(typeMapping);
       
        XMLDirectMapping cascadeMapping = new XMLDirectMapping();
        cascadeMapping.setAttributeName("m_cascade");
View Full Code Here

   
        XMLDirectMapping directionMapping = new XMLDirectMapping();
        directionMapping.setAttributeName("m_direction");
        directionMapping.setGetMethodName("getDirection");
        directionMapping.setSetMethodName("setDirection");
        directionMapping.setConverter(new EnumTypeConverter(directionMapping, Direction.class, false));
        directionMapping.setXPath("@direction");
        descriptor.addMapping(directionMapping);
       
        descriptor.addMapping(getNameAttributeMapping());
       
View Full Code Here

    protected XMLDirectMapping getExistenceCheckingAttributeMapping() {
        XMLDirectMapping existenceCheckingMapping = new XMLDirectMapping();
        existenceCheckingMapping.setAttributeName("m_existenceChecking");
        existenceCheckingMapping.setGetMethodName("getExistenceChecking");
        existenceCheckingMapping.setSetMethodName("setExistenceChecking");
        existenceCheckingMapping.setConverter(new EnumTypeConverter(existenceCheckingMapping, ExistenceType.class, false));
        existenceCheckingMapping.setXPath("@existence-checking");
        return existenceCheckingMapping;
    }
View Full Code Here

    protected XMLDirectMapping getFetchAttributeMapping() {
        XMLDirectMapping fetchMapping = new XMLDirectMapping();
        fetchMapping.setAttributeName("m_fetch");
        fetchMapping.setGetMethodName("getFetch");
        fetchMapping.setSetMethodName("setFetch");
        fetchMapping.setConverter(new EnumTypeConverter(fetchMapping, FetchType.class, false));
        fetchMapping.setXPath("@fetch");
        return fetchMapping;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.mappings.converters.EnumTypeConverter

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.