public class Property extends Object
Modifier and Type | Method and Description |
---|---|
Object |
add(Object bean,
Object item)
If this is a multi-valued field (one-to-many, many-to-many), add the specified item to the
collection.
|
Object |
addAll(Object bean,
Collection<?> items)
If this is a multi-valued field (one-to-many, many-to-many), add all the specified items to the
collection.
|
Object |
clear(Object bean)
If this is a multi-valued field, clear the collection values.
|
Object |
get(Object bean)
Get the value of this property from the given bean instance.
|
Class<?> |
getEntity() |
Class<?> |
getEnumType() |
Type |
getGenericType() |
String |
getHelp() |
Class<?> |
getJavaType() |
String |
getMappedBy() |
Object |
getMaxSize() |
Object |
getMinSize() |
String |
getName() |
String[] |
getNameSearch() |
int |
getPrecision() |
int |
getScale() |
String |
getSelection() |
String |
getSequenceName() |
Class<?> |
getTarget() |
String |
getTargetName() |
List<String> |
getTargetSearch() |
String |
getTitle() |
PropertyType |
getType() |
boolean |
isCollection() |
boolean |
isCopyable() |
boolean |
isDefaultNow() |
boolean |
isEncrypted() |
boolean |
isEnum() |
boolean |
isEqualsInclude() |
boolean |
isHashKey()
Deprecated.
|
boolean |
isHidden() |
boolean |
isImage() |
boolean |
isJson() |
boolean |
isMassUpdate() |
boolean |
isNameColumn() |
boolean |
isNullable() |
boolean |
isOrphan() |
boolean |
isPassword() |
boolean |
isPrimary() |
boolean |
isReadonly() |
boolean |
isReference() |
boolean |
isRequired() |
boolean |
isSequence() |
boolean |
isTransient() |
boolean |
isTranslatable() |
boolean |
isUnique() |
boolean |
isVersion() |
boolean |
isVirtual() |
Object |
set(Object bean,
Object value)
Set the value for this property to the given bean instance.
|
<T,U> U |
setAssociation(U child,
T bean)
If this is a multi-valued field, ensure the proper parent-child relationship if association is
bidirectional (marked with mappedBy attribute).
|
Map<String,Object> |
toMap()
Create a
Map of property attributes. |
String |
toString() |
boolean |
valueChanged(Object bean,
Object oldValue)
Check whether the property value in the given bean is changed.
|
public Class<?> getEntity()
public String getName()
public PropertyType getType()
public Class<?> getJavaType()
public Type getGenericType()
public String getMappedBy()
public Class<?> getTarget()
public String getTargetName()
public Class<?> getEnumType()
public boolean isPrimary()
public boolean isVersion()
public boolean isRequired()
public boolean isUnique()
public boolean isOrphan()
public boolean isEqualsInclude()
@Deprecated public boolean isHashKey()
public boolean isCopyable()
public boolean isVirtual()
public boolean isTransient()
public boolean isJson()
public boolean isEnum()
public boolean isPassword()
public boolean isMassUpdate()
public boolean isReference()
public boolean isCollection()
public Object getMaxSize()
public Object getMinSize()
public int getPrecision()
public int getScale()
public String getTitle()
public String getHelp()
public boolean isImage()
public boolean isNullable()
public boolean isReadonly()
public boolean isHidden()
public boolean isSequence()
public boolean isTranslatable()
public boolean isEncrypted()
public boolean isDefaultNow()
public String getSequenceName()
public boolean isNameColumn()
public String[] getNameSearch()
public String getSelection()
public Object get(Object bean)
bean
- the instancepublic Object set(Object bean, Object value)
If the property is a collection, ensure the proper parent-child relationship marked with mappedBy attribute.
bean
- the bean instancevalue
- the value for the propertypublic Object add(Object bean, Object item)
bean
- the bean instanceitem
- collection itempublic Object addAll(Object bean, Collection<?> items)
bean
- the bean instanceitems
- the items to addpublic <T,U> U setAssociation(U child, T bean)
T
- the type of the parentU
- the type of the childchild
- the child itembean
- the parent bean instancepublic Object clear(Object bean)
bean
- the bean instancepublic boolean valueChanged(Object bean, Object oldValue)
bean
- the bean instance to checkoldValue
- the old value to check againstpublic Map<String,Object> toMap()
Map
of property attributes. Transient and null valued attributes with be
omitted.
This method should be used to convert property to JSON format.