|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.oxm.sequenced.Setting
public class Setting
Setting objects are used to control the order in which the mappings for Sequenced Objects are processed.
Example 1Setting piSetting = new Setting(null, "personal-info"); Setting fnSetting = new Setting(null, "first-name"); piSetting.addChild(fnSetting); Setting fnTextSetting = new Setting(null, "text()"); fnTextSetting.setObject(customerObject); fnTextSetting.setMapping(customerFirstNameMapping); fnTextSetting.setValue("Jane"); fnSetting.addChild(fnTextSetting); Setting lnSetting = new Setting(null, "last-name"); piSetting.addChild(lnSetting); Setting lnTextSetting = new Setting(null, "text()"); lnTextSetting.setObject(customerObject); lnTextSetting.setMapping(customerLastNameMapping); lnTextSetting.setValue("Doe"); lnSetting.getSequence().add(lnTextSetting);
<personal-info> <first-name>Jane</first-name> <last-name>Doe</last-name> </personal-info>Example 2
Setting fnpiSetting = new Setting(null, "personal-info"); Setting fnSetting = new Setting(null, "first-name"); fnpiSetting.addChild(fnSetting); Setting fnTextSetting = new Setting(null, "text()"); fnTextSetting.setObject(customerObject); fnTextSetting.setMapping(customerFirstNameMapping); fnTextSetting.setValue("Jane"); fnSetting.addChild(fnTextSetting); Setting lnpiSetting = new Setting(null, "personal-info"); Setting lastNameSetting = new Setting(null, "last-name"); lnpiSetting.addChild(lnSetting); Setting lnTextSetting = new Setting(null, "text()"); lnTextSetting.setObject(customerObject); lnTextSetting.setMapping(customerLastNameMapping); lnTextSetting.setValue("Doe"); lnSetting.addChild(lnTextSetting);
<personal-info> <first-name>Jane</first-name> </personal-info> <personal-info> <last-name>Doe</last-name> </personal-info>
Constructor Summary | |
---|---|
Setting()
|
|
Setting(java.lang.String namespaceURI,
java.lang.String name)
|
Method Summary | |
---|---|
void |
addChild(Setting childSetting)
|
void |
addValue(java.lang.Object value,
boolean updateObject,
java.lang.Object container)
|
Setting |
copy()
|
Setting |
copy(java.lang.Object newParent)
|
Setting |
copy(java.lang.Object newParent,
java.lang.Object copyValue)
|
java.util.List<Setting> |
getChildren()
|
DatabaseMapping |
getMapping()
|
java.lang.String |
getName()
Return the name of the setting. |
java.lang.String |
getNamespaceURI()
|
java.lang.Object |
getObject()
|
Setting |
getParent()
|
java.lang.Object |
getValue()
|
void |
setMapping(DatabaseMapping mapping)
|
void |
setName(java.lang.String name)
Specify the name of the setting. |
void |
setNamespaceURI(java.lang.String namespaceURI)
|
void |
setObject(java.lang.Object object)
|
void |
setParent(Setting parentSetting)
|
void |
setValue(java.lang.Object value)
Set the value on the Setting. |
void |
setValue(java.lang.Object value,
boolean updateObject)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Setting()
public Setting(java.lang.String namespaceURI, java.lang.String name)
Method Detail |
---|
public java.lang.String getName()
Return the name of the setting. The name of the setting corresponds to a fragment of an XPath in an object-to-XML mapping.
ExampleFor the XPath personal-info/first-name/text() would correspond to 3 Setting objects with names "personal-info", "first-name", and "text()"
public void setName(java.lang.String name)
Specify the name of the setting. The name of the setting corresponds to a fragment of an XPath in an object-to-XML mapping.
ExampleFor the XPath personal-info/first-name/text() would correspond to 3 Setting objects with names "personal-info", "first-name", and "text()"
public java.lang.String getNamespaceURI()
public void setNamespaceURI(java.lang.String namespaceURI)
namespaceURI
- Specify the namespace URI that qualifies the name of the Setting (if
there is one).public java.lang.Object getValue()
public void setValue(java.lang.Object value)
value
- public void setValue(java.lang.Object value, boolean updateObject)
value
- The value to be set on the Setting.updateObject
- This flag indicates if an update is performed
on the corresponding domain object using the specified mapping.public void addValue(java.lang.Object value, boolean updateObject, java.lang.Object container)
value
- updateObject
- container
- public java.lang.Object getObject()
public void setObject(java.lang.Object object)
object
- This is the domain object to which this Setting belongs.public DatabaseMapping getMapping()
public void setMapping(DatabaseMapping mapping)
mapping
- The mapping for the domain object that corresponds to this Setting.public void addChild(Setting childSetting)
childSetting
- This setting will be added to the parent. The parenting
information will be updated automatically. A child must only be added to one parent.public Setting getParent()
public void setParent(Setting parentSetting)
parentSetting
- The parent Setting or null if this setting has not parent.public java.util.List<Setting> getChildren()
public Setting copy()
public Setting copy(java.lang.Object newParent)
public Setting copy(java.lang.Object newParent, java.lang.Object copyValue)
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |