/** * Initialize insert query. This query is used to insert the collection of objects into the * reference table. */ @Override protected void initializeInsertQuery(AbstractSession session) { super.initializeInsertQuery(session); getContainerPolicy().addFieldsForMapKey(getInsertQuery().getModifyRow()); }
/** * Initialize insert query. This query is used to insert the collection of objects into the * reference table. */ protected void initializeInsertQuery(AbstractSession session) { super.initializeInsertQuery(session); getContainerPolicy().addFieldsForMapKey(getInsertQuery().getModifyRow()); }
/** * Initialize insert query. This query is used to insert the collection of objects into the * reference table. */ @Override protected void initializeInsertQuery(AbstractSession session) { super.initializeInsertQuery(session); getContainerPolicy().addFieldsForMapKey(getInsertQuery().getModifyRow()); }
/** * INTERNAL: * Performs a logical insert into the historical schema. Direct * collections and many to many mappings are maintained through the session * events. */ public void mappingLogicalInsert(DataModifyQuery originalQuery, AbstractRecord arguments, AbstractSession session) { DataModifyQuery historyQuery = new DataModifyQuery(); SQLInsertStatement historyStatement = new SQLInsertStatement(); DatabaseTable histTable = getHistoricalTables().get(0); historyStatement.setTable(histTable); AbstractRecord modifyRow = originalQuery.getModifyRow().clone(); AbstractRecord translationRow = arguments.clone(); // Start could be the version field in timestamp locking. if (!modifyRow.containsKey(getStart())) { Object time = getCurrentTime(session); modifyRow.add(getStart(), time); translationRow.add(getStart(), time); } historyQuery.setSQLStatement(historyStatement); historyQuery.setModifyRow(modifyRow); historyStatement.setModifyRow(modifyRow); session.executeQuery(historyQuery, translationRow); }
/** * INTERNAL: * Performs a logical insert into the historical schema. Direct * collections and many to many mappings are maintained through the session * events. */ public void mappingLogicalInsert(DataModifyQuery originalQuery, AbstractRecord arguments, AbstractSession session) { DataModifyQuery historyQuery = new DataModifyQuery(); SQLInsertStatement historyStatement = new SQLInsertStatement(); DatabaseTable histTable = getHistoricalTables().get(0); historyStatement.setTable(histTable); AbstractRecord modifyRow = originalQuery.getModifyRow().clone(); AbstractRecord translationRow = arguments.clone(); // Start could be the version field in timestamp locking. if (!modifyRow.containsKey(getStart())) { Object time = getCurrentTime(session); modifyRow.add(getStart(), time); translationRow.add(getStart(), time); } historyQuery.setSQLStatement(historyStatement); historyQuery.setModifyRow(modifyRow); historyStatement.setModifyRow(modifyRow); session.executeQuery(historyQuery, translationRow); }
/** * INTERNAL: * Performs a logical insert into the historical schema. Direct * collections and many to many mappings are maintained through the session * events. */ public void mappingLogicalInsert(DataModifyQuery originalQuery, AbstractRecord arguments, AbstractSession session) { DataModifyQuery historyQuery = new DataModifyQuery(); SQLInsertStatement historyStatement = new SQLInsertStatement(); DatabaseTable histTable = (DatabaseTable)getHistoricalTables().elementAt(0); historyStatement.setTable(histTable); AbstractRecord modifyRow = (AbstractRecord)originalQuery.getModifyRow().clone(); AbstractRecord translationRow = (AbstractRecord)arguments.clone(); // Start could be the version field in timestamp locking. if (!modifyRow.containsKey(getStart())) { Object time = getCurrentTime(session); modifyRow.add(getStart(), time); translationRow.add(getStart(), time); } historyQuery.setSQLStatement(historyStatement); historyQuery.setModifyRow(modifyRow); historyStatement.setModifyRow(modifyRow); session.executeQuery(historyQuery, translationRow); }