public abstract class RecordWrapper extends Object
Constructor and Description |
---|
RecordWrapper()
Creates a new record wrapper instance.
|
RecordWrapper(RecordHolder holder)
Creates a new record wrapper instance.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asMap()
Returns a map view of this record.
|
void |
create(HolderFactory factory)
Creates an underlying record holder.
|
boolean |
equals(Object obj) |
Object |
getProperty(String name)
Returns the property value.
|
abstract String |
getTypeName()
Returns the full type name of the record.
|
int |
hashCode() |
RecordHolder |
holder()
Returns the record holder.
|
boolean |
isCreated()
Returns
true if the underlying record is created. |
void |
setProperty(String name,
Object value)
Sets the property value.
|
protected <E> Collection<E> |
toCollection(CollectionHolder collection,
Class<E> clazz,
RecordWrapperFactory factory)
Converts a given collection of LSPS records to record wrappers using a given factory.
|
protected <E> List<E> |
toList(ListHolder list,
Class<E> clazz,
RecordWrapperFactory factory)
Converts a given list of LSPS records to record wrappers using a given factory.
|
protected <E> Set<E> |
toSet(SetHolder set,
Class<E> clazz,
RecordWrapperFactory factory)
Converts a given set of LSPS records to record wrappers using a given factory.
|
String |
toString()
Returns a string representation of the wrapped holder.
|
public RecordWrapper()
public RecordWrapper(RecordHolder holder)
holder
- public abstract String getTypeName()
public final RecordHolder holder()
public final boolean isCreated()
true
if the underlying record is created.true
if the underlying record is createdpublic final Object getProperty(String name)
name
- a property namepublic final void setProperty(String name, Object value)
name
- a property namevalue
- a new property valuepublic final void create(HolderFactory factory)
IllegalStateException
is thrown.factory
- public final Map<String,Object> asMap()
public String toString()
protected <E> Set<E> toSet(SetHolder set, Class<E> clazz, RecordWrapperFactory factory)
E
- set
- clazz
- factory
- protected <E> List<E> toList(ListHolder list, Class<E> clazz, RecordWrapperFactory factory)
E
- list
- clazz
- factory
- protected <E> Collection<E> toCollection(CollectionHolder collection, Class<E> clazz, RecordWrapperFactory factory)
E
- collection
- clazz
- factory
- Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.