Package de.zalando.typemapper.annotations

Examples of de.zalando.typemapper.annotations.DatabaseType


                final Class<?> paramsClass = (Class<?>) p.getActualTypeArguments()[0];

                innerTypeName = PgTypeHelper.getSQLNameForClass(paramsClass);
                if (innerTypeName == null) {

                    final DatabaseType dbType = paramsClass.getAnnotation(DatabaseType.class);
                    if (dbType != null) {
                        innerTypeName = dbType.name();
                    }

                    if (innerTypeName == null || innerTypeName.isEmpty()) {
                        innerTypeName = NameUtils.camelCaseToUnderscore(paramsClass.getSimpleName());
                    }
View Full Code Here


        // mapper defined
        if (clazz.equals(PgTypeDataHolder.class)) {
            return (PgTypeDataHolder) obj;
        }

        final DatabaseType databaseType = clazz.getAnnotation(DatabaseType.class);
        if (databaseType != null) {
            typeName = databaseType.name();
        }

        if (typeName == null || typeName.isEmpty() || forceTypeHint) {

            // if no annotation is given use the type hint parameter
View Full Code Here

            return o;
        }
    }

    private static Field[] getFields(final Class<?> clazz) {
        DatabaseType databaseType = clazz.getAnnotation(DatabaseType.class);
        if (databaseType == null || !databaseType.inheritance()) {
            return clazz.getDeclaredFields();
        } else {
            List<Field> fields = new ArrayList<Field>();
            Class<?> targetClass = clazz;
            do {
View Full Code Here

TOP

Related Classes of de.zalando.typemapper.annotations.DatabaseType

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.