Package de.zalando.typemapper.annotations

Examples of de.zalando.typemapper.annotations.DatabaseField


    }

    public static final Object mapFromDbObjectNode(final Class classz, final ObjectResultNode node,
            final Mapping mapping) throws InstantiationException, IllegalAccessException, IllegalArgumentException,
        InvocationTargetException, NotsupportedTypeException {
        DatabaseField databaseField = mapping.getField().getAnnotation(DatabaseField.class);
        final Object value;

        if (mapping.isOptionalField() && isRowWithAllFieldsNull(node)) {
            value = null;
        } else if (databaseField.mapper() != DefaultObjectMapper.class) {
            ObjectMapper mapper = databaseField.mapper().newInstance();
            value = mapper.unmarshalFromDbNode(node);
        } else {
            value = mapField(mapping.getFieldClass(), node);
        }
View Full Code Here


     */
    public static DatabaseFieldDescriptor getDatabaseFieldDescriptor(final Field field) {
        DatabaseFieldDescriptor databaseFieldDescriptor = fieldToDataBaseFieldDescriptorMap.get(field);
        if (databaseFieldDescriptor == null) {

            DatabaseField databaseField = field.getAnnotation(DatabaseField.class);
            if (databaseField != null) {
                databaseFieldDescriptor = new DatabaseFieldDescriptor(databaseField);
            } else {

                // do we have a column definition?
View Full Code Here

TOP

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

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.