T
- The type managed by the Column
.Cloneable
, org.refcodes.mixin.KeyAccessor<T>
, org.refcodes.mixin.TypeAccessor<T>
, Column<T>
public class ObjectColumn<T> extends AbstractColumn<T> implements Cloneable
org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends Object>
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object>
Constructor | Description |
---|---|
ObjectColumn(String aKey,
Class<T> aType) |
Creates a
ObjectColumn managing String instances. |
Modifier and Type | Method | Description |
---|---|---|
Object |
clone() |
|
T |
fromStorageStrings(String[] aStringValues) |
From storage strings.
|
String[] |
toStorageStrings(T aValue) |
A
Column implementation can provide its own text exchange format
for the given objects. |
contains, fromStorageString, get, getKey, getType, remove, toPrintable, toStorageString
getValue, toStorageString_
public ObjectColumn(String aKey, Class<T> aType)
ObjectColumn
managing String
instances.aKey
- The key for the ObjectColumn
.aType
- The type to be used.public String[] toStorageStrings(T aValue)
Column
implementation can provide its own text exchange format
for the given objects. This method enables the Column
to convert
a value of the given type to a String
array and via
Column.fromStorageStrings(String[])
back to the value (bijective). This
method supports data sinks (such as Amazon's SimpleDb) which provide
dedicated support for multiple values in a row's entry: In case T is an
array type, then the storage String
representations of the
elements in that array may be placed in dedicated entries of the returned
String
array. In case T is not an array type then the returned
String
array may contain just one value. In case data sinks (such
as relational databases) are to be addressed which allow only a single
value in a row's entry, then the method Column.toStorageString(Object)
may be used instead.toStorageStrings
in interface Column<T>
aValue
- the element to be converted to a String
array.String
array representation of the value.public T fromStorageStrings(String[] aStringValues) throws ParseException
fromStorageStrings
in interface Column<T>
aStringValues
- the string valuesParseException
- the parse exceptionpublic Object clone() throws CloneNotSupportedException
clone
in class AbstractColumn<T>
CloneNotSupportedException
Copyright © 2021. All rights reserved.