/** * INTERNAL: * Return a minimal time increment supported by the platform. */ public long getMinimumTimeIncrement(AbstractSession session) { AbstractSession readSession = session.getSessionForClass(getDescriptor().getJavaClass()); while (readSession.isUnitOfWork()) { readSession = ((UnitOfWorkImpl)readSession).getParent().getSessionForClass(getDescriptor().getJavaClass()); } return readSession.getPlatform().minimumTimeIncrement(); }
/** * INTERNAL: * Return a minimal time increment supported by the platform. */ public long getMinimumTimeIncrement(AbstractSession session) { AbstractSession readSession = session.getSessionForClass(getDescriptor().getJavaClass()); while (readSession.isUnitOfWork()) { readSession = ((UnitOfWorkImpl)readSession).getParent().getSessionForClass(getDescriptor().getJavaClass()); } return readSession.getPlatform().minimumTimeIncrement(); }
/** * PUBLIC: * Whenever a historical record is logically deleted (updated) or inserted, * the end and start fields respectively will be set to this value. */ public Object getCurrentTime(AbstractSession session) { if (shouldUseLocalTime()) { return new java.sql.Timestamp(System.currentTimeMillis()); } if (shouldUseDatabaseTime()) { AbstractSession readSession = session.getSessionForClass(getDescriptor().getJavaClass()); while (readSession.isUnitOfWork()) { readSession = ((UnitOfWorkImpl)readSession).getParent().getSessionForClass(getDescriptor().getJavaClass()); } return readSession.getDatasourceLogin().getDatasourcePlatform().getTimestampFromServer(session, readSession.getName()); } return null; }
/** * PUBLIC: * Whenever a historical record is logically deleted (updated) or inserted, * the end and start fields respectively will be set to this value. */ public Object getCurrentTime(AbstractSession session) { if (shouldUseLocalTime()) { return new java.sql.Timestamp(System.currentTimeMillis()); } if (shouldUseDatabaseTime()) { AbstractSession readSession = session.getSessionForClass(getDescriptor().getJavaClass()); while (readSession.isUnitOfWork()) { readSession = ((UnitOfWorkImpl)readSession).getParent().getSessionForClass(getDescriptor().getJavaClass()); } return readSession.getDatasourceLogin().getDatasourcePlatform().getTimestampFromServer(session, readSession.getName()); } return null; }
/** * PUBLIC: * Whenever a historical record is logically deleted (updated) or inserted, * the end and start fields respectively will be set to this value. */ public Object getCurrentTime(AbstractSession session) { if (shouldUseLocalTime()) { return new java.sql.Timestamp(System.currentTimeMillis()); } if (shouldUseDatabaseTime()) { AbstractSession readSession = session.getSessionForClass(getDescriptor().getJavaClass()); while (readSession.isUnitOfWork()) { readSession = ((UnitOfWorkImpl)readSession).getParent().getSessionForClass(getDescriptor().getJavaClass()); } return readSession.getDatasourceLogin().getDatasourcePlatform().getTimestampFromServer(session, readSession.getName()); } return null; }
int offset = getDescriptor().getTables().size() - getHistoricalTables().size(); HistoricalDatabaseTable table = (HistoricalDatabaseTable)getHistoricalTables().elementAt(i); if (table.getName().equals("")) { DatabaseTable mirrored = getDescriptor().getTables().elementAt(i + offset); table.setName(mirrored.getName()); table.setTableQualifier(mirrored.getTableQualifier()); DatabaseField historyField = null; Vector descriptorTables = getDescriptor().getTables(); for (int i = offset; i < descriptorTables.size(); i++) { descriptorTable = (DatabaseTable)descriptorTables.elementAt(i); if (getDescriptor().hasInheritance()) { ClassDescriptor parentDescriptor = getDescriptor().getInheritancePolicy().getParentDescriptor(); while ((parentDescriptor != null) && (parentDescriptor.getHistoryPolicy() == null)) { parentDescriptor = parentDescriptor.getInheritancePolicy().getParentDescriptor();
int offset = getDescriptor().getTables().size() - getHistoricalTables().size(); DatabaseTable table = getHistoricalTables().get(i); if (table.getName().equals("")) { DatabaseTable mirrored = getDescriptor().getTables().get(i + offset); table.setName(mirrored.getName()); table.setTableQualifier(mirrored.getTableQualifier()); DatabaseField historyField = null; List<DatabaseTable> descriptorTables = getDescriptor().getTables(); for (int i = offset; i < descriptorTables.size(); i++) { descriptorTable = descriptorTables.get(i); if (getDescriptor().hasInheritance()) { ClassDescriptor parentDescriptor = getDescriptor().getInheritancePolicy().getParentDescriptor(); while ((parentDescriptor != null) && (parentDescriptor.getHistoryPolicy() == null)) { parentDescriptor = parentDescriptor.getInheritancePolicy().getParentDescriptor();
int offset = getDescriptor().getTables().size() - getHistoricalTables().size(); DatabaseTable table = getHistoricalTables().get(i); if (table.getName().equals("")) { DatabaseTable mirrored = getDescriptor().getTables().get(i + offset); table.setName(mirrored.getName()); table.setTableQualifier(mirrored.getTableQualifier()); DatabaseField historyField = null; List<DatabaseTable> descriptorTables = getDescriptor().getTables(); for (int i = offset; i < descriptorTables.size(); i++) { descriptorTable = descriptorTables.get(i); if (getDescriptor().hasInheritance()) { ClassDescriptor parentDescriptor = getDescriptor().getInheritancePolicy().getParentDescriptor(); while ((parentDescriptor != null) && (parentDescriptor.getHistoryPolicy() == null)) { parentDescriptor = parentDescriptor.getInheritancePolicy().getParentDescriptor();
ClassDescriptor descriptor = getDescriptor(); AbstractRecord modifyRow = null; AbstractRecord originalModifyRow = writeQuery.getModifyRow();
ClassDescriptor descriptor = getDescriptor(); AbstractRecord modifyRow = null; AbstractRecord originalModifyRow = writeQuery.getModifyRow();
ClassDescriptor descriptor = getDescriptor(); AbstractRecord modifyRow = null; AbstractRecord originalModifyRow = writeQuery.getModifyRow();