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, EmployeeFinder.businessDate(), EmployeeFinder.processingDate()); } }
protected DatedTransactionalState zCreateDatedTransactionalState(TemporalContainer container, MithraDataObject data, MithraTransaction threadTx) { return new DatedTransactionalState(threadTx, this.persistenceState, container, data, businessDate, EmployeeFinder.processingDate().getInfinityDate().equals(this.processingDate) || threadTx.isInFuture(this.processingDate.getTime())); }
protected boolean checkAsOfAttributesForRefresh(MithraDataObject current) { boolean refresh = !EmployeeFinder.businessDate().dataMatches(current, this.businessDate); if (!refresh) { refresh = !EmployeeFinder.processingDate().dataMatches(current, this.processingDate); } return refresh; }
public void zSerializeFullData(ObjectOutput out) throws IOException { zWriteNullBits(out); out.writeInt(this.age); MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.businessDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.businessDateTo, EmployeeFinder.businessDate().getInfinityDate()); out.writeInt(this.employeeId); out.writeObject(this.firstName); out.writeObject(this.lastName); MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.processingDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.processingDateTo, EmployeeFinder.processingDate().getInfinityDate()); }
public TemporalContainer createContainer(MithraTransaction tx) { return new BiTemporalTransactionalDataContainer(tx.getPerPortalTemporalContainer(EmployeeFinder.getMithraObjectPortal(), EmployeeFinder.processingDate()) ,EmployeeFinder.businessDate()); }
public void zSerializePrimaryKey(ObjectOutput out) throws IOException { MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.businessDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.businessDateTo, EmployeeFinder.businessDate().getInfinityDate()); out.writeInt(this.employeeId); MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.processingDateFrom); MithraTimestamp.writeTimezoneInsensitiveTimestampWithInfinity(out, this.processingDateTo, EmployeeFinder.processingDate().getInfinityDate()); }
public int setPrimaryKeyAttributesWithoutOptimistic(PreparedStatement stm, int pos, MithraDataObject dataObj, TimeZone databaseTimeZone, DatabaseType dt) throws SQLException { EmployeeData data = (EmployeeData)dataObj; TimeZone conversionTimeZone = null; stm.setInt(pos++, data.getEmployeeId()); conversionTimeZone = MithraTimestamp.DefaultTimeZone; if (data.getBusinessDateTo().getTime() == EmployeeFinder.businessDate().getInfinityDate().getTime()) { conversionTimeZone = MithraTimestamp.DefaultTimeZone; } dt.setTimestamp(stm, pos, data.getBusinessDateTo(), false, conversionTimeZone); pos++; conversionTimeZone = MithraTimestamp.DefaultTimeZone; if (data.getProcessingDateTo().getTime() == EmployeeFinder.processingDate().getInfinityDate().getTime()) { conversionTimeZone = MithraTimestamp.DefaultTimeZone; } dt.setTimestamp(stm, pos, data.getProcessingDateTo(), false, conversionTimeZone); pos++; return pos; }
public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1) { I3O3L3 _bean = (I3O3L3) _srcData; EmployeeData _castedTargetData = (EmployeeData) _targetData; if (_bean.getI1AsInteger() == _castedTargetData.getEmployeeId()) { return EmployeeFinder.businessDate().dataMatches(_castedTargetData, _asOfDate0) && EmployeeFinder.processingDate().dataMatches(_castedTargetData, _asOfDate1); } return false; }
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(),EmployeeFinder.processingDateInfinity,false,false,EmployeeFinder.processingDateDefault,true,false) : new MappedAsOfAttribute(EmployeeFinder.processingDate(), this.mapper, this.zGetValueSelector()); this.processingDate = result; } return result; }
public Object readResolve() throws ObjectStreamException { if (this.persistenceState == DatedPersistenceState.PERSISTED) { EmployeeData data = (EmployeeData) this.currentData; Operation op = EmployeeFinder.businessDate().eq(this.businessDate); op = op.and(EmployeeFinder.processingDate().eq(this.processingDate)); op = op.and(EmployeeFinder.employeeId().eq(data.getEmployeeId())); return EmployeeFinder.findOne(op); } return this; }
public void zDeserializeFullData(ObjectInput in) throws IOException, ClassNotFoundException { this.age = in.readInt(); this.businessDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); this.businessDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, EmployeeFinder.businessDate().getInfinityDate()), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); this.employeeId = in.readInt(); this.firstName = StringPool.getInstance().getOrAddToCache((String)in.readObject(), EmployeeFinder.isFullCache()); this.lastName = StringPool.getInstance().getOrAddToCache((String)in.readObject(), EmployeeFinder.isFullCache()); this.processingDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); this.processingDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, EmployeeFinder.processingDate().getInfinityDate()), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); }
public Employee zFindOriginal() { EmployeeData data = (EmployeeData) this.currentData; Operation op; op = EmployeeFinder.employeeId().eq(data.getEmployeeId()); op = op.and(EmployeeFinder.businessDate().eq(this.getBusinessDate())); op = op.and(EmployeeFinder.processingDate().eq(this.getProcessingDate())); return EmployeeFinder.findOne(op); }
if (data.getProcessingDateTo().getTime() == EmployeeFinder.processingDate().getInfinityDate().getTime())
EmployeeFinder.processingDate().getInfinityDate()); _data.setProcessingDateTo(processingDateTotimestampValue);
public void zDeserializePrimaryKey(ObjectInput in) throws IOException, ClassNotFoundException { this.businessDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); this.businessDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, EmployeeFinder.businessDate().getInfinityDate()), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); this.employeeId = in.readInt(); this.processingDateFrom = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); this.processingDateTo = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestampWithInfinity(in, EmployeeFinder.processingDate().getInfinityDate()), EmployeeFinder.isFullCache(), EmployeeFinder.isOffHeap()); }