org.andromda.metafacades.uml14.ManageableEntityAssociationEndLogic Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromda-metafacades-uml14 Show documentation
Show all versions of andromda-metafacades-uml14 Show documentation
The UML 1.4 metafacades. This is the set of UML 1.4 metafacades
implementations. These implement the common UML metafacades.
The newest version!
// license-header java merge-point
//
// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
//
package org.andromda.metafacades.uml14;
import java.util.Collection;
import org.andromda.core.metafacade.MetafacadeBase;
import org.andromda.core.metafacade.ModelValidationMessage;
import org.andromda.metafacades.uml.EntityAttribute;
import org.andromda.metafacades.uml.ManageableEntityAssociationEnd;
import org.apache.log4j.Logger;
/**
*
* MetafacadeLogic for ManageableEntityAssociationEnd
*
* @see ManageableEntityAssociationEnd
*/
public abstract class ManageableEntityAssociationEndLogic
extends EntityAssociationEndLogicImpl
implements ManageableEntityAssociationEnd
{
/**
* The underlying UML object
* @see Object
*/
protected Object metaObject;
/** Create Metafacade implementation instance using the MetafacadeFactory from the context
* @param metaObjectIn
* @param context
*/
protected ManageableEntityAssociationEndLogic(Object metaObjectIn, String context)
{
super(metaObjectIn, getContext(context));
this.metaObject = metaObjectIn;
}
/**
* The logger instance.
*/
private static final Logger logger = Logger.getLogger(ManageableEntityAssociationEndLogic.class);
/**
* Gets the context for this metafacade logic instance.
* @param context String. Set to ManageableEntityAssociationEnd if null
* @return context String
*/
private static String getContext(String context)
{
if (context == null)
{
context = "org.andromda.metafacades.uml.ManageableEntityAssociationEnd";
}
return context;
}
/** Reset context only for non-root metafacades
* @param context
*/
@Override
public void resetMetafacadeContext(String context)
{
if (!this.contextRoot) // reset context only for non-root metafacades
{
context = getContext(context); // to have same value as in original constructor call
setMetafacadeContext (context);
}
}
/**
* @return boolean true always
* @see ManageableEntityAssociationEnd
*/
public boolean isManageableEntityAssociationEndMetaType()
{
return true;
}
// --------------- attributes ---------------------
/**
* @see ManageableEntityAssociationEnd#isDisplay()
* @return boolean
*/
protected abstract boolean handleIsDisplay();
private boolean __display1a;
private boolean __display1aSet = false;
/**
*
* Whether or not this association end should be displayed.
*
* @return (boolean)handleIsDisplay()
*/
public final boolean isDisplay()
{
boolean display1a = this.__display1a;
if (!this.__display1aSet)
{
// display has no pre constraints
display1a = handleIsDisplay();
// display has no post constraints
this.__display1a = display1a;
if (isMetafacadePropertyCachingEnabled())
{
this.__display1aSet = true;
}
}
return display1a;
}
// ------------- associations ------------------
private EntityAttribute __getManageableIdentifier2r;
private boolean __getManageableIdentifier2rSet = false;
/**
*
* @return (EntityAttribute)handleGetManageableIdentifier()
*/
public final EntityAttribute getManageableIdentifier()
{
EntityAttribute getManageableIdentifier2r = this.__getManageableIdentifier2r;
if (!this.__getManageableIdentifier2rSet)
{
// manageableEntityAssociationEnd has no pre constraints
Object result = handleGetManageableIdentifier();
MetafacadeBase shieldedResult = this.shieldedElement(result);
try
{
getManageableIdentifier2r = (EntityAttribute)shieldedResult;
}
catch (ClassCastException ex)
{
// Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
ManageableEntityAssociationEndLogic.logger.warn("incorrect metafacade cast for ManageableEntityAssociationEndLogic.getManageableIdentifier EntityAttribute " + result + ": " + shieldedResult);
}
// manageableEntityAssociationEnd has no post constraints
this.__getManageableIdentifier2r = getManageableIdentifier2r;
if (isMetafacadePropertyCachingEnabled())
{
this.__getManageableIdentifier2rSet = true;
}
}
return getManageableIdentifier2r;
}
/**
* UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
* @return Object
*/
protected abstract Object handleGetManageableIdentifier();
/**
* @param validationMessages Collection
* @see EntityAssociationEndLogicImpl#validateInvariants(Collection validationMessages)
*/
@Override
public void validateInvariants(Collection validationMessages)
{
super.validateInvariants(validationMessages);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy