All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.hal.HalEntityWrapper Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package io.quarkus.hal;

import java.util.HashMap;
import java.util.Map;

import javax.ws.rs.core.Link;

/**
 * The Hal entity wrapper that includes the entity and the Hal links.
 *
 * This type is serialized into Json using:
 * - the JSON-B serializer: {@link HalEntityWrapperJsonbSerializer}
 * - the Jackson serializer: {@link HalEntityWrapperJacksonSerializer}
 */
public class HalEntityWrapper extends HalWrapper {

    private final Object entity;

    public HalEntityWrapper(Object entity, Link... links) {
        this(entity, new HashMap<>());

        addLinks(links);
    }

    public HalEntityWrapper(Object entity, Map links) {
        super(links);

        this.entity = entity;
    }

    public Object getEntity() {
        return entity;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy