public class PersistentEntityResource extends org.springframework.hateoas.EntityModel<Object>
Resource
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 PersistentEntityResource s 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. |
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, toString
public PersistentEntity<?,? extends PersistentProperty<?>> getPersistentEntity()
PersistentEntity
for the underlying instance.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 PersistentEntityResource
s eventually.content
- must not be null.entity
- must not be null.public boolean isNew()
public boolean isNested()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.