Example usage for javax.persistence AttributeConverter interface-usage

List of usage examples for javax.persistence AttributeConverter interface-usage

Introduction

In this page you can find the example usage for javax.persistence AttributeConverter interface-usage.

Usage

From source file com.orange.clara.cloud.servicedbdumper.converter.MetadataConverter.java

/**
 * Copyright (C) 2016 Orange
 * <p>
 * This software is distributed under the terms and conditions of the 'Apache-2.0'
 * license which can be found in the file 'LICENSE' in this package distribution
 * or at 'https://opensource.org/licenses/Apache-2.0'.

From source file com.hantsylabs.example.ee7.jpa.ListToStringConveter.java

/**
 *
 * @author hantsy
 */
@Converter
public class ListToStringConveter implements AttributeConverter<List<String>, String> {

From source file net.shopxx.BaseAttributeConverter.java

public abstract class BaseAttributeConverter<T> implements AttributeConverter<Object, String> {

    private JavaType javaType;

    public BaseAttributeConverter() {
        ResolvableType resolvableType = ResolvableType.forClass(getClass());

From source file eu.jsan.duvi.commons.conversion.bool.BooleanToIntegerConverter.java

@Converter
public class BooleanToIntegerConverter implements AttributeConverter<Boolean, Integer> {

    @Override
    public Integer convertToDatabaseColumn(Boolean attribute) {
        return (attribute != null && attribute) ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;

From source file eu.jsan.duvi.commons.conversion.bool.BooleanToLongConverter.java

@Converter
public class BooleanToLongConverter implements AttributeConverter<Boolean, Long> {

    @Override
    public Long convertToDatabaseColumn(Boolean attribute) {
        return (attribute != null && attribute) ? NumberUtils.LONG_ONE : NumberUtils.LONG_ZERO;

From source file io.getlime.security.powerauth.app.server.repository.model.ActivationStatusConverter.java

/**
 * Converter between {@link ActivationStatus} and integer values.
 *
 * @author Petr Dvorak
 */
@Converter

From source file io.getlime.push.repository.converter.PushMessageStatusConverter.java

/**
 * Converts push sending status to database column value and vice versa.
 *
 * @author Petr Dvorak, petr@lime-company.eu
 */
@Component

From source file debop4k.data.orm.jpa.converters.LocaleAsString.java

/**
 * {@link Locale}  DB? ?     JPA 2.1 Converter .
 *
 * @author sunghyouk.bae@gmail.com
 */
@Converter

From source file io.coala.persist.JsonToStringConverter.java

/**
 * {@link JsonToStringConverter} converts Strings to/from Json trees, an
 * intermediate form useful for lazy deserialization, e.g. into run-time or
 * abstract types
 * 
 * @version $Id: 331c7dd53896011e4a64255440c25cbc83b09883 $

From source file org.kuali.rice.krad.data.jpa.converters.EncryptionConverter.java

/**
 * Calls the core service to encrypt values going to the database and decrypt values coming back from the database.
 *
 * @author Kuali Rice Team (rice.collab@kuali.org)
 */
@Converter