com.connectifex.polymer.mdl.shared.generated.types.DmcTypePlasticGroupAndNameSV Maven / Gradle / Ivy
// Copyright 2020 connectifex
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package com.connectifex.polymer.mdl.shared.generated.types;
import java.io.Serializable;
import org.dmd.dmc.DmcAttribute;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dmc.DmcValueException;
import com.connectifex.polymer.mdl.shared.generated.types.PlasticGroupAndName; // base type import
import com.connectifex.polymer.mdl.shared.generated.types.DmcTypePlasticGroupAndName; // DmcType import
/**
* The DmcTypePlasticGroupAndNameSV provides storage for a single-valued PlasticGroupAndName
*
* This code was auto-generated and shouldn't be altered manually!
* Generated from: org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2171)
* Called from: org.dmd.dms.util.DmoTypeFormatter.dumpTypes(DmoTypeFormatter.java:125)
*/
@SuppressWarnings("serial")
public class DmcTypePlasticGroupAndNameSV extends DmcTypePlasticGroupAndName implements Serializable {
protected PlasticGroupAndName value;
public DmcTypePlasticGroupAndNameSV(){
}
public DmcTypePlasticGroupAndNameSV(DmcAttributeInfo ai){
super(ai);
}
public DmcTypePlasticGroupAndNameSV getNew(){
return(new DmcTypePlasticGroupAndNameSV(getAttributeInfo()));
}
public DmcTypePlasticGroupAndNameSV getNew(DmcAttributeInfo ai){
return(new DmcTypePlasticGroupAndNameSV(ai));
}
@Override
// org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2203)
public DmcAttribute cloneIt(){
DmcTypePlasticGroupAndNameSV rc = getNew();
rc.value = value;
return(rc);
}
// org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2214)
public PlasticGroupAndName getSVCopy(){
if (value == null)
return(null);
return(cloneValue(value));
}
@Override
// org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2226)
public PlasticGroupAndName set(Object v) throws DmcValueException {
PlasticGroupAndName rc = typeCheck(v);
// We only return a value if the value actually changed. This supports
// the applyModifier() mechanism on DmcObject where we only return true
// if something changed as a result of the modifier
if (value == null)
value = rc;
else{
if (value.equals(rc))
rc = null;
else
value = rc;
}
return(rc);
}
@Override
public PlasticGroupAndName getSV(){
return(value);
}
@Override
public int getMVSize(){
return(0);
}
}