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

org.javers.core.metamodel.type.ShallowReferenceType Maven / Gradle / Ivy

package org.javers.core.metamodel.type;

import java.util.List;
import java.util.Optional;

/**
 * @see org.javers.core.metamodel.annotation.ShallowReference
 * @author bartosz.walacik
 */
public class ShallowReferenceType extends EntityType {
    ShallowReferenceType(ManagedClass entity, List idProperties, Optional typeName) {
        super(entity.createShallowReference(), idProperties, typeName);
    }

    @Override
    EntityType spawn(ManagedClass managedClass, Optional typeName) {
        return new ShallowReferenceType(managedClass, getIdProperties(), typeName);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) { return true; }
        if (!(o instanceof ShallowReferenceType)) {return false;}

        ShallowReferenceType that = (ShallowReferenceType) o;
        return super.equals(that);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy