public static Attribute[] getPrimaryKeyAttributes() { return new Attribute[] { accountId() } ; }
public static DoubleAttribute[] zGetDoubleAttributes() { DoubleAttribute[] result = new DoubleAttribute[1]; result[0] = balance(); return result; }
public static AsOfAttribute[] getAsOfAttributes() { return new AsOfAttribute[] { businessDate() , processingDate() } ; }
public TemporalContainer createContainer(MithraTransaction tx) { return new BiTemporalTransactionalDataContainer(tx.getPerPortalTemporalContainer(AccountBalanceFinder.getMithraObjectPortal(), AccountBalanceFinder.processingDate()) ,AccountBalanceFinder.businessDate()); }
public Cache instantiateFullCache(MithraConfigurationManager.Config config) { Cache result; if (config.isParticipatingInTx()) { result = new FullDatedTransactionalCache(AccountBalanceFinder.getPrimaryKeyAttributes(), AccountBalanceFinder.getAsOfAttributes(), this, AccountBalanceFinder.getImmutableAttributes()); } else { result = new FullDatedCache(AccountBalanceFinder.getPrimaryKeyAttributes(), AccountBalanceFinder.getAsOfAttributes(), this, AccountBalanceFinder.getImmutableAttributes()); } initPortal(result, config); return result; }
public void zDeserializePrimaryKey(ObjectInput in) throws IOException, ClassNotFoundException { this.accountId = in.readInt(); this.businessDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); this.businessDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, AccountBalanceFinder.businessDate().getInfinityDate()), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); this.processingDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); this.processingDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, AccountBalanceFinder.processingDate().getInfinityDate()), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); }
public Object readResolve() throws ObjectStreamException { if (this.persistenceState == DatedPersistenceState.PERSISTED) { AccountBalanceData data = (AccountBalanceData) this.currentData; Operation op = AccountBalanceFinder.businessDate().eq(this.businessDate); op = op.and(AccountBalanceFinder.processingDate().eq(this.processingDate)); op = op.and(AccountBalanceFinder.accountId().eq(data.getAccountId())); return AccountBalanceFinder.findOne(op); } return this; }
public MithraObjectPortal getMithraObjectPortal() { return AccountBalanceFinder.getMithraObjectPortal(); } }
protected boolean issueUpdates(DatedTransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData) { boolean changed = false; changed |= zUpdateInteger(behavior, data, newData, AccountBalanceFinder.accountId(), false); changed |= zUpdateDouble(behavior, data, newData, AccountBalanceFinder.balance(), false); return changed; }
protected static void initializeClientPortal(MithraObjectDeserializer objectFactory, Cache cache, MithraConfigurationManager.Config config) { initializeIndicies(cache); isFullCache = cache.isFullCache(); isOffHeap = cache.isOffHeap(); MithraObjectPortal portal; if (config.isParticipatingInTx()) { portal = new MithraTransactionalPortal(objectFactory, cache, getFinderInstance(), config.getRelationshipCacheSize(), config.getMinQueriesToKeep(), null, null, null, 0, new RemoteMithraObjectPersister(config.getRemoteMithraService(), getFinderInstance(), true)); } else { portal = new MithraReadOnlyPortal(objectFactory, cache, getFinderInstance(), config.getRelationshipCacheSize(), config.getMinQueriesToKeep(), null, null, null, 0, new RemoteMithraObjectPersister(config.getRemoteMithraService(), getFinderInstance(), true)); } portal.setIndependent(true); config.initializePortal(portal); objectPortal.destroy(); objectPortal = portal; }
public void setBusinessDateTo(Timestamp newValue) { zSetTimestamp(AccountBalanceFinder.businessDateTo(), newValue); }
public void setBusinessDateFrom(Timestamp newValue) { zSetTimestamp(AccountBalanceFinder.businessDateFrom(), newValue, false ); }
protected boolean zCheckInfiniteBusinessDate(MithraDataObject data) { AccountBalanceData data2 = (AccountBalanceData) data; Timestamp businessTo = data2.getBusinessDateTo(); return (businessTo != null && AccountBalanceFinder.businessDate().getInfinityDate().getTime() == businessTo.getTime()); }
public static AccountBalance findOne(com.gs.fw.finder.Operation operation) { return findOne(operation, false); }
public RelatedFinder getFinder() { return AccountBalanceFinder.getFinderInstance(); }
public void zDeserializeFullData(ObjectInput in) throws IOException, ClassNotFoundException { this.isNullBits0 = in.readByte(); this.accountId = in.readInt(); this.balance = in.readDouble(); this.businessDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); this.businessDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, AccountBalanceFinder.businessDate().getInfinityDate()), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); this.processingDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); this.processingDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, AccountBalanceFinder.processingDate().getInfinityDate()), AccountBalanceFinder.isFullCache(), AccountBalanceFinder.isOffHeap()); }
public AccountBalance zFindOriginal() { AccountBalanceData data = (AccountBalanceData) this.currentData; Operation op; op = AccountBalanceFinder.accountId().eq(data.getAccountId()); op = op.and(AccountBalanceFinder.businessDate().eq(this.getBusinessDate())); op = op.and(AccountBalanceFinder.processingDate().eq(this.getProcessingDate())); return AccountBalanceFinder.findOne(op); }
public Cache instantiatePartialCache(MithraConfigurationManager.Config config) { Cache result; if (config.isParticipatingInTx()) { result = new PartialDatedTransactionalCache(AccountBalanceFinder.getPrimaryKeyAttributes(), AccountBalanceFinder.getAsOfAttributes(), this, AccountBalanceFinder.getImmutableAttributes(), config.getCacheTimeToLive(), config.getRelationshipCacheTimeToLive()); } else { result = new PartialDatedCache(AccountBalanceFinder.getPrimaryKeyAttributes(), AccountBalanceFinder.getAsOfAttributes(), this, AccountBalanceFinder.getImmutableAttributes(), config.getCacheTimeToLive(), config.getRelationshipCacheTimeToLive()); } initPortal(result, config); return result; }
public MithraObjectPortal getMithraObjectPortal() { return AccountBalanceFinder.getMithraObjectPortal(); }
protected boolean issueUpdatesUntil(DatedTransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData, Timestamp until) { boolean changed = false; changed |= zUpdateInteger(behavior, data, newData, AccountBalanceFinder.accountId(), false, until); changed |= zUpdateDouble(behavior, data, newData, AccountBalanceFinder.balance(), false, until); return changed; }