EJBPrimaryKeyFacadeLogic.java
// license-header java merge-point
//
// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
//
package org.andromda.cartridges.ejb.metafacades;
import java.util.Collection;
import org.andromda.core.metafacade.ModelValidationMessage;
/**
* TODO: Model Documentation for org.andromda.cartridges.ejb.metafacades.EJBPrimaryKeyFacade
* MetafacadeLogic for EJBPrimaryKeyFacade
*
* @see EJBPrimaryKeyFacade
*/
public abstract class EJBPrimaryKeyFacadeLogic
extends EJBEntityAttributeFacadeLogicImpl
implements EJBPrimaryKeyFacade
{
/**
* The underlying UML object
* @see Object
*/
protected Object metaObject;
/** Create Metafacade implementation instance using the MetafacadeFactory from the context
* @param metaObjectIn
* @param context
*/
protected EJBPrimaryKeyFacadeLogic(Object metaObjectIn, String context)
{
super(metaObjectIn, getContext(context));
this.metaObject = metaObjectIn;
}
/**
* Gets the context for this metafacade logic instance.
* @param context String. Set to EJBPrimaryKeyFacade if null
* @return context String
*/
private static String getContext(String context)
{
if (context == null)
{
context = "org.andromda.cartridges.ejb.metafacades.EJBPrimaryKeyFacade";
}
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 EJBPrimaryKeyFacade
*/
public boolean isEJBPrimaryKeyFacadeMetaType()
{
return true;
}
// --------------- attributes ---------------------
/**
* @see org.andromda.cartridges.ejb.metafacades.EJBPrimaryKeyFacade#isComplex()
* @return boolean
*/
protected abstract boolean handleIsComplex();
private boolean __complex1a;
private boolean __complex1aSet = false;
/**
* True/false on whether or not the primary key is complex.
* @return (boolean)handleIsComplex()
*/
public final boolean isComplex()
{
boolean complex1a = this.__complex1a;
if (!this.__complex1aSet)
{
// complex has no pre constraints
complex1a = handleIsComplex();
// complex has no post constraints
this.__complex1a = complex1a;
if (isMetafacadePropertyCachingEnabled())
{
this.__complex1aSet = true;
}
}
return complex1a;
}
/**
* @param validationMessages Collection<ModelValidationMessage>
* @see EJBEntityAttributeFacadeLogicImpl#validateInvariants(Collection validationMessages)
*/
@Override
public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
{
super.validateInvariants(validationMessages);
}
}