Package org.jooq.util.jaxb

Examples of org.jooq.util.jaxb.ForcedType


                }
            }
        }

        // [#677] Forced types for matching regular expressions
        ForcedType forcedType = db.getConfiguredForcedType(child, definedType);
        if (forcedType != null) {
            String type = forcedType.getName();
            String converter = null;

            CustomType customType = customType(db, forcedType.getName());
            if (customType != null) {
                type = (!StringUtils.isBlank(customType.getType()))
                    ? customType.getType()
                    : customType.getName();
View Full Code Here


    public DataTypeDefinition getType() {
        if (type == null) {
            Database db = container.getDatabase();

            // [#677] Forced types for matching regular expressions
            ForcedType forcedType = db.getConfiguredForcedType(this);
            if (forcedType != null) {
                log.debug("Forcing type", this + " into " + forcedType.getName());
                DataType<?> forcedDataType = null;

                String t = definedType.getType();
                int l = definedType.getLength();
                int p = definedType.getPrecision();
                int s = definedType.getScale();

                try {
                    forcedDataType = getDialectDataType(db.getDialect(), forcedType.getName(), p, s);
                } catch (SQLDialectNotSupportedException ignore) {}

                // [#677] SQLDataType matches are actual type-rewrites
                if (forcedDataType != null) {
                    type = new DefaultDataTypeDefinition(db, getSchema(), forcedType.getName(), l, p, s);
                }

                // Other forced types are UDT's, enums, etc.
                else {
                    type = new DefaultDataTypeDefinition(db, getSchema(), t, l, p, s, forcedType.getName());
                }
            }

            // [#976] Mapping DATE as TIMESTAMP
            if (db.dateAsTimestamp()) {
View Full Code Here

        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

TOP

Related Classes of org.jooq.util.jaxb.ForcedType

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.