All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dmd.templates.shared.generated.types.DmcTypeCardinalityEnumSV Maven / Gradle / Ivy

Go to download

The dark-matter project provides mechanism to define concepts associated with Domain Specific Languages (DSLs) and generate code that can be extended with business logic that supports the given DSL purpose.

There is a newer version: 3.1.15
Show newest version
//	---------------------------------------------------------------------------
//	dark-matter-data
//	Copyright (c) 2014 dark-matter-data committers
//	---------------------------------------------------------------------------
//	This program is free software; you can redistribute it and/or modify it
//	under the terms of the GNU Lesser General Public License as published by the
//	Free Software Foundation; either version 3 of the License, or (at your
//	option) any later version.
//	This program is distributed in the hope that it will be useful, but WITHOUT
//	ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//	FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
//	more details.
//	You should have received a copy of the GNU Lesser General Public License along
//	with this program; if not, see .
//	---------------------------------------------------------------------------
package org.dmd.templates.shared.generated.types;

import java.io.Serializable;
import org.dmd.dmc.DmcAttribute;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dmc.DmcValueException;
import org.dmd.templates.shared.generated.enums.CardinalityEnum;    // DmcType import
/**
 * The DmcTypeCardinalityEnumSV provides storage for a single-valued CardinalityEnum
 * 

* 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.dumpEnumType(DmoTypeFormatter.java:360) */ @SuppressWarnings("serial") public class DmcTypeCardinalityEnumSV extends DmcTypeCardinalityEnum implements Serializable { protected CardinalityEnum value; public DmcTypeCardinalityEnumSV(){ } public DmcTypeCardinalityEnumSV(DmcAttributeInfo ai){ super(ai); } public DmcTypeCardinalityEnumSV getNew(){ return(new DmcTypeCardinalityEnumSV(getAttributeInfo())); } public DmcTypeCardinalityEnumSV getNew(DmcAttributeInfo ai){ return(new DmcTypeCardinalityEnumSV(ai)); } @Override // org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2203) public DmcAttribute cloneIt(){ DmcTypeCardinalityEnumSV rc = getNew(); rc.value = value; return(rc); } // org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2214) public CardinalityEnum getSVCopy(){ if (value == null) return(null); return(cloneValue(value)); } @Override // org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2226) public CardinalityEnum set(Object v) throws DmcValueException { CardinalityEnum 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 CardinalityEnum getSV(){ return(value); } @Override public int getMVSize(){ return(0); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy