Hiding Collections
Collections can be hidden at the domain-level, indicating that they are not visible to the end-user. This is accomplished using the hidden element.
The acceptable values are:
-
Where.EVERYWHEREorWhere.ANYWHEREThe collection should be hidden everywhere.
-
Where.ANYWHERESynonym for everywhere.
-
Where.OBJECT_FORMSThe collection should be hidden when displayed within an object form.
-
Where.NOWHEREThe collection should not be hidden.
The other values of the Where enum have no meaning for a collection.
For example:
import lombok.Getter;
import lombok.Setter;
public class Customer {
@Collection(where=Where.EVERYWHERE)
@Getter @Setter
private SortedSet<Address> addresses = ...
}
Alternatives
It is also possible to use @CollectionLayout#hidden or using file-based layout such that the collection can be hidden at the view layer.