klass.model.meta.domain.PackageableElementAbstract Maven / Gradle / Ivy
The newest version!
package klass.model.meta.domain;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
import java.io.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gs.fw.common.mithra.*;
import com.gs.fw.common.mithra.attribute.*;
import com.gs.fw.common.mithra.util.*;
import com.gs.fw.common.mithra.notification.*;
import com.gs.fw.common.mithra.notification.listener.*;
import com.gs.fw.common.mithra.list.cursor.Cursor;
import com.gs.fw.common.mithra.bulkloader.*;
import com.gs.fw.common.mithra.*;
import com.gs.fw.common.mithra.behavior.*;
import com.gs.fw.common.mithra.cache.Cache;
import com.gs.fw.common.mithra.extractor.*;
import com.gs.fw.common.mithra.finder.*;
import com.gs.fw.common.mithra.list.*;
import com.gs.fw.common.mithra.behavior.state.PersistenceState;
import com.gs.fw.common.mithra.attribute.update.*;
import com.gs.fw.common.mithra.transaction.MithraObjectPersister;
import java.util.Arrays;
import java.util.HashSet;
/**
* This file was automatically generated using Mithra 18.0.0. Please do not modify it.
* Add custom logic to its subclass instead.
*/
// Generated from templates/transactional/Abstract.jsp
public abstract class PackageableElementAbstract extends com.gs.fw.common.mithra.superclassimpl.MithraTransactionalObjectImpl
implements
NamedElement
{
private static byte MEMORY_STATE = PersistenceState.IN_MEMORY;
private static byte PERSISTED_STATE = PersistenceState.PERSISTED;
private static final Logger logger = LoggerFactory.getLogger(PackageableElement.class.getName());
private static final RelationshipHashStrategy forenumerationSubClass = new EnumerationSubClassRhs();
private static final RelationshipHashStrategy forclassifierSubClass = new ClassifierSubClassRhs();
private static final RelationshipHashStrategy forassociationSubClass = new AssociationSubClassRhs();
private static final RelationshipHashStrategy fornamedProjectionSubClass = new NamedProjectionSubClassRhs();
private static final RelationshipHashStrategy forserviceGroupSubClass = new ServiceGroupSubClassRhs();
private static final class EnumerationSubClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
EnumerationData _castedTargetData = (EnumerationData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
private static final class ClassifierSubClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
ClassifierData _castedTargetData = (ClassifierData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
private static final class AssociationSubClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
AssociationData _castedTargetData = (AssociationData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
private static final class NamedProjectionSubClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
NamedProjectionData _castedTargetData = (NamedProjectionData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
private static final class ServiceGroupSubClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
ServiceGroupData _castedTargetData = (ServiceGroupData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
PackageableElementData _castedSrcData = (PackageableElementData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
public PackageableElementAbstract()
{
this.persistenceState = MEMORY_STATE;
}
public PackageableElement getDetachedCopy() throws MithraBusinessException
{
return (PackageableElement) super.getDetachedCopy();
}
public PackageableElement getNonPersistentCopy() throws MithraBusinessException
{
PackageableElement result = (PackageableElement) super.getNonPersistentCopy();
result.persistenceState = MEMORY_STATE;
return result;
}
public PackageableElement copyDetachedValuesToOriginalOrInsertIfNew()
{
return (PackageableElement) this.zCopyDetachedValuesToOriginalOrInsertIfNew();
}
public PackageableElement zFindOriginal()
{
PackageableElementData data = (PackageableElementData) this.currentData;
Operation op;
op = PackageableElementFinder.name().eq(data.getName());
return PackageableElementFinder.findOne(op);
}
public boolean isModifiedSinceDetachmentByDependentRelationships()
{
if(this.isModifiedSinceDetachment()) return true;
if(isEnumerationSubClassModifiedSinceDetachment()) return true;
if(isClassifierSubClassModifiedSinceDetachment()) return true;
if(isAssociationSubClassModifiedSinceDetachment()) return true;
if(isNamedProjectionSubClassModifiedSinceDetachment()) return true;
if(isServiceGroupSubClassModifiedSinceDetachment()) return true;
return false;
}
private Logger getLogger()
{
return logger;
}
public MithraDataObject zAllocateData()
{
return new PackageableElementData();
}
protected void zSetFromPackageableElementData( PackageableElementData data )
{
super.zSetData(data);
this.persistenceState = PERSISTED_STATE;
}
public void setFromPackageableElementData( PackageableElementData data )
{
super.zSetData(data);
}
public void zWriteDataClassName(ObjectOutput out) throws IOException
{
}
public final boolean isNameNull()
{
return ((PackageableElementData) this.zSynchronizedGetData()).isNameNull();
}
public final String getName()
{
PackageableElementData data = (PackageableElementData) this.zSynchronizedGetData();
return data.getName();
}
public void setName(String newValue)
{
if (newValue != null && newValue.length() > 256)
throw new MithraBusinessException("Attribute 'name' cannot exceed maximum length of 256: " + newValue);
MithraDataObject d = zSetString(PackageableElementFinder.name(), newValue, true, false );
if (d == null) return;
PackageableElementData data = (PackageableElementData) d;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
if (!_behavior.isPersisted())
{
Enumeration enumerationSubClass =
(Enumeration ) data.getEnumerationSubClass();
if (enumerationSubClass != null)
{
enumerationSubClass.setName(newValue);
}
Classifier classifierSubClass =
(Classifier ) data.getClassifierSubClass();
if (classifierSubClass != null)
{
classifierSubClass.setName(newValue);
}
Association associationSubClass =
(Association ) data.getAssociationSubClass();
if (associationSubClass != null)
{
associationSubClass.setName(newValue);
}
NamedProjection namedProjectionSubClass =
(NamedProjection ) data.getNamedProjectionSubClass();
if (namedProjectionSubClass != null)
{
namedProjectionSubClass.setName(newValue);
}
ServiceGroup serviceGroupSubClass =
(ServiceGroup ) data.getServiceGroupSubClass();
if (serviceGroupSubClass != null)
{
serviceGroupSubClass.setName(newValue);
}
}
}
public boolean isOrdinalNull()
{
return ((PackageableElementData) this.zSynchronizedGetData()).isOrdinalNull();
}
public int getOrdinal()
{
PackageableElementData data = (PackageableElementData) this.zSynchronizedGetData();
return data.getOrdinal();
}
public void setOrdinal(int newValue)
{
zSetInteger(PackageableElementFinder.ordinal(), newValue, false, false ,false);
}
public boolean isPackageNameNull()
{
return ((PackageableElementData) this.zSynchronizedGetData()).isPackageNameNull();
}
public String getPackageName()
{
PackageableElementData data = (PackageableElementData) this.zSynchronizedGetData();
return data.getPackageName();
}
public void setPackageName(String newValue)
{
if (newValue != null && newValue.length() > 100000)
throw new MithraBusinessException("Attribute 'packageName' cannot exceed maximum length of 100000: " + newValue);
zSetString(PackageableElementFinder.packageName(), newValue, false, false );
}
protected void issuePrimitiveNullSetters(TransactionalBehavior behavior, MithraDataObject data)
{
}
public void zPersistDetachedRelationships(MithraDataObject _data)
{
PackageableElementData _newData = (PackageableElementData) _data;
if (_newData.getEnumerationSubClass() instanceof NulledRelation)
{
Enumeration enumerationSubClass =
this.getEnumerationSubClass();
if (enumerationSubClass != null)
{
enumerationSubClass.cascadeDelete();
}
}
else
{
Enumeration enumerationSubClass =
(Enumeration) _newData.getEnumerationSubClass();
if (enumerationSubClass != null)
{
Enumeration _existing =
this.getEnumerationSubClass();
if (_existing == null)
{
enumerationSubClass.copyDetachedValuesToOriginalOrInsertIfNew();
}
else
{
_existing.zCopyAttributesFrom(enumerationSubClass.zGetTxDataForRead());
_existing.zPersistDetachedRelationships(enumerationSubClass.zGetTxDataForRead());
}
}
}
if (_newData.getClassifierSubClass() instanceof NulledRelation)
{
Classifier classifierSubClass =
this.getClassifierSubClass();
if (classifierSubClass != null)
{
classifierSubClass.cascadeDelete();
}
}
else
{
Classifier classifierSubClass =
(Classifier) _newData.getClassifierSubClass();
if (classifierSubClass != null)
{
Classifier _existing =
this.getClassifierSubClass();
if (_existing == null)
{
classifierSubClass.copyDetachedValuesToOriginalOrInsertIfNew();
}
else
{
_existing.zCopyAttributesFrom(classifierSubClass.zGetTxDataForRead());
_existing.zPersistDetachedRelationships(classifierSubClass.zGetTxDataForRead());
}
}
}
if (_newData.getAssociationSubClass() instanceof NulledRelation)
{
Association associationSubClass =
this.getAssociationSubClass();
if (associationSubClass != null)
{
associationSubClass.cascadeDelete();
}
}
else
{
Association associationSubClass =
(Association) _newData.getAssociationSubClass();
if (associationSubClass != null)
{
Association _existing =
this.getAssociationSubClass();
if (_existing == null)
{
associationSubClass.copyDetachedValuesToOriginalOrInsertIfNew();
}
else
{
_existing.zCopyAttributesFrom(associationSubClass.zGetTxDataForRead());
_existing.zPersistDetachedRelationships(associationSubClass.zGetTxDataForRead());
}
}
}
if (_newData.getNamedProjectionSubClass() instanceof NulledRelation)
{
NamedProjection namedProjectionSubClass =
this.getNamedProjectionSubClass();
if (namedProjectionSubClass != null)
{
namedProjectionSubClass.cascadeDelete();
}
}
else
{
NamedProjection namedProjectionSubClass =
(NamedProjection) _newData.getNamedProjectionSubClass();
if (namedProjectionSubClass != null)
{
NamedProjection _existing =
this.getNamedProjectionSubClass();
if (_existing == null)
{
namedProjectionSubClass.copyDetachedValuesToOriginalOrInsertIfNew();
}
else
{
_existing.zCopyAttributesFrom(namedProjectionSubClass.zGetTxDataForRead());
_existing.zPersistDetachedRelationships(namedProjectionSubClass.zGetTxDataForRead());
}
}
}
if (_newData.getServiceGroupSubClass() instanceof NulledRelation)
{
ServiceGroup serviceGroupSubClass =
this.getServiceGroupSubClass();
if (serviceGroupSubClass != null)
{
serviceGroupSubClass.cascadeDelete();
}
}
else
{
ServiceGroup serviceGroupSubClass =
(ServiceGroup) _newData.getServiceGroupSubClass();
if (serviceGroupSubClass != null)
{
ServiceGroup _existing =
this.getServiceGroupSubClass();
if (_existing == null)
{
serviceGroupSubClass.copyDetachedValuesToOriginalOrInsertIfNew();
}
else
{
_existing.zCopyAttributesFrom(serviceGroupSubClass.zGetTxDataForRead());
_existing.zPersistDetachedRelationships(serviceGroupSubClass.zGetTxDataForRead());
}
}
}
}
public void zSetTxDetachedDeleted()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
if (_behavior.isDetached() && _behavior.isDeleted()) return;
PackageableElementData _newData = (PackageableElementData) _behavior.getCurrentDataForRead(this);
if (_newData.getEnumerationSubClass() != null && !(_newData.getEnumerationSubClass() instanceof NulledRelation))
{
((Enumeration)_newData.getEnumerationSubClass()).zSetTxDetachedDeleted();
}
if (_newData.getClassifierSubClass() != null && !(_newData.getClassifierSubClass() instanceof NulledRelation))
{
((Classifier)_newData.getClassifierSubClass()).zSetTxDetachedDeleted();
}
if (_newData.getAssociationSubClass() != null && !(_newData.getAssociationSubClass() instanceof NulledRelation))
{
((Association)_newData.getAssociationSubClass()).zSetTxDetachedDeleted();
}
if (_newData.getNamedProjectionSubClass() != null && !(_newData.getNamedProjectionSubClass() instanceof NulledRelation))
{
((NamedProjection)_newData.getNamedProjectionSubClass()).zSetTxDetachedDeleted();
}
if (_newData.getServiceGroupSubClass() != null && !(_newData.getServiceGroupSubClass() instanceof NulledRelation))
{
((ServiceGroup)_newData.getServiceGroupSubClass()).zSetTxDetachedDeleted();
}
this.zSetTxPersistenceState(PersistenceState.DETACHED_DELETED);
}
public void zSetNonTxDetachedDeleted()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _newData = (PackageableElementData) _behavior.getCurrentDataForRead(this);
if (_newData.getEnumerationSubClass() != null && !(_newData.getEnumerationSubClass() instanceof NulledRelation))
{
((Enumeration)_newData.getEnumerationSubClass()).zSetNonTxDetachedDeleted();
}
if (_newData.getClassifierSubClass() != null && !(_newData.getClassifierSubClass() instanceof NulledRelation))
{
((Classifier)_newData.getClassifierSubClass()).zSetNonTxDetachedDeleted();
}
if (_newData.getAssociationSubClass() != null && !(_newData.getAssociationSubClass() instanceof NulledRelation))
{
((Association)_newData.getAssociationSubClass()).zSetNonTxDetachedDeleted();
}
if (_newData.getNamedProjectionSubClass() != null && !(_newData.getNamedProjectionSubClass() instanceof NulledRelation))
{
((NamedProjection)_newData.getNamedProjectionSubClass()).zSetNonTxDetachedDeleted();
}
if (_newData.getServiceGroupSubClass() != null && !(_newData.getServiceGroupSubClass() instanceof NulledRelation))
{
((ServiceGroup)_newData.getServiceGroupSubClass()).zSetNonTxDetachedDeleted();
}
this.zSetNonTxPersistenceState(PersistenceState.DETACHED_DELETED);
}
/**
* Relationship Expression:
this.name = Enumeration.name
* @see Enumeration#getPackageableElementSuperClass() reverse relationship Enumeration.getPackageableElementSuperClass()
* @return The enumeration sub class
*/
public Enumeration getEnumerationSubClass()
{
Enumeration _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = EnumerationFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, forenumerationSubClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (Enumeration) _related;
if (_related == null)
{
_op = EnumerationFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getEnumerationSubClass() instanceof NulledRelation)
{
return null;
}
_result = (Enumeration) _data.getEnumerationSubClass();
if (_result == null)
{
{
Operation detachedOp = EnumerationFinder.name().eq(_data.getName());
_result = EnumerationFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
_data.setEnumerationSubClass(_result);
if (_result != null) _result.zSetParentContainerpackageableElementSuperClass(this);
}
}
else if (_behavior.isInMemory())
{
_result = (Enumeration) _data.getEnumerationSubClass();
}
if (_op != null)
{
_result = EnumerationFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setEnumerationSubClass(Enumeration enumerationSubClass)
{
Enumeration _enumerationSubClass = (Enumeration) enumerationSubClass;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
Object _prev = _data.getEnumerationSubClass();
_data.setEnumerationSubClass(_enumerationSubClass);
if (_enumerationSubClass != null)
{
_enumerationSubClass.setName(_data.getName());
_enumerationSubClass.zSetParentContainerpackageableElementSuperClass(this);
}
else if (_behavior.isDetached())
{
_data.setEnumerationSubClass(NulledRelation.create(_prev));
if (_prev != null && !(_prev instanceof NulledRelation)
&& (!((MithraTransactionalObject)_prev).isInMemoryAndNotInserted() || ((MithraTransactionalObject)_prev).zIsDetached()))
{
((MithraTransactionalObject)_prev).delete();
}
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
Enumeration _existing = this.getEnumerationSubClass();
if (_enumerationSubClass != _existing)
{
if (_existing != null)
{
_existing.cascadeDelete();
}
if (_enumerationSubClass != null)
{
_enumerationSubClass.setName(_data.getName());
_enumerationSubClass.cascadeInsert();
}
}
}
else throw new RuntimeException("not implemented");
}
public boolean isEnumerationSubClassModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
if (_data.getEnumerationSubClass() instanceof NulledRelation)
{
Enumeration _existing = this.getOriginalPersistentObject().getEnumerationSubClass();
return _existing != null;
}
Enumeration enumerationSubClass =
(Enumeration) _data.getEnumerationSubClass();
if( enumerationSubClass != null)
{
return enumerationSubClass.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = Classifier.name
* @see Classifier#getPackageableElementSuperClass() reverse relationship Classifier.getPackageableElementSuperClass()
* @return The classifier sub class
*/
public Classifier getClassifierSubClass()
{
Classifier _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = ClassifierFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, forclassifierSubClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (Classifier) _related;
if (_related == null)
{
_op = ClassifierFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getClassifierSubClass() instanceof NulledRelation)
{
return null;
}
_result = (Classifier) _data.getClassifierSubClass();
if (_result == null)
{
{
Operation detachedOp = ClassifierFinder.name().eq(_data.getName());
_result = ClassifierFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
_data.setClassifierSubClass(_result);
if (_result != null) _result.zSetParentContainerpackageableElementSuperClass(this);
}
}
else if (_behavior.isInMemory())
{
_result = (Classifier) _data.getClassifierSubClass();
}
if (_op != null)
{
_result = ClassifierFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setClassifierSubClass(Classifier classifierSubClass)
{
Classifier _classifierSubClass = (Classifier) classifierSubClass;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
Object _prev = _data.getClassifierSubClass();
_data.setClassifierSubClass(_classifierSubClass);
if (_classifierSubClass != null)
{
_classifierSubClass.setName(_data.getName());
_classifierSubClass.zSetParentContainerpackageableElementSuperClass(this);
}
else if (_behavior.isDetached())
{
_data.setClassifierSubClass(NulledRelation.create(_prev));
if (_prev != null && !(_prev instanceof NulledRelation)
&& (!((MithraTransactionalObject)_prev).isInMemoryAndNotInserted() || ((MithraTransactionalObject)_prev).zIsDetached()))
{
((MithraTransactionalObject)_prev).delete();
}
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
Classifier _existing = this.getClassifierSubClass();
if (_classifierSubClass != _existing)
{
if (_existing != null)
{
_existing.cascadeDelete();
}
if (_classifierSubClass != null)
{
_classifierSubClass.setName(_data.getName());
_classifierSubClass.cascadeInsert();
}
}
}
else throw new RuntimeException("not implemented");
}
public boolean isClassifierSubClassModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
if (_data.getClassifierSubClass() instanceof NulledRelation)
{
Classifier _existing = this.getOriginalPersistentObject().getClassifierSubClass();
return _existing != null;
}
Classifier classifierSubClass =
(Classifier) _data.getClassifierSubClass();
if( classifierSubClass != null)
{
return classifierSubClass.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = Association.name
* @see Association#getPackageableElementSuperClass() reverse relationship Association.getPackageableElementSuperClass()
* @return The association sub class
*/
public Association getAssociationSubClass()
{
Association _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = AssociationFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, forassociationSubClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (Association) _related;
if (_related == null)
{
_op = AssociationFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getAssociationSubClass() instanceof NulledRelation)
{
return null;
}
_result = (Association) _data.getAssociationSubClass();
if (_result == null)
{
{
Operation detachedOp = AssociationFinder.name().eq(_data.getName());
_result = AssociationFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
_data.setAssociationSubClass(_result);
if (_result != null) _result.zSetParentContainerpackageableElementSuperClass(this);
}
}
else if (_behavior.isInMemory())
{
_result = (Association) _data.getAssociationSubClass();
}
if (_op != null)
{
_result = AssociationFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setAssociationSubClass(Association associationSubClass)
{
Association _associationSubClass = (Association) associationSubClass;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
Object _prev = _data.getAssociationSubClass();
_data.setAssociationSubClass(_associationSubClass);
if (_associationSubClass != null)
{
_associationSubClass.setName(_data.getName());
_associationSubClass.zSetParentContainerpackageableElementSuperClass(this);
}
else if (_behavior.isDetached())
{
_data.setAssociationSubClass(NulledRelation.create(_prev));
if (_prev != null && !(_prev instanceof NulledRelation)
&& (!((MithraTransactionalObject)_prev).isInMemoryAndNotInserted() || ((MithraTransactionalObject)_prev).zIsDetached()))
{
((MithraTransactionalObject)_prev).delete();
}
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
Association _existing = this.getAssociationSubClass();
if (_associationSubClass != _existing)
{
if (_existing != null)
{
_existing.cascadeDelete();
}
if (_associationSubClass != null)
{
_associationSubClass.setName(_data.getName());
_associationSubClass.cascadeInsert();
}
}
}
else throw new RuntimeException("not implemented");
}
public boolean isAssociationSubClassModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
if (_data.getAssociationSubClass() instanceof NulledRelation)
{
Association _existing = this.getOriginalPersistentObject().getAssociationSubClass();
return _existing != null;
}
Association associationSubClass =
(Association) _data.getAssociationSubClass();
if( associationSubClass != null)
{
return associationSubClass.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = NamedProjection.name
* @see NamedProjection#getPackageableElementSuperClass() reverse relationship NamedProjection.getPackageableElementSuperClass()
* @return The named projection sub class
*/
public NamedProjection getNamedProjectionSubClass()
{
NamedProjection _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = NamedProjectionFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, fornamedProjectionSubClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (NamedProjection) _related;
if (_related == null)
{
_op = NamedProjectionFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getNamedProjectionSubClass() instanceof NulledRelation)
{
return null;
}
_result = (NamedProjection) _data.getNamedProjectionSubClass();
if (_result == null)
{
{
Operation detachedOp = NamedProjectionFinder.name().eq(_data.getName());
_result = NamedProjectionFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
_data.setNamedProjectionSubClass(_result);
if (_result != null) _result.zSetParentContainerpackageableElementSuperClass(this);
}
}
else if (_behavior.isInMemory())
{
_result = (NamedProjection) _data.getNamedProjectionSubClass();
}
if (_op != null)
{
_result = NamedProjectionFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setNamedProjectionSubClass(NamedProjection namedProjectionSubClass)
{
NamedProjection _namedProjectionSubClass = (NamedProjection) namedProjectionSubClass;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
Object _prev = _data.getNamedProjectionSubClass();
_data.setNamedProjectionSubClass(_namedProjectionSubClass);
if (_namedProjectionSubClass != null)
{
_namedProjectionSubClass.setName(_data.getName());
_namedProjectionSubClass.zSetParentContainerpackageableElementSuperClass(this);
}
else if (_behavior.isDetached())
{
_data.setNamedProjectionSubClass(NulledRelation.create(_prev));
if (_prev != null && !(_prev instanceof NulledRelation)
&& (!((MithraTransactionalObject)_prev).isInMemoryAndNotInserted() || ((MithraTransactionalObject)_prev).zIsDetached()))
{
((MithraTransactionalObject)_prev).delete();
}
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
NamedProjection _existing = this.getNamedProjectionSubClass();
if (_namedProjectionSubClass != _existing)
{
if (_existing != null)
{
_existing.cascadeDelete();
}
if (_namedProjectionSubClass != null)
{
_namedProjectionSubClass.setName(_data.getName());
_namedProjectionSubClass.cascadeInsert();
}
}
}
else throw new RuntimeException("not implemented");
}
public boolean isNamedProjectionSubClassModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
if (_data.getNamedProjectionSubClass() instanceof NulledRelation)
{
NamedProjection _existing = this.getOriginalPersistentObject().getNamedProjectionSubClass();
return _existing != null;
}
NamedProjection namedProjectionSubClass =
(NamedProjection) _data.getNamedProjectionSubClass();
if( namedProjectionSubClass != null)
{
return namedProjectionSubClass.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = ServiceGroup.name
* @see ServiceGroup#getPackageableElementSuperClass() reverse relationship ServiceGroup.getPackageableElementSuperClass()
* @return The service group sub class
*/
public ServiceGroup getServiceGroupSubClass()
{
ServiceGroup _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = ServiceGroupFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, forserviceGroupSubClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (ServiceGroup) _related;
if (_related == null)
{
_op = ServiceGroupFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getServiceGroupSubClass() instanceof NulledRelation)
{
return null;
}
_result = (ServiceGroup) _data.getServiceGroupSubClass();
if (_result == null)
{
{
Operation detachedOp = ServiceGroupFinder.name().eq(_data.getName());
_result = ServiceGroupFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
_data.setServiceGroupSubClass(_result);
if (_result != null) _result.zSetParentContainerpackageableElementSuperClass(this);
}
}
else if (_behavior.isInMemory())
{
_result = (ServiceGroup) _data.getServiceGroupSubClass();
}
if (_op != null)
{
_result = ServiceGroupFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setServiceGroupSubClass(ServiceGroup serviceGroupSubClass)
{
ServiceGroup _serviceGroupSubClass = (ServiceGroup) serviceGroupSubClass;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
Object _prev = _data.getServiceGroupSubClass();
_data.setServiceGroupSubClass(_serviceGroupSubClass);
if (_serviceGroupSubClass != null)
{
_serviceGroupSubClass.setName(_data.getName());
_serviceGroupSubClass.zSetParentContainerpackageableElementSuperClass(this);
}
else if (_behavior.isDetached())
{
_data.setServiceGroupSubClass(NulledRelation.create(_prev));
if (_prev != null && !(_prev instanceof NulledRelation)
&& (!((MithraTransactionalObject)_prev).isInMemoryAndNotInserted() || ((MithraTransactionalObject)_prev).zIsDetached()))
{
((MithraTransactionalObject)_prev).delete();
}
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
ServiceGroup _existing = this.getServiceGroupSubClass();
if (_serviceGroupSubClass != _existing)
{
if (_existing != null)
{
_existing.cascadeDelete();
}
if (_serviceGroupSubClass != null)
{
_serviceGroupSubClass.setName(_data.getName());
_serviceGroupSubClass.cascadeInsert();
}
}
}
else throw new RuntimeException("not implemented");
}
public boolean isServiceGroupSubClassModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForRead(this);
if (_data.getServiceGroupSubClass() instanceof NulledRelation)
{
ServiceGroup _existing = this.getOriginalPersistentObject().getServiceGroupSubClass();
return _existing != null;
}
ServiceGroup serviceGroupSubClass =
(ServiceGroup) _data.getServiceGroupSubClass();
if( serviceGroupSubClass != null)
{
return serviceGroupSubClass.isModifiedSinceDetachment();
}
return false;
}
protected void cascadeInsertImpl() throws MithraBusinessException
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
Enumeration enumerationSubClass =
(Enumeration) _data.getEnumerationSubClass();
Classifier classifierSubClass =
(Classifier) _data.getClassifierSubClass();
Association associationSubClass =
(Association) _data.getAssociationSubClass();
NamedProjection namedProjectionSubClass =
(NamedProjection) _data.getNamedProjectionSubClass();
ServiceGroup serviceGroupSubClass =
(ServiceGroup) _data.getServiceGroupSubClass();
_behavior.insert(this);
if (enumerationSubClass != null)
{
enumerationSubClass.cascadeInsert();
}
if (classifierSubClass != null)
{
classifierSubClass.cascadeInsert();
}
if (associationSubClass != null)
{
associationSubClass.cascadeInsert();
}
if (namedProjectionSubClass != null)
{
namedProjectionSubClass.cascadeInsert();
}
if (serviceGroupSubClass != null)
{
serviceGroupSubClass.cascadeInsert();
}
}
@Override
public Map< RelatedFinder, StatisticCounter > zAddNavigatedRelationshipsStats(RelatedFinder finder, Map< RelatedFinder, StatisticCounter > navigationStats)
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_behavior.addNavigatedRelationshipsStats(this, finder, navigationStats);
return navigationStats;
}
@Override
public Map< RelatedFinder, StatisticCounter > zAddNavigatedRelationshipsStatsForUpdate(RelatedFinder parentFinderGeneric, Map< RelatedFinder, StatisticCounter > navigationStats)
{
PackageableElementFinder.PackageableElementRelatedFinder parentFinder = (PackageableElementFinder.PackageableElementRelatedFinder) parentFinderGeneric;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _newData = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
if (_newData.getEnumerationSubClass() instanceof NulledRelation)
{
RelatedFinder dependentFinder = parentFinder.enumerationSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, true, navigationStats);
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(dependentFinder, navigationStats);
}
else
{
Enumeration enumerationSubClass =
(Enumeration) _newData.getEnumerationSubClass();
RelatedFinder dependentFinder = parentFinder.enumerationSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, enumerationSubClass != null, navigationStats);
if (enumerationSubClass != null)
{
_behavior.addNavigatedRelationshipsStats(enumerationSubClass, dependentFinder, navigationStats);
}
}
if (_newData.getClassifierSubClass() instanceof NulledRelation)
{
RelatedFinder dependentFinder = parentFinder.classifierSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, true, navigationStats);
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(dependentFinder, navigationStats);
}
else
{
Classifier classifierSubClass =
(Classifier) _newData.getClassifierSubClass();
RelatedFinder dependentFinder = parentFinder.classifierSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, classifierSubClass != null, navigationStats);
if (classifierSubClass != null)
{
_behavior.addNavigatedRelationshipsStats(classifierSubClass, dependentFinder, navigationStats);
}
}
if (_newData.getAssociationSubClass() instanceof NulledRelation)
{
RelatedFinder dependentFinder = parentFinder.associationSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, true, navigationStats);
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(dependentFinder, navigationStats);
}
else
{
Association associationSubClass =
(Association) _newData.getAssociationSubClass();
RelatedFinder dependentFinder = parentFinder.associationSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, associationSubClass != null, navigationStats);
if (associationSubClass != null)
{
_behavior.addNavigatedRelationshipsStats(associationSubClass, dependentFinder, navigationStats);
}
}
if (_newData.getNamedProjectionSubClass() instanceof NulledRelation)
{
RelatedFinder dependentFinder = parentFinder.namedProjectionSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, true, navigationStats);
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(dependentFinder, navigationStats);
}
else
{
NamedProjection namedProjectionSubClass =
(NamedProjection) _newData.getNamedProjectionSubClass();
RelatedFinder dependentFinder = parentFinder.namedProjectionSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, namedProjectionSubClass != null, navigationStats);
if (namedProjectionSubClass != null)
{
_behavior.addNavigatedRelationshipsStats(namedProjectionSubClass, dependentFinder, navigationStats);
}
}
if (_newData.getServiceGroupSubClass() instanceof NulledRelation)
{
RelatedFinder dependentFinder = parentFinder.serviceGroupSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, true, navigationStats);
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(dependentFinder, navigationStats);
}
else
{
ServiceGroup serviceGroupSubClass =
(ServiceGroup) _newData.getServiceGroupSubClass();
RelatedFinder dependentFinder = parentFinder.serviceGroupSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, serviceGroupSubClass != null, navigationStats);
if (serviceGroupSubClass != null)
{
_behavior.addNavigatedRelationshipsStats(serviceGroupSubClass, dependentFinder, navigationStats);
}
}
return navigationStats;
}
@Override
public Map< RelatedFinder, StatisticCounter > zAddNavigatedRelationshipsStatsForDelete(RelatedFinder parentFinder, Map< RelatedFinder, StatisticCounter > navigationStats)
{
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(parentFinder, navigationStats);
return navigationStats;
}
@Override
public PackageableElement zCascadeCopyThenInsert() throws MithraBusinessException
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
PackageableElementData _data = (PackageableElementData) _behavior.getCurrentDataForWrite(this);
Enumeration enumerationSubClass =
(Enumeration) _data.getEnumerationSubClass();
Classifier classifierSubClass =
(Classifier) _data.getClassifierSubClass();
Association associationSubClass =
(Association) _data.getAssociationSubClass();
NamedProjection namedProjectionSubClass =
(NamedProjection) _data.getNamedProjectionSubClass();
ServiceGroup serviceGroupSubClass =
(ServiceGroup) _data.getServiceGroupSubClass();
PackageableElement original = (PackageableElement) _behavior.copyThenInsert(this);
if (enumerationSubClass != null)
{
enumerationSubClass.zCascadeCopyThenInsert();
}
if (classifierSubClass != null)
{
classifierSubClass.zCascadeCopyThenInsert();
}
if (associationSubClass != null)
{
associationSubClass.zCascadeCopyThenInsert();
}
if (namedProjectionSubClass != null)
{
namedProjectionSubClass.zCascadeCopyThenInsert();
}
if (serviceGroupSubClass != null)
{
serviceGroupSubClass.zCascadeCopyThenInsert();
}
return original;
}
protected void cascadeDeleteImpl() throws MithraBusinessException
{
{
Enumeration related = this.getEnumerationSubClass();
if (related != null)
related.cascadeDelete();
}
{
Classifier related = this.getClassifierSubClass();
if (related != null)
related.cascadeDelete();
}
{
Association related = this.getAssociationSubClass();
if (related != null)
related.cascadeDelete();
}
{
NamedProjection related = this.getNamedProjectionSubClass();
if (related != null)
related.cascadeDelete();
}
{
ServiceGroup related = this.getServiceGroupSubClass();
if (related != null)
related.cascadeDelete();
}
this.delete();
}
public Cache zGetCache()
{
return PackageableElementFinder.getMithraObjectPortal().getCache();
}
public MithraObjectPortal zGetPortal()
{
return PackageableElementFinder.getMithraObjectPortal();
}
public PackageableElement getOriginalPersistentObject()
{
return this.zFindOriginal();
}
protected boolean issueUpdatesForNonPrimaryKeys(TransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData)
{
boolean changed = false;
changed |= zUpdateInteger(behavior, data, newData, PackageableElementFinder.ordinal(), false);
changed |= zUpdateString(behavior, data, newData, PackageableElementFinder.packageName(), false);
return changed;
}
protected boolean issueUpdatesForPrimaryKeys(TransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData)
{
boolean changed = false;
changed |= zUpdateString(behavior, data, newData, PackageableElementFinder.name(), false);
return changed;
}
public Object readResolve() throws ObjectStreamException
{
PackageableElementAbstract result = (PackageableElementAbstract) super.readResolve();
if (result.persistenceState == PersistenceState.PERSISTED)
{
result.persistenceState = PERSISTED_STATE;
}
else if (result.persistenceState == PersistenceState.IN_MEMORY)
{
result.persistenceState = MEMORY_STATE;
}
return result;
}
protected static void zConfigNonTx()
{
MEMORY_STATE = PersistenceState.IN_MEMORY_NON_TRANSACTIONAL;
PERSISTED_STATE = PersistenceState.PERSISTED_NON_TRANSACTIONAL;
}
protected static void zConfigFullTx()
{
MEMORY_STATE = PersistenceState.IN_MEMORY;
PERSISTED_STATE = PersistenceState.PERSISTED;
}
protected class EnumerationSubClassAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Enumeration item = (Enumeration) relatedObject;
item.setName(getName());
item.zSetParentContainerpackageableElementSuperClass(PackageableElementAbstract.this);
}
}
protected class EnumerationSubClassAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Enumeration item = (Enumeration) relatedObject;
item.setName(getName());
item.cascadeInsert();
}
}
protected class ClassifierSubClassAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Classifier item = (Classifier) relatedObject;
item.setName(getName());
item.zSetParentContainerpackageableElementSuperClass(PackageableElementAbstract.this);
}
}
protected class ClassifierSubClassAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Classifier item = (Classifier) relatedObject;
item.setName(getName());
item.cascadeInsert();
}
}
protected class AssociationSubClassAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Association item = (Association) relatedObject;
item.setName(getName());
item.zSetParentContainerpackageableElementSuperClass(PackageableElementAbstract.this);
}
}
protected class AssociationSubClassAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Association item = (Association) relatedObject;
item.setName(getName());
item.cascadeInsert();
}
}
protected class NamedProjectionSubClassAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
NamedProjection item = (NamedProjection) relatedObject;
item.setName(getName());
item.zSetParentContainerpackageableElementSuperClass(PackageableElementAbstract.this);
}
}
protected class NamedProjectionSubClassAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
NamedProjection item = (NamedProjection) relatedObject;
item.setName(getName());
item.cascadeInsert();
}
}
protected class ServiceGroupSubClassAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
ServiceGroup item = (ServiceGroup) relatedObject;
item.setName(getName());
item.zSetParentContainerpackageableElementSuperClass(PackageableElementAbstract.this);
}
}
protected class ServiceGroupSubClassAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
ServiceGroup item = (ServiceGroup) relatedObject;
item.setName(getName());
item.cascadeInsert();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy