@Entity public class JpaUserRole extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
Constructor and Description |
---|
JpaUserRole() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
org.modelmapper.ModelMapper |
fromMe() |
Class<?> |
getBusinessDomainType() |
String |
getId() |
Instant |
getLastUpdated()
We don't use
LastModifiedDate here because we want to enable manually setting this
value (ex: for setting the lastUpdated to a value received in a persistence message). |
String |
getName() |
String |
getParentRoleId()
A soft reference to the parent of this role.
|
Set<JpaUserPermission> |
getPermissions() |
int |
hashCode() |
boolean |
isArchived() |
protected UserRole |
pruneArchivedReferences(org.modelmapper.spi.MappingContext<JpaUserRole,UserRole> mappingContext)
Used as the
TypeMap.setPostConverter(Converter) for fromMe() . |
void |
setArchived(boolean archived) |
void |
setId(String id) |
void |
setLastUpdated(Instant lastUpdated)
We don't use
LastModifiedDate here because we want to enable manually setting this
value (ex: for setting the lastUpdated to a value received in a persistence message). |
void |
setName(String name) |
void |
setParentRoleId(String parentRoleId)
A soft reference to the parent of this role.
|
void |
setPermissions(Set<JpaUserPermission> permissions) |
org.modelmapper.ModelMapper |
toMe() |
String |
toString() |
public org.modelmapper.ModelMapper fromMe()
fromMe
in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
protected UserRole pruneArchivedReferences(org.modelmapper.spi.MappingContext<JpaUserRole,UserRole> mappingContext)
TypeMap.setPostConverter(Converter)
for fromMe()
.
JPA will eagerly fetch permissions
if they exist in the data store, but we have a
soft-deletion concept that JPA does not account for. This ensures that any references to
entities that have been archived are pruned before being mapped to the business domain. This
protects against those entities being usable despite being archived.
mappingContext
- the model mapper mapping contextpublic org.modelmapper.ModelMapper toMe()
toMe
in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
public Class<?> getBusinessDomainType()
getBusinessDomainType
in interface com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
public String getId()
public String getName()
public Set<JpaUserPermission> getPermissions()
public String getParentRoleId()
UserRole.parentRoleId
public Instant getLastUpdated()
LastModifiedDate
here because we want to enable manually setting this
value (ex: for setting the lastUpdated to a value received in a persistence message).UserRole.lastUpdated
public boolean isArchived()
UserRole.archived
public void setId(String id)
public void setName(String name)
public void setPermissions(Set<JpaUserPermission> permissions)
public void setParentRoleId(String parentRoleId)
UserRole.parentRoleId
public void setLastUpdated(Instant lastUpdated)
LastModifiedDate
here because we want to enable manually setting this
value (ex: for setting the lastUpdated to a value received in a persistence message).UserRole.lastUpdated
public void setArchived(boolean archived)
UserRole.archived
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.