I'm trying to develop a library with generic classes to integrate into other projects. For example, a class representing interval:
@Data
public class Interval {
private Instant start;
private Instant end;
}
Since this library might be used by the projects that do not work with Hibernate / Spring, i would like not to include Hibernate dependency and its annotations.
Is there any way, from the perspective of a project using this library together with Hibernate, to make the class above Embeddable without subclassing it and annotating the child class myself ?