Package com._1c.g5.v8.dt.compare.core
Class SerializableMergeSettings
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.core.SerializableMergeSettings
-
public class SerializableMergeSettings extends Object
A merge settings container used for serialization.
-
-
Constructor Summary
Constructors Constructor Description SerializableMergeSettings()
Constructs new empty container instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNestedSetting(NestedSerializableMergeSettings nestedSetting)
Adds the nested settingvoid
addProperties(Map<String,String> properties)
Adds set of properties to the container.void
addProperty(String propertyName, String propertyValue)
Adds new property to the container.MergeRule
getMergeRule()
Gets stored merge rule.NestedSerializableMergeSettings
getNestedSettings()
Gets nested settings container.List<NestedSerializableMergeSettings>
getNestedSettingsByName(String nestedSettingName)
Gets nested settings by name.ComparisonSide
getOrderSide()
Gets stored order side.String
getProperty(String propertyName)
Gets a property by its name.boolean
hasMergeRule()
Tells whether a merge rule is stored in the container.boolean
hasNestedSettings()
Tells whether nested settings are stored in the container.boolean
hasOrderSide()
Tells whether an order side is stored in the container.boolean
isEmpty()
Tells whether the container is empty, i.e.void
setMergeRule(MergeRule mergeRule)
Sets merge rule.void
setOrderSide(ComparisonSide orderSide)
Sets order side.
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Tells whether the container is empty, i.e. it still does not store any merge settings.- Returns:
true
if the container is empty,false
otherwise
-
setMergeRule
public void setMergeRule(MergeRule mergeRule)
Sets merge rule.- Parameters:
mergeRule
- the merge rule to store, cannot benull
-
getMergeRule
public MergeRule getMergeRule()
Gets stored merge rule.- Returns:
- the merge rule, may be
null
if not set yet
-
hasMergeRule
public boolean hasMergeRule()
Tells whether a merge rule is stored in the container.- Returns:
true
if the merge rule is stored,false
otherwise
-
setOrderSide
public void setOrderSide(ComparisonSide orderSide)
Sets order side.- Parameters:
orderSide
- the order side to store, cannot benull
-
getOrderSide
public ComparisonSide getOrderSide()
Gets stored order side.- Returns:
- the order side, may be
null
if not set yet
-
hasOrderSide
public boolean hasOrderSide()
Tells whether an order side is stored in the container.- Returns:
true
if the order side is stored,false
otherwise
-
getNestedSettings
public NestedSerializableMergeSettings getNestedSettings()
Gets nested settings container.- Returns:
- the nested settings, can be
null
-
hasNestedSettings
public boolean hasNestedSettings()
Tells whether nested settings are stored in the container.- Returns:
true
if the nested settings are stored,false
otherwise
-
getNestedSettingsByName
public List<NestedSerializableMergeSettings> getNestedSettingsByName(String nestedSettingName)
Gets nested settings by name.- Parameters:
nestedSettingName
- the retrieved nested settings name, cannot benull
- Returns:
- the nested settings with the desired name, may be empty, never
null
-
addProperties
public void addProperties(Map<String,String> properties)
Adds set of properties to the container.- Parameters:
properties
- the map of properties 'name:value', cannot benull
-
addProperty
public void addProperty(String propertyName, String propertyValue)
Adds new property to the container.- Parameters:
propertyName
- the property name, cannot benull
propertyValue
- the property value, cannot benull
-
getProperty
public String getProperty(String propertyName)
Gets a property by its name.- Parameters:
propertyName
- the property name to get the value for, cannot benull
- Returns:
- the property value, can be
null
-
addNestedSetting
public void addNestedSetting(NestedSerializableMergeSettings nestedSetting)
Adds the nested setting- Parameters:
nestedSetting
-NestedSerializableMergeSettings
object, can be with settings and nested settings, cannot benull
-
-