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

org.dmd.dmp.shared.generated.types.adapters.ResponseCategoryEnumSETAdapter 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
package org.dmd.dmp.shared.generated.types.adapters;

import org.dmd.dmc.presentation.DmcAdapterIF;
import org.dmd.dmc.DmcAttribute;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dms.generated.types.DmcTypeModifierMV;
import org.dmd.dmp.shared.generated.types.DmcTypeResponseCategoryEnumSET;

@SuppressWarnings("serial")
// org.dmd.dms.util.AdapterFormatter.dumpAdapter(AdapterFormatter.java:59)
// Called from: org.dmd.dms.util.AdapterFormatter.dumpAdapterSET(AdapterFormatter.java:20)
public class ResponseCategoryEnumSETAdapter extends DmcTypeResponseCategoryEnumSET implements DmcAdapterIF {

    transient DmcTypeResponseCategoryEnumSET existingValue;

    public ResponseCategoryEnumSETAdapter(DmcAttributeInfo ai){
    	   super(ai);
    }

    public void setEmpty(){
    	   value = null;
    }

    public boolean hasValue(){
    	   if (value == null)
    		   return(false);
    	   return(true);
    }

    public void resetToExisting() {
    	if (existingValue == null)
    		value = null;
    	else
    		value = existingValue.getMVCopy();
    }

    public void setExisting(DmcAttribute attr) {
    	existingValue = (DmcTypeResponseCategoryEnumSET) attr;
    	if (existingValue != null)
    		value = existingValue.getMVCopy();
    }

    public boolean valueChanged(){
    	   return(valueChangedMV(existingValue, this));
    }

    public void addMods(DmcTypeModifierMV mods){
    	   addModsMV(mods, existingValue, this);
    }

    public DmcAttribute getExisting() {
    	   return(existingValue);
    }

    public Object getValue() {
    	   return(value);
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy