|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.data.util.AbstractProperty
org.grails.plugin.vaadin.utils.PropertyConverter
org.grails.plugin.vaadin.utils.ByteArrayPropertyConverter
@SuppressWarnings("unchecked") protected class ByteArrayPropertyConverter extends PropertyConverter
Autoboxes an underlying Byte[] to byte[].
Note that if original datasource type is not Byte[], then this class does nothing, just passes through the value unchanged.
Constructor Summary | |
ByteArrayPropertyConverter()
Initialise empty |
|
ByteArrayPropertyConverter(Property propertyDataSource)
Initialise with data source |
Method Summary | |
---|---|
Object
|
convert(Object value)
Converts value to byte[] if is Byte[], otherwise just returns value unchanged |
Class
|
getType()
If class of original datasource is Byte[] then returns byte[], else returns original datasource's class unchanged. |
Object
|
restore(Object value)
Restores value to Byte[] if is byte[] and underlying datasource type is Byte[], otherwise just returns value unchanged |
Methods inherited from class PropertyConverter | |
---|---|
convert, getPropertyDataSource, getType, getValue, isReadOnly, readOnlyStatusChange, restore, setPropertyDataSource, setReadOnly, setValue, toString, valueChange |
Methods inherited from class AbstractProperty | |
---|---|
toString, setReadOnly, isReadOnly, getListeners, addListener, addListener, removeListener, removeListener, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll, getValue, getType, setValue |
Constructor Detail |
---|
ByteArrayPropertyConverter()
ByteArrayPropertyConverter(Property propertyDataSource)
Method Detail |
---|
@Override Object convert(Object value)
@Override Class getType()
If no original datasource is set, then returns byte[]
@Override Object restore(Object value)
Groovy Documentation