[New] Added GroupedParameterizedElement.isRelationSet()
This commit is contained in:
parent
055a60bd78
commit
9de09a6fbf
|
@ -960,6 +960,17 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
||||||
return bag.hasParameter(paramKey);
|
return bag.hasParameter(paramKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRelationSet(String paramKey) {
|
||||||
|
if (this.parameterBagMap == null)
|
||||||
|
return false;
|
||||||
|
ParameterBag bag = this.parameterBagMap.get(BAG_RELATIONS);
|
||||||
|
if (bag == null)
|
||||||
|
return false;
|
||||||
|
StringParameter relationP = bag.getStringP(paramKey);
|
||||||
|
return relationP != null && relationP.isSet();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasParameter(String bagKey, String paramKey) {
|
public boolean hasParameter(String bagKey, String paramKey) {
|
||||||
if (this.parameterBagMap == null) {
|
if (this.parameterBagMap == null) {
|
||||||
|
|
|
@ -1624,6 +1624,19 @@ public interface ParameterBagContainer extends StrolchElement {
|
||||||
*/
|
*/
|
||||||
boolean hasRelation(String paramKey);
|
boolean hasRelation(String paramKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the {@link Parameter} with the given paramKey exists on the {@link ParameterBag} with the id
|
||||||
|
* {@link StrolchModelConstants#BAG_RELATIONS} and the value of the parameter is also set, i.e. not empty
|
||||||
|
*
|
||||||
|
* @param paramKey
|
||||||
|
* the key of the {@link Parameter} to be found
|
||||||
|
*
|
||||||
|
* @return true if the {@link Parameter} with the given paramKey exists on the {@link ParameterBag} with the given
|
||||||
|
* bagKey and the value of the parameter is also set, i.e. not empty. False is returned if the {@link ParameterBag} does not exist, the {@link Parameter} does not exist on
|
||||||
|
* the {@link ParameterBag}, or the value of the parameter is empty
|
||||||
|
*/
|
||||||
|
boolean isRelationSet(String paramKey);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the {@link Parameter} with the given paramKey exists on the {@link ParameterBag} with the given
|
* Returns true if the {@link Parameter} with the given paramKey exists on the {@link ParameterBag} with the given
|
||||||
* bagKey
|
* bagKey
|
||||||
|
|
Loading…
Reference in New Issue