public class PersistentEntityResource extends org.springframework.hateoas.EntityModel<Object>
EntityModel subclass that holds a reference to the entity's PersistentEntity
metadata.| Modifier and Type | Class and Description |
|---|---|
static class |
PersistentEntityResource.Builder
Builder to create
PersistentEntityResource instances. |
| Modifier and Type | Method and Description |
|---|---|
static PersistentEntityResource.Builder |
build(Object content,
PersistentEntity<?,?> entity)
Creates a new
PersistentEntityResource.Builder to create PersistentEntityResources eventually. |
Iterable<org.springframework.hateoas.server.core.EmbeddedWrapper> |
getEmbeddeds()
Returns the resources that are supposed to be rendered in the
_embedded clause. |
PersistentEntity<?,? extends PersistentProperty<?>> |
getPersistentEntity()
Returns the
PersistentEntity for the underlying instance. |
PersistentPropertyAccessor<?> |
getPropertyAccessor()
Returns the
PersistentPropertyAccessor for the underlying content bean. |
Object |
getTarget()
Returns the underlying instance.
|
boolean |
isNested() |
boolean |
isNew()
Returns whether the content of the resource is a new entity about to be created.
|
equals, getContent, hashCode, of, of, of, toStringpublic boolean isNew()
public boolean isNested()
public PersistentEntity<?,? extends PersistentProperty<?>> getPersistentEntity()
PersistentEntity for the underlying instance.public Object getTarget()
TargetAware, the TargetAware's target is
returned.EntityModel.getContent()public PersistentPropertyAccessor<?> getPropertyAccessor()
PersistentPropertyAccessor for the underlying content bean.public Iterable<org.springframework.hateoas.server.core.EmbeddedWrapper> getEmbeddeds()
_embedded clause.public static PersistentEntityResource.Builder build(Object content, PersistentEntity<?,?> entity)
PersistentEntityResource.Builder to create PersistentEntityResources eventually.content - must not be null.entity - must not be null.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.