|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.openadmin.dto.Entity
public class Entity
Generic DTO for a domain object. Each property of the domain object is represented by the 'properties' instance variable which allows for further display metadata to be stored.
Property},
Serialized Form| Field Summary | |
|---|---|
protected Date |
deployDate
|
protected Boolean |
isActive
|
protected Boolean |
isDeleted
|
protected boolean |
isDirty
|
protected Boolean |
isInactive
|
protected boolean |
isValidationFailure
|
protected boolean |
multiPartAvailableOnThread
|
protected Map<String,Property> |
pMap
|
protected Property[] |
properties
|
protected static long |
serialVersionUID
|
protected String[] |
type
|
protected Map<String,List<String>> |
validationErrors
|
| Constructor Summary | |
|---|---|
Entity()
|
|
| Method Summary | |
|---|---|
void |
addProperty(Property property)
|
void |
addValidationError(String fieldName,
String errorOrErrorKey)
Adds a single validation error to this entity. |
boolean |
equals(Object o)
|
Property |
findProperty(String name)
|
Boolean |
getActive()
|
Boolean |
getDeleted()
|
Date |
getDeployDate()
|
Boolean |
getInactive()
|
Map<String,Property> |
getPMap()
|
Property[] |
getProperties()
|
String[] |
getType()
|
Map<String,List<String>> |
getValidationErrors()
Validation error map where the key corresponds to the property that failed validation (which could be dot-separated) and the value corresponds to a list of the error messages, in the case of multiple errors on the same field. |
int |
hashCode()
|
boolean |
isDirty()
|
boolean |
isMultiPartAvailableOnThread()
|
boolean |
isValidationFailure()
|
void |
mergeProperties(String prefix,
Entity entity)
|
void |
overridePropertyValues(Entity entity)
Replaces all property values in this entity with the values from the given entity. |
void |
setActive(Boolean active)
|
void |
setDeleted(Boolean deleted)
|
void |
setDeployDate(Date deployDate)
|
void |
setDirty(boolean dirty)
|
void |
setInactive(Boolean inactive)
|
void |
setMultiPartAvailableOnThread(boolean multiPartAvailableOnThread)
|
void |
setProperties(Property[] properties)
|
void |
setType(String[] type)
|
void |
setValidationErrors(Map<String,List<String>> validationErrors)
Completely reset the validation errors for this Entity. |
void |
setValidationFailure(boolean validationFailure)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final long serialVersionUID
protected String[] type
protected Property[] properties
protected boolean isDirty
protected Date deployDate
protected Boolean isDeleted
protected Boolean isInactive
protected Boolean isActive
protected boolean multiPartAvailableOnThread
protected boolean isValidationFailure
protected Map<String,List<String>> validationErrors
protected Map<String,Property> pMap
| Constructor Detail |
|---|
public Entity()
| Method Detail |
|---|
public String[] getType()
public void setType(String[] type)
public Map<String,Property> getPMap()
public Property[] getProperties()
public void setProperties(Property[] properties)
public void mergeProperties(String prefix,
Entity entity)
public void overridePropertyValues(Entity entity)
pMap
entity - public Property findProperty(String name)
public void addProperty(Property property)
public void addValidationError(String fieldName,
String errorOrErrorKey)
setValidationFailure(boolean).
fieldName - - the field that is in error. This works on top-level properties (like a 'manufacturer' field on a
Product entity) but can also work on properties gleaned from a related entity (like
'defaultSku.weight.weightUnitOfMeasure' on a Product entity)errorOrErrorKey - - the error message to present to a user. Could be the actual error message or a key to a
property in messages.properties to support different localespublic boolean isDirty()
public void setDirty(boolean dirty)
public boolean isMultiPartAvailableOnThread()
public void setMultiPartAvailableOnThread(boolean multiPartAvailableOnThread)
public boolean isValidationFailure()
getValidationErrors() map if this
boolean has not been explicitly setpublic void setValidationFailure(boolean validationFailure)
public Map<String,List<String>> getValidationErrors()
public void setValidationErrors(Map<String,List<String>> validationErrors)
addValidationError(String, String). This will also set the entire
entity in an error state by invoking setValidationFailure(boolean).
validationErrors - addValidationError(String, String)public Boolean getActive()
public void setActive(Boolean active)
public Boolean getDeleted()
public void setDeleted(Boolean deleted)
public Boolean getInactive()
public void setInactive(Boolean inactive)
public Date getDeployDate()
public void setDeployDate(Date deployDate)
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||