T - the object typepublic class StaticObjectExporter<T> extends AbstractObjectExporter
The object can be set using setTarget(Object) or
setTarget(Object, Map) and object data will be extracted once.
The difference to the ObjectExporter is that this exporter must know
the class of the target object in advance and can therefore create the data
items in advance. Setting a target is a quick operation and does not destroy
the data items in the process.
attributes, factory, items| Constructor and Description |
|---|
StaticObjectExporter(ItemFactory itemFactory,
java.lang.Class<T> modelClazz,
boolean readOnly,
boolean nullIsError) |
StaticObjectExporter(ItemFactory itemFactory,
java.lang.Class<T> modelClazz,
boolean readOnly,
boolean nullIsError,
java.lang.String prefix)
Create a new static object exporter
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,Variant> |
getAdditionalAttributes() |
protected java.lang.Object |
getTarget()
Get the current target or
null if there is none |
void |
setAttributes(java.util.Map<java.lang.String,Variant> attributes) |
void |
setTarget(T target) |
void |
setTarget(T target,
java.util.Map<java.lang.String,Variant> attributes) |
createDataItems, dispose, fillAttributes, findAnnotation, getOptions, initAttribute, makeItemName, updateAttribute, updateItemsFromTarget, writeAttributepublic StaticObjectExporter(ItemFactory itemFactory, java.lang.Class<T> modelClazz, boolean readOnly, boolean nullIsError, java.lang.String prefix)
itemFactory - the factory used to create items. This factory is disposed
when the object exporter is disposed.modelClazz - the class of the object to exportreadOnly - set to true so all fields will be read-onlynullIsError - set to true to mark fields that are
null with an error attributeprefix - a local prefixpublic StaticObjectExporter(ItemFactory itemFactory, java.lang.Class<T> modelClazz, boolean readOnly, boolean nullIsError)
public void setTarget(T target, java.util.Map<java.lang.String,Variant> attributes)
public void setTarget(T target)
public void setAttributes(java.util.Map<java.lang.String,Variant> attributes)
protected java.util.Map<java.lang.String,Variant> getAdditionalAttributes()
getAdditionalAttributes in class AbstractObjectExporterprotected java.lang.Object getTarget()
AbstractObjectExporternull if there is nonegetTarget in class AbstractObjectExporter
Copyright (c) IBH SYSTEMS GmbH and others 2010, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0