001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.cartridges.ejb3.metafacades;
006
007import java.util.Collection;
008import org.andromda.core.metafacade.ModelValidationMessage;
009
010/**
011 * TODO: Model Documentation for org.andromda.cartridges.ejb3.metafacades.EJB3MappedSuperclassFacade
012 * MetafacadeLogic for EJB3MappedSuperclassFacade
013 *
014 * @see EJB3MappedSuperclassFacade
015 */
016public abstract class EJB3MappedSuperclassFacadeLogic
017    extends EJB3EntityFacadeLogicImpl
018    implements EJB3MappedSuperclassFacade
019{
020    /**
021     * The underlying UML object
022     * @see Object
023     */
024    protected Object metaObject;
025
026    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
027     * @param metaObjectIn
028     * @param context
029     */
030    protected EJB3MappedSuperclassFacadeLogic(Object metaObjectIn, String context)
031    {
032        super(metaObjectIn, getContext(context));
033        this.metaObject = metaObjectIn;
034    }
035
036    /**
037     * Gets the context for this metafacade logic instance.
038     * @param context String. Set to EJB3MappedSuperclassFacade if null
039     * @return context String
040     */
041    private static String getContext(String context)
042    {
043        if (context == null)
044        {
045            context = "org.andromda.cartridges.ejb3.metafacades.EJB3MappedSuperclassFacade";
046        }
047        return context;
048    }
049
050    /** Reset context only for non-root metafacades
051     * @param context
052     */
053    @Override
054    public void resetMetafacadeContext(String context)
055    {
056        if (!this.contextRoot) // reset context only for non-root metafacades
057        {
058            context = getContext(context);  // to have same value as in original constructor call
059            setMetafacadeContext (context);
060        }
061    }
062
063    /**
064     * @return boolean true always
065     * @see EJB3MappedSuperclassFacade
066     */
067    public boolean isEJB3MappedSuperclassFacadeMetaType()
068    {
069        return true;
070    }
071
072    /**
073     * @param validationMessages Collection<ModelValidationMessage>
074     * @see EJB3EntityFacadeLogicImpl#validateInvariants(Collection validationMessages)
075     */
076    @Override
077    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
078    {
079        super.validateInvariants(validationMessages);
080    }
081}