com.vladmihalcea.hibernate.type.util.MapResultTransformer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-types-60 Show documentation
Show all versions of hibernate-types-60 Show documentation
Hibernate ORM 6.0 extra Types
package com.vladmihalcea.hibernate.type.util;
import java.util.Map;
/**
* The {@link com.vladmihalcea.hibernate.type.util.MapResultTransformer} allows us to return
* a {@link Map} from a JPA {@link jakarta.persistence.Query}.
*
* If there are aliases named as {@code key} or {@code value},
* then those will be used.
*
* Otherwise, the first column value is the key while the second one is the Map value.
*
* For more details about how to use it, check out this article on vladmihalcea.com.
*
* @deprecated use {@link com.vladmihalcea.hibernate.query.MapResultTransformer} instead
*
* @author Vlad Mihalcea
* @since 2.9.0
*/
@Deprecated
public class MapResultTransformer extends com.vladmihalcea.hibernate.query.MapResultTransformer {
public static final String KEY_ALIAS = "map_key";
public static final String VALUE_ALIAS = "map_value";
}