Examples of EnumType


Examples of org.apache.cocoon.woody.datatype.typeimpl.EnumType

     * @throws ParserConfigurationException
     */
    public void testGenerateSaxFragmentNullable() throws Exception {
        DOMBuilder dest = new DOMBuilder();
        EnumSelectionList list =
            new EnumSelectionList(Sex.class.getName(), new EnumType(), true);
        list.generateSaxFragment(dest, Locale.ENGLISH);
        ResourceSource expectedSource =
            new ResourceSource("resource://org/apache/cocoon/woody/datatype/EnumSelectionListTestCase.dest.xml");
        Document expected = parser.parse(expectedSource.getInputStream());
        assertEqual("Test if output is what is expected",
View Full Code Here

Examples of org.hibernate.type.EnumType

    }
    else if ( type instanceof CustomType ) {
      CustomType cType = (CustomType) type;
      final UserType userType = cType.getUserType();
      if ( userType instanceof EnumType ) {
        EnumType enumType = (EnumType) userType;
        //should we cache that (the key must be enumClass / isOrdinal
        return new org.hibernate.ogm.type.impl.EnumType( cType, enumType );
      }
      //let it go it will eventually fail
    }
View Full Code Here

Examples of org.jooq.EnumType

            // ... and also for enum types
            else if (EnumType.class.isAssignableFrom(type)) {
                render.sql(getBindVariable(render));

                // [#968] Don't cast "synthetic" enum types (note, val can be null!)
                EnumType e = (EnumType) type.getEnumConstants()[0];
                Schema schema = e.getSchema();

                if (schema != null) {
                    render.sql("::");

                    schema = using(render.configuration()).map(schema);
                    if (schema != null && TRUE.equals(render.configuration().settings().isRenderSchema())) {
                        render.visit(schema);
                        render.sql(".");
                    }

                    render.visit(name(e.getName()));
                }
            }

            else {
                render.sql(getBindVariable(render));
View Full Code Here

Examples of org.jooq.util.jaxb.EnumType

        List<EnumType> enumTypes = new ArrayList<EnumType>();
        for (String property : properties.stringPropertyNames()) {
            if (property.startsWith("generator.database.enum-type.")) {
                String name = property.replace("generator.database.enum-type.", "");

                EnumType type = new EnumType();
                type.setName(name);
                type.setLiterals(properties.getProperty(property));
                enumTypes.add(type);
            }
        }

        List<ForcedType> forcedTypes = new ArrayList<ForcedType>();
        for (String property : properties.stringPropertyNames()) {
            if (property.startsWith("generator.database.forced-type.")) {
                String name = property.replace("generator.database.forced-type.", "");

                ForcedType type = new ForcedType();
                type.setName(name);
                type.setExpressions(properties.getProperty(property));
                forcedTypes.add(type);
            }
        }

      org.jooq.util.jaxb.Database database = new org.jooq.util.jaxb.Database();
View Full Code Here

Examples of org.qi4j.api.type.EnumType

            return model.valueType();
        }
        else if( EnumType.isEnum( type ) )
        {
            valueType = new EnumType( Classes.RAW_CLASS.map( type ) );
        }
        else
        {
            valueType = new ValueType( Classes.RAW_CLASS.map( type ) );
        }
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.