@Test public void testAfterCommitTransaction() { entityTypeRegistryImpl.afterCommitTransaction("1"); entityTypeRegistryImpl.rollbackTransaction("1"); testGetEntityTypeDescription(); }
@Override public void afterCommitTransaction(String transactionId) { Map<String, EntityTypeDescription> transactionEntityTypeDescriptionMap = transactionsEntityTypeDescriptionMap.remove(transactionId); if (transactionEntityTypeDescriptionMap != null) { transactionEntityTypeDescriptionMap.forEach( (tableName, entityTypeDescription) -> { if (entityTypeDescription != null) { entityTypeDescriptionMap.put(tableName, entityTypeDescription); } else { entityTypeDescriptionMap.remove(tableName); } }); } }
EntityTypeRegistryImpl implements EntityTypeRegistry, TransactionListener { @Override public void afterCommitTransaction(String transactionId) { Map<String, EntityTypeDescription> transactionEntityTypeDescriptionMap = transactionsEntityTypeDescriptionMap.remove(transactionId); if (transactionEntityTypeDescriptionMap != null) { transactionEntityTypeDescriptionMap.forEach( (tableName, entityTypeDescription) -> { if (entityTypeDescription != null) { entityTypeDescriptionMap.put(tableName, entityTypeDescription); } else { entityTypeDescriptionMap.remove(tableName); } }); } } }
EntityTypeRegistryImpl implements EntityTypeRegistry, TransactionListener { @Override public void afterCommitTransaction(String transactionId) { Map<String, EntityTypeDescription> transactionEntityTypeDescriptionMap = transactionsEntityTypeDescriptionMap.remove(transactionId); if (transactionEntityTypeDescriptionMap != null) { transactionEntityTypeDescriptionMap.forEach( (tableName, entityTypeDescription) -> { if (entityTypeDescription != null) { entityTypeDescriptionMap.put(tableName, entityTypeDescription); } else { entityTypeDescriptionMap.remove(tableName); } }); } } EntityTypeRegistryImpl(TransactionManager transactionManager); }
EntityTypeRegistryImpl implements EntityTypeRegistry, TransactionListener { @Override public void afterCommitTransaction(String transactionId) { Map<String, EntityTypeDescription> transactionEntityTypeDescriptionMap = transactionsEntityTypeDescriptionMap.remove(transactionId); if (transactionEntityTypeDescriptionMap != null) { transactionEntityTypeDescriptionMap.forEach( (tableName, entityTypeDescription) -> { if (entityTypeDescription != null) { entityTypeDescriptionMap.put(tableName, entityTypeDescription); } else { entityTypeDescriptionMap.remove(tableName); } }); } } EntityTypeRegistryImpl(TransactionManager transactionManager); @Override void registerEntityType(EntityType entityType); @Override void unregisterEntityType(EntityType entityType); @Override void addAttribute(EntityType entityType, Attribute attribute); @Override void updateAttribute(EntityType entityType, Attribute attr, Attribute updatedAttr); @Override void deleteAttribute(EntityType entityType, Attribute attr); @Override EntityTypeDescription getEntityTypeDescription(String tableName); @Override void afterCommitTransaction(String transactionId); @Override void rollbackTransaction(String transactionId); }
EntityTypeRegistryImpl implements EntityTypeRegistry, TransactionListener { @Override public void afterCommitTransaction(String transactionId) { Map<String, EntityTypeDescription> transactionEntityTypeDescriptionMap = transactionsEntityTypeDescriptionMap.remove(transactionId); if (transactionEntityTypeDescriptionMap != null) { transactionEntityTypeDescriptionMap.forEach( (tableName, entityTypeDescription) -> { if (entityTypeDescription != null) { entityTypeDescriptionMap.put(tableName, entityTypeDescription); } else { entityTypeDescriptionMap.remove(tableName); } }); } } EntityTypeRegistryImpl(TransactionManager transactionManager); @Override void registerEntityType(EntityType entityType); @Override void unregisterEntityType(EntityType entityType); @Override void addAttribute(EntityType entityType, Attribute attribute); @Override void updateAttribute(EntityType entityType, Attribute attr, Attribute updatedAttr); @Override void deleteAttribute(EntityType entityType, Attribute attr); @Override EntityTypeDescription getEntityTypeDescription(String tableName); @Override void afterCommitTransaction(String transactionId); @Override void rollbackTransaction(String transactionId);  }