public static AsOfAttribute[] getAsOfAttributes() { return new AsOfAttribute[] { businessDate() , processingDate() } ; }
public List getForDateRange(MithraDataObject obj, Timestamp start, Timestamp end) throws MithraDatabaseException { return this.getForDateRange(obj, start, end, AccountBalanceFinder.businessDate(), AccountBalanceFinder.processingDate()); } }
protected DatedTransactionalState zCreateDatedTransactionalState(TemporalContainer container, MithraDataObject data, MithraTransaction threadTx) { return new DatedTransactionalState(threadTx, this.persistenceState, container, data, businessDate, AccountBalanceFinder.processingDate().getInfinityDate().equals(this.processingDate) || threadTx.isInFuture(this.processingDate.getTime())); }
protected boolean checkAsOfAttributesForRefresh(MithraDataObject current) { boolean refresh = !AccountBalanceFinder.businessDate().dataMatches(current, this.businessDate); if (!refresh) { refresh = !AccountBalanceFinder.processingDate().dataMatches(current, this.processingDate); } return refresh; }
public TemporalContainer createContainer(MithraTransaction tx) { return new BiTemporalTransactionalDataContainer(tx.getPerPortalTemporalContainer(AccountBalanceFinder.getMithraObjectPortal(), AccountBalanceFinder.processingDate()) ,AccountBalanceFinder.businessDate()); }
public AsOfAttribute<ParentOwnerType> processingDate() { AsOfAttribute<ParentOwnerType> result = this.processingDate; if (result == null) { result = mapper == null ? AsOfAttribute.generate("processingDate",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,true,this,null,true,false,this.processingDateFrom(),this.processingDateTo(),AccountBalanceFinder.processingDateInfinity,false,false,AccountBalanceFinder.processingDateDefault,true,false) : new MappedAsOfAttribute(AccountBalanceFinder.processingDate(), this.mapper, this.zGetValueSelector()); this.processingDate = result; } return result; }
public int setPrimaryKeyAttributesWithoutOptimistic(PreparedStatement stm, int pos, MithraDataObject dataObj, TimeZone databaseTimeZone, DatabaseType dt) throws SQLException { AccountBalanceData data = (AccountBalanceData)dataObj; TimeZone conversionTimeZone = null; stm.setInt(pos++, data.getAccountId()); conversionTimeZone = MithraTimestamp.DefaultTimeZone; if (data.getBusinessDateTo().getTime() == AccountBalanceFinder.businessDate().getInfinityDate().getTime()) { conversionTimeZone = MithraTimestamp.DefaultTimeZone; } dt.setTimestamp(stm, pos, data.getBusinessDateTo(), false, conversionTimeZone); pos++; conversionTimeZone = MithraTimestamp.DefaultTimeZone; if (data.getProcessingDateTo().getTime() == AccountBalanceFinder.processingDate().getInfinityDate().getTime()) { conversionTimeZone = MithraTimestamp.DefaultTimeZone; } dt.setTimestamp(stm, pos, data.getProcessingDateTo(), false, conversionTimeZone); pos++; return pos; }
public void zSerializePrimaryKey(ObjectOutput out) throws IOException { out.writeInt(this.accountId); MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.businessDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.businessDateTo, AccountBalanceFinder.businessDate().getInfinityDate()); MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.processingDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.processingDateTo, AccountBalanceFinder.processingDate().getInfinityDate()); }
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1) { I3O3L3 _bean = (I3O3L3) _srcData; AccountBalanceData _castedTargetData = (AccountBalanceData) _targetData; if (_bean.getI1AsInteger() == _castedTargetData.getAccountId()) { return AccountBalanceFinder.businessDate().dataMatches(_castedTargetData, _asOfDate0) && AccountBalanceFinder.processingDate().dataMatches(_castedTargetData, _asOfDate1); } return false; }
public void zSerializeFullData(ObjectOutput out) throws IOException { zWriteNullBits(out); out.writeInt(this.accountId); out.writeDouble(this.balance); MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.businessDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.businessDateTo, AccountBalanceFinder.businessDate().getInfinityDate()); MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.processingDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.processingDateTo, AccountBalanceFinder.processingDate().getInfinityDate()); }
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 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); }
if (data.getProcessingDateTo().getTime() == AccountBalanceFinder.processingDate().getInfinityDate().getTime())
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()); }
AccountBalanceFinder.processingDate().getInfinityDate()); _data.setProcessingDateTo(processingDateTotimestampValue);
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()); }