klass.model.meta.domain.ClassifierAbstract 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 ClassifierAbstract extends com.gs.fw.common.mithra.superclassimpl.MithraTransactionalObjectImpl
{
private static byte MEMORY_STATE = PersistenceState.IN_MEMORY;
private static byte PERSISTED_STATE = PersistenceState.PERSISTED;
private static final Logger logger = LoggerFactory.getLogger(Classifier.class.getName());
private static final RelationshipHashStrategy forinterfaceSubClass = new InterfaceSubClassRhs();
private static final RelationshipHashStrategy forklassSubClass = new KlassSubClassRhs();
private static final RelationshipHashStrategy forpackageableElementSuperClass = new PackageableElementSuperClassRhs();
private static final class InterfaceSubClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
InterfaceData _castedTargetData = (InterfaceData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
private static final class KlassSubClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
KlassData _castedTargetData = (KlassData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
private static final class PackageableElementSuperClassRhs implements RelationshipHashStrategy
{
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
PackageableElementData _castedTargetData = (PackageableElementData) _targetData;
if (_castedSrcData.getName()!= null && _castedSrcData.getName().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
return HashUtil.hash(_castedSrcData.getName());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
ClassifierData _castedSrcData = (ClassifierData) _srcData;
return HashUtil.offHeapHash(_castedSrcData.getName());
}
}
public ClassifierAbstract()
{
this.persistenceState = MEMORY_STATE;
}
public Classifier getDetachedCopy() throws MithraBusinessException
{
return (Classifier) super.getDetachedCopy();
}
public Classifier getNonPersistentCopy() throws MithraBusinessException
{
Classifier result = (Classifier) super.getNonPersistentCopy();
result.persistenceState = MEMORY_STATE;
return result;
}
public Classifier copyDetachedValuesToOriginalOrInsertIfNew()
{
return (Classifier) this.zCopyDetachedValuesToOriginalOrInsertIfNew();
}
public Classifier zFindOriginal()
{
ClassifierData data = (ClassifierData) this.currentData;
Operation op;
op = ClassifierFinder.name().eq(data.getName());
return ClassifierFinder.findOne(op);
}
public boolean isModifiedSinceDetachmentByDependentRelationships()
{
if(this.isModifiedSinceDetachment()) return true;
if(isSuperInterfacesModifiedSinceDetachment()) return true;
if(isClassifierModifiersModifiedSinceDetachment()) return true;
if(isDataTypePropertiesModifiedSinceDetachment()) return true;
if(isInterfaceSubClassModifiedSinceDetachment()) return true;
if(isKlassSubClassModifiedSinceDetachment()) return true;
return false;
}
private Logger getLogger()
{
return logger;
}
public MithraDataObject zAllocateData()
{
return new ClassifierData();
}
protected void zSetFromClassifierData( ClassifierData data )
{
super.zSetData(data);
this.persistenceState = PERSISTED_STATE;
}
public void setFromClassifierData( ClassifierData data )
{
super.zSetData(data);
}
public void zWriteDataClassName(ObjectOutput out) throws IOException
{
}
public final boolean isNameNull()
{
return ((ClassifierData) this.zSynchronizedGetData()).isNameNull();
}
public final String getName()
{
ClassifierData data = (ClassifierData) 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(ClassifierFinder.name(), newValue, true, false );
if (d == null) return;
ClassifierData data = (ClassifierData) d;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
if (!_behavior.isPersisted())
{
ClassifierInterfaceMappingList superInterfaces =
(ClassifierInterfaceMappingList ) data.getSuperInterfaces();
if (superInterfaces != null)
{
superInterfaces.setClassifierName(newValue);
}
ClassifierModifierList classifierModifiers =
(ClassifierModifierList ) data.getClassifierModifiers();
if (classifierModifiers != null)
{
classifierModifiers.setClassifierName(newValue);
}
DataTypePropertyList dataTypeProperties =
(DataTypePropertyList ) data.getDataTypeProperties();
if (dataTypeProperties != null)
{
dataTypeProperties.setClassifierName(newValue);
}
Interface interfaceSubClass =
(Interface ) data.getInterfaceSubClass();
if (interfaceSubClass != null)
{
interfaceSubClass.setName(newValue);
}
Klass klassSubClass =
(Klass ) data.getKlassSubClass();
if (klassSubClass != null)
{
klassSubClass.setName(newValue);
}
}
}
protected void issuePrimitiveNullSetters(TransactionalBehavior behavior, MithraDataObject data)
{
}
public void zPersistDetachedRelationships(MithraDataObject _data)
{
ClassifierData _newData = (ClassifierData) _data;
{
ClassifierInterfaceMappingList superInterfaces =
(ClassifierInterfaceMappingList) _newData.getSuperInterfaces();
if (superInterfaces != null)
{
superInterfaces.copyDetachedValuesToOriginalOrInsertIfNewOrDeleteIfRemoved();
}
}
{
ClassifierModifierList classifierModifiers =
(ClassifierModifierList) _newData.getClassifierModifiers();
if (classifierModifiers != null)
{
classifierModifiers.copyDetachedValuesToOriginalOrInsertIfNewOrDeleteIfRemoved();
}
}
{
DataTypePropertyList dataTypeProperties =
(DataTypePropertyList) _newData.getDataTypeProperties();
if (dataTypeProperties != null)
{
dataTypeProperties.copyDetachedValuesToOriginalOrInsertIfNewOrDeleteIfRemoved();
}
}
if (_newData.getInterfaceSubClass() instanceof NulledRelation)
{
Interface interfaceSubClass =
this.getInterfaceSubClass();
if (interfaceSubClass != null)
{
interfaceSubClass.cascadeDelete();
}
}
else
{
Interface interfaceSubClass =
(Interface) _newData.getInterfaceSubClass();
if (interfaceSubClass != null)
{
Interface _existing =
this.getInterfaceSubClass();
if (_existing == null)
{
interfaceSubClass.copyDetachedValuesToOriginalOrInsertIfNew();
}
else
{
_existing.zCopyAttributesFrom(interfaceSubClass.zGetTxDataForRead());
_existing.zPersistDetachedRelationships(interfaceSubClass.zGetTxDataForRead());
}
}
}
if (_newData.getKlassSubClass() instanceof NulledRelation)
{
Klass klassSubClass =
this.getKlassSubClass();
if (klassSubClass != null)
{
klassSubClass.cascadeDelete();
}
}
else
{
Klass klassSubClass =
(Klass) _newData.getKlassSubClass();
if (klassSubClass != null)
{
Klass _existing =
this.getKlassSubClass();
if (_existing == null)
{
klassSubClass.copyDetachedValuesToOriginalOrInsertIfNew();
}
else
{
_existing.zCopyAttributesFrom(klassSubClass.zGetTxDataForRead());
_existing.zPersistDetachedRelationships(klassSubClass.zGetTxDataForRead());
}
}
}
}
public void zSetTxDetachedDeleted()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
if (_behavior.isDetached() && _behavior.isDeleted()) return;
ClassifierData _newData = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_newData.getSuperInterfaces() != null && !(_newData.getSuperInterfaces() instanceof NulledRelation))
{
((ClassifierInterfaceMappingList)_newData.getSuperInterfaces()).zSetTxDetachedDeleted();
}
if (_newData.getClassifierModifiers() != null && !(_newData.getClassifierModifiers() instanceof NulledRelation))
{
((ClassifierModifierList)_newData.getClassifierModifiers()).zSetTxDetachedDeleted();
}
if (_newData.getDataTypeProperties() != null && !(_newData.getDataTypeProperties() instanceof NulledRelation))
{
((DataTypePropertyList)_newData.getDataTypeProperties()).zSetTxDetachedDeleted();
}
if (_newData.getInterfaceSubClass() != null && !(_newData.getInterfaceSubClass() instanceof NulledRelation))
{
((Interface)_newData.getInterfaceSubClass()).zSetTxDetachedDeleted();
}
if (_newData.getKlassSubClass() != null && !(_newData.getKlassSubClass() instanceof NulledRelation))
{
((Klass)_newData.getKlassSubClass()).zSetTxDetachedDeleted();
}
this.zSetTxPersistenceState(PersistenceState.DETACHED_DELETED);
}
public void zSetNonTxDetachedDeleted()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _newData = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_newData.getSuperInterfaces() != null && !(_newData.getSuperInterfaces() instanceof NulledRelation))
{
((ClassifierInterfaceMappingList)_newData.getSuperInterfaces()).zSetNonTxDetachedDeleted();
}
if (_newData.getClassifierModifiers() != null && !(_newData.getClassifierModifiers() instanceof NulledRelation))
{
((ClassifierModifierList)_newData.getClassifierModifiers()).zSetNonTxDetachedDeleted();
}
if (_newData.getDataTypeProperties() != null && !(_newData.getDataTypeProperties() instanceof NulledRelation))
{
((DataTypePropertyList)_newData.getDataTypeProperties()).zSetNonTxDetachedDeleted();
}
if (_newData.getInterfaceSubClass() != null && !(_newData.getInterfaceSubClass() instanceof NulledRelation))
{
((Interface)_newData.getInterfaceSubClass()).zSetNonTxDetachedDeleted();
}
if (_newData.getKlassSubClass() != null && !(_newData.getKlassSubClass() instanceof NulledRelation))
{
((Klass)_newData.getKlassSubClass()).zSetNonTxDetachedDeleted();
}
this.zSetNonTxPersistenceState(PersistenceState.DETACHED_DELETED);
}
/**
* Relationship Expression:
this.name = ClassifierInterfaceMapping.classifierName
* Order By: ordinal asc
.
* @see ClassifierInterfaceMapping#getSubClassifier() reverse relationship ClassifierInterfaceMapping.getSubClassifier()
* @return super interfaces
*/
public ClassifierInterfaceMappingList getSuperInterfaces()
{
ClassifierInterfaceMappingList _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_behavior.isPersisted())
{
{
{
_op = ClassifierInterfaceMappingFinder.classifierName().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
_result = (ClassifierInterfaceMappingList) _data.getSuperInterfaces();
if (_result == null)
{
{
Operation detachedOp = ClassifierInterfaceMappingFinder.classifierName().eq(_data.getName());
_result = new ClassifierInterfaceMappingList(detachedOp);
_result.zSetForRelationship();
if(_result != null)
{
_result = _result.getDetachedCopy();
}
_result.zSetAddHandler(new SuperInterfacesAddHandlerInMemory());
}
_result.setOrderBy(ClassifierInterfaceMappingFinder.ordinal().ascendingOrderBy());
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setSuperInterfaces(_result);
if (_result != null) _result.zSetParentContainersubClassifier(this);
}
}
else if (_behavior.isInMemory())
{
_result = (ClassifierInterfaceMappingList) _data.getSuperInterfaces();
if (_result == null)
{
_result = new ClassifierInterfaceMappingList();
_result.zSetAddHandler(new SuperInterfacesAddHandlerInMemory());
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setSuperInterfaces(_result);
}
}
if (_op != null)
{
_result = new ClassifierInterfaceMappingList(_op);
_result.zSetForRelationship();
_result.zSetRemoveHandler(DeleteOnRemoveHandler.getInstance());
_result.zSetAddHandler(new SuperInterfacesAddHandlerPersisted());
_result.setOrderBy(ClassifierInterfaceMappingFinder.ordinal().ascendingOrderBy());
}
return _result;
}
public void setSuperInterfaces(ClassifierInterfaceMappingList superInterfaces)
{
ClassifierInterfaceMappingList _superInterfaces = (ClassifierInterfaceMappingList) superInterfaces;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
if (_behavior.isDetached() && _superInterfaces != null)
{
_superInterfaces.zMakeDetached(ClassifierInterfaceMappingFinder.classifierName().eq(_data.getName()),
_data.getSuperInterfaces());
}
_data.setSuperInterfaces(_superInterfaces);
if (_superInterfaces != null)
{
_superInterfaces.setClassifierName(_data.getName());
_superInterfaces.zSetParentContainersubClassifier(this);
_superInterfaces.zSetAddHandler(new SuperInterfacesAddHandlerInMemory());
}
else if (_behavior.isDetached())
{
throw new MithraBusinessException("to-many relationships cannot be set to null. Use the clear() method on the list instead.");
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
_superInterfaces.zSetAddHandler(new SuperInterfacesAddHandlerPersisted());
ClassifierInterfaceMappingList superInterfacesToDelete = new ClassifierInterfaceMappingList();
superInterfacesToDelete.addAll(this.getSuperInterfaces());
for(int i=0;i < _superInterfaces.size(); i++)
{
ClassifierInterfaceMapping item = _superInterfaces.getClassifierInterfaceMappingAt(i);
if (!superInterfacesToDelete.remove(item))
{
item.setClassifierName(_data.getName());
item.cascadeInsert();
}
}
superInterfacesToDelete.cascadeDeleteAll();
}
else throw new RuntimeException("not implemented");
}
public boolean isSuperInterfacesModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
ClassifierInterfaceMappingList superInterfaces =
(ClassifierInterfaceMappingList) _data.getSuperInterfaces();
if( superInterfaces != null)
{
return superInterfaces.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = ClassifierModifier.classifierName
* Order By: ordinal asc
.
* @see ClassifierModifier#getOwningClassifier() reverse relationship ClassifierModifier.getOwningClassifier()
* @return classifier modifiers
*/
public ClassifierModifierList getClassifierModifiers()
{
ClassifierModifierList _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_behavior.isPersisted())
{
{
{
_op = ClassifierModifierFinder.classifierName().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
_result = (ClassifierModifierList) _data.getClassifierModifiers();
if (_result == null)
{
{
Operation detachedOp = ClassifierModifierFinder.classifierName().eq(_data.getName());
_result = new ClassifierModifierList(detachedOp);
_result.zSetForRelationship();
if(_result != null)
{
_result = _result.getDetachedCopy();
}
_result.zSetAddHandler(new ClassifierModifiersAddHandlerInMemory());
}
_result.setOrderBy(ClassifierModifierFinder.ordinal().ascendingOrderBy());
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setClassifierModifiers(_result);
if (_result != null) _result.zSetParentContainerowningClassifier(this);
}
}
else if (_behavior.isInMemory())
{
_result = (ClassifierModifierList) _data.getClassifierModifiers();
if (_result == null)
{
_result = new ClassifierModifierList();
_result.zSetAddHandler(new ClassifierModifiersAddHandlerInMemory());
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setClassifierModifiers(_result);
}
}
if (_op != null)
{
_result = new ClassifierModifierList(_op);
_result.zSetForRelationship();
_result.zSetRemoveHandler(DeleteOnRemoveHandler.getInstance());
_result.zSetAddHandler(new ClassifierModifiersAddHandlerPersisted());
_result.setOrderBy(ClassifierModifierFinder.ordinal().ascendingOrderBy());
}
return _result;
}
public void setClassifierModifiers(ClassifierModifierList classifierModifiers)
{
ClassifierModifierList _classifierModifiers = (ClassifierModifierList) classifierModifiers;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
if (_behavior.isDetached() && _classifierModifiers != null)
{
_classifierModifiers.zMakeDetached(ClassifierModifierFinder.classifierName().eq(_data.getName()),
_data.getClassifierModifiers());
}
_data.setClassifierModifiers(_classifierModifiers);
if (_classifierModifiers != null)
{
_classifierModifiers.setClassifierName(_data.getName());
_classifierModifiers.zSetParentContainerowningClassifier(this);
_classifierModifiers.zSetAddHandler(new ClassifierModifiersAddHandlerInMemory());
}
else if (_behavior.isDetached())
{
throw new MithraBusinessException("to-many relationships cannot be set to null. Use the clear() method on the list instead.");
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
_classifierModifiers.zSetAddHandler(new ClassifierModifiersAddHandlerPersisted());
ClassifierModifierList classifierModifiersToDelete = new ClassifierModifierList();
classifierModifiersToDelete.addAll(this.getClassifierModifiers());
for(int i=0;i < _classifierModifiers.size(); i++)
{
ClassifierModifier item = _classifierModifiers.getClassifierModifierAt(i);
if (!classifierModifiersToDelete.remove(item))
{
item.setClassifierName(_data.getName());
item.cascadeInsert();
}
}
classifierModifiersToDelete.cascadeDeleteAll();
}
else throw new RuntimeException("not implemented");
}
public boolean isClassifierModifiersModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
ClassifierModifierList classifierModifiers =
(ClassifierModifierList) _data.getClassifierModifiers();
if( classifierModifiers != null)
{
return classifierModifiers.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = DataTypeProperty.classifierName
* Order By: ordinal asc
.
* @see DataTypeProperty#getOwningClassifier() reverse relationship DataTypeProperty.getOwningClassifier()
* @return data type properties
*/
public DataTypePropertyList getDataTypeProperties()
{
DataTypePropertyList _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_behavior.isPersisted())
{
{
{
_op = DataTypePropertyFinder.classifierName().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
_result = (DataTypePropertyList) _data.getDataTypeProperties();
if (_result == null)
{
{
Operation detachedOp = DataTypePropertyFinder.classifierName().eq(_data.getName());
_result = new DataTypePropertyList(detachedOp);
_result.zSetForRelationship();
if(_result != null)
{
_result = _result.getDetachedCopy();
}
_result.zSetAddHandler(new DataTypePropertiesAddHandlerInMemory());
}
_result.setOrderBy(DataTypePropertyFinder.ordinal().ascendingOrderBy());
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setDataTypeProperties(_result);
if (_result != null) _result.zSetParentContainerowningClassifier(this);
}
}
else if (_behavior.isInMemory())
{
_result = (DataTypePropertyList) _data.getDataTypeProperties();
if (_result == null)
{
_result = new DataTypePropertyList();
_result.zSetAddHandler(new DataTypePropertiesAddHandlerInMemory());
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setDataTypeProperties(_result);
}
}
if (_op != null)
{
_result = new DataTypePropertyList(_op);
_result.zSetForRelationship();
_result.zSetRemoveHandler(DeleteOnRemoveHandler.getInstance());
_result.zSetAddHandler(new DataTypePropertiesAddHandlerPersisted());
_result.setOrderBy(DataTypePropertyFinder.ordinal().ascendingOrderBy());
}
return _result;
}
public void setDataTypeProperties(DataTypePropertyList dataTypeProperties)
{
DataTypePropertyList _dataTypeProperties = (DataTypePropertyList) dataTypeProperties;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
if (_behavior.isDetached() && _dataTypeProperties != null)
{
_dataTypeProperties.zMakeDetached(DataTypePropertyFinder.classifierName().eq(_data.getName()),
_data.getDataTypeProperties());
}
_data.setDataTypeProperties(_dataTypeProperties);
if (_dataTypeProperties != null)
{
_dataTypeProperties.setClassifierName(_data.getName());
_dataTypeProperties.zSetParentContainerowningClassifier(this);
_dataTypeProperties.zSetAddHandler(new DataTypePropertiesAddHandlerInMemory());
}
else if (_behavior.isDetached())
{
throw new MithraBusinessException("to-many relationships cannot be set to null. Use the clear() method on the list instead.");
}
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
_dataTypeProperties.zSetAddHandler(new DataTypePropertiesAddHandlerPersisted());
DataTypePropertyList dataTypePropertiesToDelete = new DataTypePropertyList();
dataTypePropertiesToDelete.addAll(this.getDataTypeProperties());
for(int i=0;i < _dataTypeProperties.size(); i++)
{
DataTypeProperty item = _dataTypeProperties.getDataTypePropertyAt(i);
if (!dataTypePropertiesToDelete.remove(item))
{
item.setClassifierName(_data.getName());
item.cascadeInsert();
}
}
dataTypePropertiesToDelete.cascadeDeleteAll();
}
else throw new RuntimeException("not implemented");
}
public boolean isDataTypePropertiesModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
DataTypePropertyList dataTypeProperties =
(DataTypePropertyList) _data.getDataTypeProperties();
if( dataTypeProperties != null)
{
return dataTypeProperties.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = Interface.name
* @see Interface#getClassifierSuperClass() reverse relationship Interface.getClassifierSuperClass()
* @return The interface sub class
*/
public Interface getInterfaceSubClass()
{
Interface _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = InterfaceFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, forinterfaceSubClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (Interface) _related;
if (_related == null)
{
_op = InterfaceFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getInterfaceSubClass() instanceof NulledRelation)
{
return null;
}
_result = (Interface) _data.getInterfaceSubClass();
if (_result == null)
{
{
Operation detachedOp = InterfaceFinder.name().eq(_data.getName());
_result = InterfaceFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setInterfaceSubClass(_result);
if (_result != null) _result.zSetParentContainerclassifierSuperClass(this);
}
}
else if (_behavior.isInMemory())
{
_result = (Interface) _data.getInterfaceSubClass();
}
if (_op != null)
{
_result = InterfaceFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setInterfaceSubClass(Interface interfaceSubClass)
{
Interface _interfaceSubClass = (Interface) interfaceSubClass;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
Object _prev = _data.getInterfaceSubClass();
_data.setInterfaceSubClass(_interfaceSubClass);
if (_interfaceSubClass != null)
{
_interfaceSubClass.setName(_data.getName());
_interfaceSubClass.zSetParentContainerclassifierSuperClass(this);
}
else if (_behavior.isDetached())
{
_data.setInterfaceSubClass(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);
Interface _existing = this.getInterfaceSubClass();
if (_interfaceSubClass != _existing)
{
if (_existing != null)
{
_existing.cascadeDelete();
}
if (_interfaceSubClass != null)
{
_interfaceSubClass.setName(_data.getName());
_interfaceSubClass.cascadeInsert();
}
}
}
else throw new RuntimeException("not implemented");
}
public boolean isInterfaceSubClassModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_data.getInterfaceSubClass() instanceof NulledRelation)
{
Interface _existing = this.getOriginalPersistentObject().getInterfaceSubClass();
return _existing != null;
}
Interface interfaceSubClass =
(Interface) _data.getInterfaceSubClass();
if( interfaceSubClass != null)
{
return interfaceSubClass.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
this.name = Klass.name
* @see Klass#getClassifierSuperClass() reverse relationship Klass.getClassifierSuperClass()
* @return The klass sub class
*/
public Klass getKlassSubClass()
{
Klass _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = KlassFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, forklassSubClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (Klass) _related;
if (_related == null)
{
_op = KlassFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getKlassSubClass() instanceof NulledRelation)
{
return null;
}
_result = (Klass) _data.getKlassSubClass();
if (_result == null)
{
{
Operation detachedOp = KlassFinder.name().eq(_data.getName());
_result = KlassFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setKlassSubClass(_result);
if (_result != null) _result.zSetParentContainerclassifierSuperClass(this);
}
}
else if (_behavior.isInMemory())
{
_result = (Klass) _data.getKlassSubClass();
}
if (_op != null)
{
_result = KlassFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setKlassSubClass(Klass klassSubClass)
{
Klass _klassSubClass = (Klass) klassSubClass;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
Object _prev = _data.getKlassSubClass();
_data.setKlassSubClass(_klassSubClass);
if (_klassSubClass != null)
{
_klassSubClass.setName(_data.getName());
_klassSubClass.zSetParentContainerclassifierSuperClass(this);
}
else if (_behavior.isDetached())
{
_data.setKlassSubClass(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);
Klass _existing = this.getKlassSubClass();
if (_klassSubClass != _existing)
{
if (_existing != null)
{
_existing.cascadeDelete();
}
if (_klassSubClass != null)
{
_klassSubClass.setName(_data.getName());
_klassSubClass.cascadeInsert();
}
}
}
else throw new RuntimeException("not implemented");
}
public boolean isKlassSubClassModifiedSinceDetachment()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_data.getKlassSubClass() instanceof NulledRelation)
{
Klass _existing = this.getOriginalPersistentObject().getKlassSubClass();
return _existing != null;
}
Klass klassSubClass =
(Klass) _data.getKlassSubClass();
if( klassSubClass != null)
{
return klassSubClass.isModifiedSinceDetachment();
}
return false;
}
/**
* Relationship Expression:
PackageableElement.name = this.name
* @see PackageableElement#getClassifierSubClass() reverse relationship PackageableElement.getClassifierSubClass()
* @return The packageable element super class
*/
public PackageableElement getPackageableElementSuperClass()
{
PackageableElement _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
MithraObjectPortal _portal = null;
if (_behavior.isPersisted())
{
{
_portal = PackageableElementFinder.getMithraObjectPortal();
Object _related = _portal.getAsOneFromCache(this, _data, forpackageableElementSuperClass, null, null);
if (!(_related instanceof NulledRelation)) _result = (PackageableElement) _related;
if (_related == null)
{
_op = PackageableElementFinder.name().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
if (_data.getPackageableElementSuperClass() instanceof NulledRelation)
{
return null;
}
_result = (PackageableElement) _data.getPackageableElementSuperClass();
if (_result == null)
{
{
Operation detachedOp = PackageableElementFinder.name().eq(_data.getName());
_result = PackageableElementFinder.zFindOneForRelationship(detachedOp);
if(_result != null)
{
_result = _result.getDetachedCopy();
}
}
_data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_data.setPackageableElementSuperClass(_result);
}
}
else if (_behavior.isInMemory())
{
_result = (PackageableElement) _data.getPackageableElementSuperClass();
if (_result == null)
{
{
_op = PackageableElementFinder.name().eq(_data.getName());
}
}
}
if (_op != null)
{
_result = PackageableElementFinder.zFindOneForRelationship(_op);
}
return _result;
}
public void setPackageableElementSuperClass(PackageableElement packageableElementSuperClass)
{
((PackageableElement)packageableElementSuperClass).setClassifierSubClass((Classifier)this);
}
public void zSetParentContainerpackageableElementSuperClass(PackageableElementAbstract parent)
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
_behavior.clearTempTransaction(this);
if (_behavior.isInMemory())
{
_data.setPackageableElementSuperClass(parent);
}
}
/**
* Relationship Expression:
RootProjection.classifierName = this.name
* @see RootProjection#getClassifier() reverse relationship RootProjection.getClassifier()
* @return projections
*/
public RootProjectionList getProjections()
{
RootProjectionList _result = null;
Operation _op = null;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForReadWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForRead(this);
if (_behavior.isPersisted())
{
{
{
_op = RootProjectionFinder.classifierName().eq(_data.getName());
}
}
}
else if (_behavior.isDetached())
{
{
{
Operation detachedOp = RootProjectionFinder.classifierName().eq(_data.getName());
_result = new RootProjectionList(detachedOp);
_result.zSetForRelationship();
}
}
}
else if (_behavior.isInMemory())
{
_result = (RootProjectionList) _data.getProjections();
if (_result == null)
{
{
_op = RootProjectionFinder.classifierName().eq(_data.getName());
}
}
}
if (_op != null)
{
_result = new RootProjectionList(_op);
_result.zSetForRelationship();
}
return _result;
}
public void setProjections(RootProjectionList projections)
{
RootProjectionList _projections = (RootProjectionList) projections;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
if (_behavior.isInMemory())
{
_data.setProjections(_projections);
}
else if (_behavior.isPersisted())
{
_behavior.clearTempTransaction(this);
}
else throw new RuntimeException("not implemented");
}
protected void cascadeInsertImpl() throws MithraBusinessException
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
ClassifierInterfaceMappingList superInterfaces =
(ClassifierInterfaceMappingList) _data.getSuperInterfaces();
ClassifierModifierList classifierModifiers =
(ClassifierModifierList) _data.getClassifierModifiers();
DataTypePropertyList dataTypeProperties =
(DataTypePropertyList) _data.getDataTypeProperties();
Interface interfaceSubClass =
(Interface) _data.getInterfaceSubClass();
Klass klassSubClass =
(Klass) _data.getKlassSubClass();
_behavior.insert(this);
if (superInterfaces != null)
{
superInterfaces.cascadeInsertAll();
}
if (classifierModifiers != null)
{
classifierModifiers.cascadeInsertAll();
}
if (dataTypeProperties != null)
{
dataTypeProperties.cascadeInsertAll();
}
if (interfaceSubClass != null)
{
interfaceSubClass.cascadeInsert();
}
if (klassSubClass != null)
{
klassSubClass.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)
{
ClassifierFinder.ClassifierRelatedFinder parentFinder = (ClassifierFinder.ClassifierRelatedFinder) parentFinderGeneric;
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _newData = (ClassifierData) _behavior.getCurrentDataForWrite(this);
{
ClassifierInterfaceMappingList superInterfaces =
(ClassifierInterfaceMappingList) _newData.getSuperInterfaces();
RelatedFinder dependentFinder = parentFinder.superInterfaces();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, superInterfaces != null, navigationStats);
if (superInterfaces != null)
{
superInterfaces.zCascadeAddNavigatedRelationshipsStats(dependentFinder, navigationStats);
}
}
{
ClassifierModifierList classifierModifiers =
(ClassifierModifierList) _newData.getClassifierModifiers();
RelatedFinder dependentFinder = parentFinder.classifierModifiers();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, classifierModifiers != null, navigationStats);
if (classifierModifiers != null)
{
classifierModifiers.zCascadeAddNavigatedRelationshipsStats(dependentFinder, navigationStats);
}
}
{
DataTypePropertyList dataTypeProperties =
(DataTypePropertyList) _newData.getDataTypeProperties();
RelatedFinder dependentFinder = parentFinder.dataTypeProperties();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, dataTypeProperties != null, navigationStats);
if (dataTypeProperties != null)
{
dataTypeProperties.zCascadeAddNavigatedRelationshipsStats(dependentFinder, navigationStats);
}
}
if (_newData.getInterfaceSubClass() instanceof NulledRelation)
{
RelatedFinder dependentFinder = parentFinder.interfaceSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, true, navigationStats);
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(dependentFinder, navigationStats);
}
else
{
Interface interfaceSubClass =
(Interface) _newData.getInterfaceSubClass();
RelatedFinder dependentFinder = parentFinder.interfaceSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, interfaceSubClass != null, navigationStats);
if (interfaceSubClass != null)
{
_behavior.addNavigatedRelationshipsStats(interfaceSubClass, dependentFinder, navigationStats);
}
}
if (_newData.getKlassSubClass() instanceof NulledRelation)
{
RelatedFinder dependentFinder = parentFinder.klassSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, true, navigationStats);
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(dependentFinder, navigationStats);
}
else
{
Klass klassSubClass =
(Klass) _newData.getKlassSubClass();
RelatedFinder dependentFinder = parentFinder.klassSubClass();
DeepRelationshipUtility.zAddToNavigationStats(dependentFinder, klassSubClass != null, navigationStats);
if (klassSubClass != null)
{
_behavior.addNavigatedRelationshipsStats(klassSubClass, dependentFinder, navigationStats);
}
}
return navigationStats;
}
@Override
public Map< RelatedFinder, StatisticCounter > zAddNavigatedRelationshipsStatsForDelete(RelatedFinder parentFinder, Map< RelatedFinder, StatisticCounter > navigationStats)
{
DeepRelationshipUtility.zAddAllDependentNavigationsStatsForDelete(parentFinder, navigationStats);
return navigationStats;
}
@Override
public Classifier zCascadeCopyThenInsert() throws MithraBusinessException
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ClassifierData _data = (ClassifierData) _behavior.getCurrentDataForWrite(this);
ClassifierInterfaceMappingList superInterfaces =
(ClassifierInterfaceMappingList) _data.getSuperInterfaces();
ClassifierModifierList classifierModifiers =
(ClassifierModifierList) _data.getClassifierModifiers();
DataTypePropertyList dataTypeProperties =
(DataTypePropertyList) _data.getDataTypeProperties();
Interface interfaceSubClass =
(Interface) _data.getInterfaceSubClass();
Klass klassSubClass =
(Klass) _data.getKlassSubClass();
Classifier original = (Classifier) _behavior.copyThenInsert(this);
if (superInterfaces != null)
{
superInterfaces.zCascadeCopyThenInsertAll();
}
if (classifierModifiers != null)
{
classifierModifiers.zCascadeCopyThenInsertAll();
}
if (dataTypeProperties != null)
{
dataTypeProperties.zCascadeCopyThenInsertAll();
}
if (interfaceSubClass != null)
{
interfaceSubClass.zCascadeCopyThenInsert();
}
if (klassSubClass != null)
{
klassSubClass.zCascadeCopyThenInsert();
}
return original;
}
protected void cascadeDeleteImpl() throws MithraBusinessException
{
this.getSuperInterfaces().cascadeDeleteAll();
this.getClassifierModifiers().cascadeDeleteAll();
this.getDataTypeProperties().cascadeDeleteAll();
{
Interface related = this.getInterfaceSubClass();
if (related != null)
related.cascadeDelete();
}
{
Klass related = this.getKlassSubClass();
if (related != null)
related.cascadeDelete();
}
this.delete();
}
public Cache zGetCache()
{
return ClassifierFinder.getMithraObjectPortal().getCache();
}
public MithraObjectPortal zGetPortal()
{
return ClassifierFinder.getMithraObjectPortal();
}
public Classifier getOriginalPersistentObject()
{
return this.zFindOriginal();
}
protected boolean issueUpdatesForNonPrimaryKeys(TransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData)
{
boolean changed = false;
return changed;
}
protected boolean issueUpdatesForPrimaryKeys(TransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData)
{
boolean changed = false;
changed |= zUpdateString(behavior, data, newData, ClassifierFinder.name(), false);
return changed;
}
public Object readResolve() throws ObjectStreamException
{
ClassifierAbstract result = (ClassifierAbstract) 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 SuperInterfacesAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
ClassifierInterfaceMapping item = (ClassifierInterfaceMapping) relatedObject;
item.setClassifierName(getName());
item.zSetParentContainersubClassifier(ClassifierAbstract.this);
}
}
protected class SuperInterfacesAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
ClassifierInterfaceMapping item = (ClassifierInterfaceMapping) relatedObject;
item.setClassifierName(getName());
item.cascadeInsert();
}
}
protected class ClassifierModifiersAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
ClassifierModifier item = (ClassifierModifier) relatedObject;
item.setClassifierName(getName());
item.zSetParentContainerowningClassifier(ClassifierAbstract.this);
}
}
protected class ClassifierModifiersAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
ClassifierModifier item = (ClassifierModifier) relatedObject;
item.setClassifierName(getName());
item.cascadeInsert();
}
}
protected class DataTypePropertiesAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
DataTypeProperty item = (DataTypeProperty) relatedObject;
item.setClassifierName(getName());
item.zSetParentContainerowningClassifier(ClassifierAbstract.this);
}
}
protected class DataTypePropertiesAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
DataTypeProperty item = (DataTypeProperty) relatedObject;
item.setClassifierName(getName());
item.cascadeInsert();
}
}
protected class InterfaceSubClassAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Interface item = (Interface) relatedObject;
item.setName(getName());
item.zSetParentContainerclassifierSuperClass(ClassifierAbstract.this);
}
}
protected class InterfaceSubClassAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Interface item = (Interface) relatedObject;
item.setName(getName());
item.cascadeInsert();
}
}
protected class KlassSubClassAddHandlerInMemory implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Klass item = (Klass) relatedObject;
item.setName(getName());
item.zSetParentContainerclassifierSuperClass(ClassifierAbstract.this);
}
}
protected class KlassSubClassAddHandlerPersisted implements DependentRelationshipAddHandler
{
public void addRelatedObject(MithraTransactionalObject relatedObject)
{
Klass item = (Klass) relatedObject;
item.setName(getName());
item.cascadeInsert();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy