com.gs.reladomo.txid.ReladomoTxIdIntSourceAbstract Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reladomo Show documentation
Show all versions of reladomo Show documentation
Reladomo is an object-relational mapping framework.
package com.gs.reladomo.txid;
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 16.7.1. Please do not modify it.
* Add custom logic to its subclass instead.
*/
// Generated from templates/transactional/Abstract.jsp
public abstract class ReladomoTxIdIntSourceAbstract extends com.gs.fw.common.mithra.superclassimpl.MithraTransactionalObjectImpl
implements
ReladomoTxIdInterface
{
private static byte MEMORY_STATE = PersistenceState.IN_MEMORY;
private static byte PERSISTED_STATE = PersistenceState.PERSISTED;
private static final Logger logger = LoggerFactory.getLogger(ReladomoTxIdIntSource.class.getName());
public ReladomoTxIdIntSourceAbstract()
{
this.persistenceState = MEMORY_STATE;
}
public ReladomoTxIdIntSource getDetachedCopy() throws MithraBusinessException
{
return (ReladomoTxIdIntSource) super.getDetachedCopy();
}
public ReladomoTxIdIntSource getNonPersistentCopy() throws MithraBusinessException
{
ReladomoTxIdIntSource result = (ReladomoTxIdIntSource) super.getNonPersistentCopy();
result.persistenceState = MEMORY_STATE;
return result;
}
public ReladomoTxIdIntSource copyDetachedValuesToOriginalOrInsertIfNew()
{
return (ReladomoTxIdIntSource) this.zCopyDetachedValuesToOriginalOrInsertIfNew();
}
public ReladomoTxIdIntSource zFindOriginal()
{
ReladomoTxIdIntSourceData data = (ReladomoTxIdIntSourceData) this.currentData;
Operation op;
op = ReladomoTxIdIntSourceFinder.id().eq(data.getId());
op = op.and(ReladomoTxIdIntSourceFinder.source().eq(data.getSource()));
return ReladomoTxIdIntSourceFinder.findOne(op);
}
public boolean isModifiedSinceDetachmentByDependentRelationships()
{
if(this.isModifiedSinceDetachment()) return true;
return false;
}
private Logger getLogger()
{
return logger;
}
public MithraDataObject zAllocateData()
{
return new ReladomoTxIdIntSourceData();
}
protected void zSetFromReladomoTxIdIntSourceData( ReladomoTxIdIntSourceData data )
{
super.zSetData(data);
this.persistenceState = PERSISTED_STATE;
}
public void setFromReladomoTxIdIntSourceData( ReladomoTxIdIntSourceData data )
{
super.zSetData(data);
}
public void zWriteDataClassName(ObjectOutput out) throws IOException
{
}
public boolean isCommittedNull()
{
return ((ReladomoTxIdIntSourceData) this.zSynchronizedGetData()).isCommittedNull();
}
public boolean isCommitted()
{
ReladomoTxIdIntSourceData data = (ReladomoTxIdIntSourceData) this.zSynchronizedGetData();
if (data.isCommittedNull()) MithraNullPrimitiveException.throwNew("committed", data);
return data.isCommitted();
}
public void setCommitted(boolean newValue)
{
zSetBoolean(ReladomoTxIdIntSourceFinder.committed(), newValue, false, false ,true);
}
public boolean isFlowIdNull()
{
return ((ReladomoTxIdIntSourceData) this.zSynchronizedGetData()).isFlowIdNull();
}
public String getFlowId()
{
ReladomoTxIdIntSourceData data = (ReladomoTxIdIntSourceData) this.zSynchronizedGetData();
return data.getFlowId();
}
public void setFlowId(String newValue)
{
if (newValue != null) newValue = newValue.trim();
if (newValue != null && newValue.length() > 60)
throw new MithraBusinessException("Attribute 'flowId' cannot exceed maximum length of 60: " + newValue);
zSetString(ReladomoTxIdIntSourceFinder.flowId(), newValue, false, false );
}
public boolean isIdNull()
{
return ((ReladomoTxIdIntSourceData) this.zSynchronizedGetData()).isIdNull();
}
public int getId()
{
ReladomoTxIdIntSourceData data = (ReladomoTxIdIntSourceData) this.zSynchronizedGetData();
return data.getId();
}
public void setId(int newValue)
{
zSetInteger(ReladomoTxIdIntSourceFinder.id(), newValue, true, false ,false);
}
public boolean isSourceNull()
{
return ((ReladomoTxIdIntSourceData) this.zSynchronizedGetData()).isSourceNull();
}
public int getSource()
{
ReladomoTxIdIntSourceData data = (ReladomoTxIdIntSourceData) this.zSynchronizedGetData();
return data.getSource();
}
public void setSource(int newValue)
{
zSetInteger(ReladomoTxIdIntSourceFinder.source(), newValue, false, false ,false);
}
public boolean isXidNull()
{
return ((ReladomoTxIdIntSourceData) this.zSynchronizedGetData()).isXidNull();
}
public String getXid()
{
ReladomoTxIdIntSourceData data = (ReladomoTxIdIntSourceData) this.zSynchronizedGetData();
return data.getXid();
}
public void setXid(String newValue)
{
if (newValue != null) newValue = newValue.trim();
if (newValue != null && newValue.length() > 86)
throw new MithraBusinessException("Attribute 'xid' cannot exceed maximum length of 86: " + newValue);
zSetString(ReladomoTxIdIntSourceFinder.xid(), newValue, false, false );
}
protected void issuePrimitiveNullSetters(TransactionalBehavior behavior, MithraDataObject data)
{
zNullify(behavior, data, ReladomoTxIdIntSourceFinder.committed(), false);
}
public void setCommittedNull()
{
zNullify(ReladomoTxIdIntSourceFinder.committed(), false);
}
public void zPersistDetachedRelationships(MithraDataObject _data)
{
ReladomoTxIdIntSourceData _newData = (ReladomoTxIdIntSourceData) _data;
}
public void zSetTxDetachedDeleted()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
if (_behavior.isDetached() && _behavior.isDeleted()) return;
ReladomoTxIdIntSourceData _newData = (ReladomoTxIdIntSourceData) _behavior.getCurrentDataForRead(this);
this.zSetTxPersistenceState(PersistenceState.DETACHED_DELETED);
}
public void zSetNonTxDetachedDeleted()
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ReladomoTxIdIntSourceData _newData = (ReladomoTxIdIntSourceData) _behavior.getCurrentDataForRead(this);
this.zSetNonTxPersistenceState(PersistenceState.DETACHED_DELETED);
}
protected void cascadeInsertImpl() throws MithraBusinessException
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
_behavior.insert(this);
}
@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)
{
return navigationStats;
}
@Override
public Map< RelatedFinder, StatisticCounter > zAddNavigatedRelationshipsStatsForDelete(RelatedFinder parentFinder, Map< RelatedFinder, StatisticCounter > navigationStats)
{
return navigationStats;
}
@Override
public ReladomoTxIdIntSource zCascadeCopyThenInsert() throws MithraBusinessException
{
TransactionalBehavior _behavior = zGetTransactionalBehaviorForWriteWithWaitIfNecessary();
ReladomoTxIdIntSource original = (ReladomoTxIdIntSource) _behavior.copyThenInsert(this);
return original;
}
protected void cascadeDeleteImpl() throws MithraBusinessException
{
this.delete();
}
public Cache zGetCache()
{
return ReladomoTxIdIntSourceFinder.getMithraObjectPortal().getCache();
}
public MithraObjectPortal zGetPortal()
{
return ReladomoTxIdIntSourceFinder.getMithraObjectPortal();
}
public ReladomoTxIdIntSource getOriginalPersistentObject()
{
return this.zFindOriginal();
}
protected boolean issueUpdatesForNonPrimaryKeys(TransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData)
{
boolean changed = false;
changed |= zUpdateBoolean(behavior, data, newData, ReladomoTxIdIntSourceFinder.committed(), false);
changed |= zUpdateString(behavior, data, newData, ReladomoTxIdIntSourceFinder.flowId(), false);
changed |= zUpdateString(behavior, data, newData, ReladomoTxIdIntSourceFinder.xid(), false);
return changed;
}
protected boolean issueUpdatesForPrimaryKeys(TransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData)
{
boolean changed = false;
changed |= zUpdateInteger(behavior, data, newData, ReladomoTxIdIntSourceFinder.id(), false);
changed |= zUpdateInteger(behavior, data, newData, ReladomoTxIdIntSourceFinder.source(), false);
return changed;
}
public Object readResolve() throws ObjectStreamException
{
ReladomoTxIdIntSourceAbstract result = (ReladomoTxIdIntSourceAbstract) 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;
}
}