public class ValueProperty extends Property
TypeConverter.TypeConverter,
ValueHolder| Constructor and Description |
|---|
ValueProperty(String simpleType)
Creates
ValueProperty based on simple type name. |
ValueProperty(String simpleType,
String text)
|
ValueProperty(String simpleType,
ValueHolder holder)
Creates
ValueProperty based on simple type name and prepared ValueHolder with value. |
ValueProperty(TypeDef type,
ValueHolder holder)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue() |
Property |
deepcopy(boolean resetIds)
Returns deep copy of this property's subtree.
|
boolean |
equals(Object o) |
Boolean |
getBoolean() |
Date |
getDate() |
Date |
getDatetime() |
BigDecimal |
getDecimal() |
ElementType |
getElementType()
Gets associated element type, based on property implementation.
|
ValueHolder |
getHolder() |
long |
getId() |
Integer |
getInteger() |
Long |
getLong() |
double |
getNumber() |
Object |
getObject() |
String |
getSimpleType() |
String |
getString() |
ValueHolder |
getValue() |
int |
hashCode() |
int |
intValue() |
boolean |
isValue()
Is property a value type.
|
void |
print(StringBuilder sb,
int level,
String prefix,
String suffix)
Adds to
sb formatted String, specific for ValueProperty, which looks like:
* code = CA (string)
* premium = 100 (number)
* su = 10000 (number)
|
void |
set(Object value)
Sets new simple value, which must be supported by
TypeConverter. |
void |
setValue(ValueHolder value)
Sets value holder and state of this property to
EntityState#PERSISTENT. |
String |
toString() |
add, add, asCollection, asEntity, asRef, asValue, at, booleanValue, bundle, clear, create, deepcopy, get, getBoolean, getBundle, getCanonicalPath, getCollection, getContainer, getDate, getDatetime, getDecimal, getEntity, getHolder, getInteger, getLong, getName, getNumber, getOwnerId, getOwnerPropertyName, getParent, getParentName, getPath, getRefCount, getRefTarget, getState, getString, getType, getTypeCode, intValue, isCollection, isEntity, isPersistent, isRoot, isTransient, iterator, print, remove, remove, resetIds, set, setContainer, setName, setOwnerId, setParent, setupOwnerId, size, traverse, traverseforEach, spliteratorpublic ValueProperty(String simpleType)
ValueProperty based on simple type name.simpleType - supported simple typepublic ValueProperty(TypeDef type, ValueHolder holder)
type - definition typeholder - holder with valuepublic ValueProperty(String simpleType, ValueHolder holder)
ValueProperty based on simple type name and prepared ValueHolder with value.simpleType - supported simple typeholder - holder with valuepublic ValueProperty(String simpleType, String text)
simpleType - supported simple typetext - value for StringHolderpublic ValueHolder getValue()
public Object getObject()
public final void setValue(ValueHolder value)
EntityState#PERSISTENT.value - for this propertypublic String getSimpleType()
TypeDefpublic Property deepcopy(boolean resetIds)
deepcopy in class PropertyresetIds - whether to reset ids on copydeepcopyProperty.deepcopy()public void print(StringBuilder sb, int level, String prefix, String suffix)
sb formatted String, specific for ValueProperty, which looks like:
* code = CA (string)
* premium = 100 (number)
* su = 10000 (number)
print in class Propertysb - StringBuilder containing data to printlevel - level used to indentationprefix - value to used as prefixsuffix - value to used as suffixtoString()public void set(Object value)
TypeConverter.set in interface Handleset in class Propertyvalue - new simple valueHyperonRuntimeException - if value is not supportedpublic String getString()
PropertygetString in interface HandlegetString in class PropertyTypeConverter.getString(Object)public Integer getInteger()
PropertygetInteger in interface HandlegetInteger in class PropertyTypeConverter.getInteger(Object)public BigDecimal getDecimal()
PropertygetDecimal in interface HandlegetDecimal in class PropertyTypeConverter.getDecimal(Object)public boolean booleanValue()
PropertybooleanValue in interface HandlebooleanValue in class PropertyTypeConverter.getBoolean(Object)public Boolean getBoolean()
PropertygetBoolean in interface HandlegetBoolean in class PropertyTypeConverter.toBooleanHolder(Object)public Date getDate()
PropertygetDate in interface HandlegetDate in class PropertyTypeConverter.getDate(Object)public Date getDatetime()
PropertygetDatetime in interface HandlegetDatetime in class PropertyTypeConverter.getDatetime(Object)public ValueHolder getHolder()
PropertygetHolder in interface HandlegetHolder in class PropertyValueHolderpublic Long getLong()
PropertygetLong in interface HandlegetLong in class PropertyTypeConverter.getDatetime(Object)public double getNumber()
PropertygetNumber in interface HandlegetNumber in class PropertyTypeConverter.getNumber(Object)public int intValue()
PropertyintValue in interface HandleintValue in class PropertyTypeConverter.toIntegerHolder(Object)public ElementType getElementType()
HandleElementType.VALUE element typeHandle.get(String)public String toString()
toString in class ObjectStringprint(StringBuilder, int, String, String)Copyright © 2021. All rights reserved.