protected boolean issueUpdates(DatedTransactionalBehavior behavior, MithraDataObject data, MithraDataObject newData) { boolean changed = false; changed |= zUpdateInteger(behavior, data, newData, EmployeeFinder.age(), false); changed |= zUpdateInteger(behavior, data, newData, EmployeeFinder.employeeId(), false); changed |= zUpdateString(behavior, data, newData, EmployeeFinder.firstName(), false); changed |= zUpdateString(behavior, data, newData, EmployeeFinder.lastName(), false); return changed; }
public static AsOfAttribute[] getAsOfAttributes() { return new AsOfAttribute[] { businessDate() , processingDate() } ; }
public void setBusinessDateFrom(Timestamp newValue) { zSetTimestamp(EmployeeFinder.businessDateFrom(), newValue); }
public TemporalContainer createContainer(MithraTransaction tx) { return new BiTemporalTransactionalDataContainer(tx.getPerPortalTemporalContainer(EmployeeFinder.getMithraObjectPortal(), EmployeeFinder.processingDate()) ,EmployeeFinder.businessDate()); }
public Cache instantiateFullCache(MithraConfigurationManager.Config config) { Cache result; if (config.isParticipatingInTx()) { result = new FullDatedTransactionalCache(EmployeeFinder.getPrimaryKeyAttributes(), EmployeeFinder.getAsOfAttributes(), this, EmployeeFinder.getImmutableAttributes()); } else { result = new FullDatedCache(EmployeeFinder.getPrimaryKeyAttributes(), EmployeeFinder.getAsOfAttributes(), this, EmployeeFinder.getImmutableAttributes()); } initPortal(result, config); 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 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()); }
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 static Attribute[] getImmutableAttributes() { return new Attribute[] { employeeId() , employeeId() } ; }
public void setAgeUntil(int newValue, Timestamp exclusiveUntil) { zSetInteger(EmployeeFinder.age(), newValue, false , exclusiveUntil,false); }
public void setFirstName(String newValue) { if (newValue != null) newValue = newValue.trim(); zSetString(EmployeeFinder.firstName(), newValue, false ); }
protected boolean zCheckInfiniteBusinessDate(MithraDataObject data) { EmployeeData data2 = (EmployeeData) data; Timestamp businessTo = data2.getBusinessDateTo(); return (businessTo != null && EmployeeFinder.businessDate().getInfinityDate().getTime() == businessTo.getTime()); }
public void setBusinessDateTo(Timestamp newValue) { zSetTimestamp(EmployeeFinder.businessDateTo(), newValue); }
public static Employee findOneBypassCache(com.gs.fw.finder.Operation operation) { return findOne(operation, true); }
public RelatedFinder getFinder() { return EmployeeFinder.getFinderInstance(); }
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); }
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 Cache instantiatePartialCache(MithraConfigurationManager.Config config) { Cache result; if (config.isParticipatingInTx()) { result = new PartialDatedTransactionalCache(EmployeeFinder.getPrimaryKeyAttributes(), EmployeeFinder.getAsOfAttributes(), this, EmployeeFinder.getImmutableAttributes(), config.getCacheTimeToLive(), config.getRelationshipCacheTimeToLive()); } else { result = new PartialDatedCache(EmployeeFinder.getPrimaryKeyAttributes(), EmployeeFinder.getAsOfAttributes(), this, EmployeeFinder.getImmutableAttributes(), config.getCacheTimeToLive(), config.getRelationshipCacheTimeToLive()); } initPortal(result, config); return result; }
protected static void initializePortal(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, (MithraObjectPersister) objectFactory); } else { portal = new MithraReadOnlyPortal(objectFactory, cache, getFinderInstance(), config.getRelationshipCacheSize(), config.getMinQueriesToKeep(), null, null, null, 0, (MithraObjectPersister) objectFactory); } portal.setIndependent(true); config.initializePortal(portal); objectPortal.destroy(); objectPortal = portal; }
public static Attribute[] getPrimaryKeyAttributes() { return new Attribute[] { employeeId() } ; }