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

com.liberologico.cloudesire.cmw.model.dto.RecurringCostLineDTO Maven / Gradle / Ivy

The newest version!
package com.liberologico.cloudesire.cmw.model.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.liberologico.cloudesire.cmw.model.enums.LineType;

import javax.validation.Valid;
import java.util.Objects;

public class RecurringCostLineDTO extends OrderLineDTO
{
    @JsonInclude( JsonInclude.Include.NON_NULL )
    @Valid
    private UrlEntityDTO subscription;

    public RecurringCostLineDTO()
    {
        super();
    }

    @Override
    public LineType getType()
    {
        return LineType.RECURRINGCOST;
    }

    @Override
    public void setType( LineType type )
    {
    }

    public UrlEntityDTO getSubscription()
    {
        return subscription;
    }

    public RecurringCostLineDTO setSubscription( UrlEntityDTO subscription )
    {
        this.subscription = subscription;
        return this;
    }

    @Override
    public boolean equals( Object o )
    {
        if ( this == o ) return true;
        if ( o == null || getClass() != o.getClass() ) return false;
        if ( !super.equals( o ) ) return false;
        RecurringCostLineDTO that = (RecurringCostLineDTO) o;
        return Objects.equals( subscription, that.subscription );
    }

    @Override
    public int hashCode()
    {
        return Objects.hash( super.hashCode(), subscription );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy