Skip to content

[EDM] Add Java Templates#5939

Draft
ThuF wants to merge 5 commits into
masterfrom
edm-templates-java
Draft

[EDM] Add Java Templates#5939
ThuF wants to merge 5 commits into
masterfrom
edm-templates-java

Conversation

@ThuF
Copy link
Copy Markdown
Contributor

@ThuF ThuF commented May 21, 2026

Overview

Adds Java templates to the Entity Data Modeller so the model-driven path works for the Java decorators runtime, on par with the existing TypeScript output.

Fixes: #5938

@ThuF ThuF marked this pull request as draft May 21, 2026 15:53
@ThuF ThuF force-pushed the edm-templates-java branch from 280986a to f7d9897 Compare May 23, 2026 19:03
*/
private void restartIdentityColumns(DirigibleDataSource dataSource, Connection connection, String schema, String tableName) {
try (ResultSet cols = connection.getMetaData()
.getColumns(connection.getCatalog(), schema, tableName, "%")) {
*/
private long computeNextValue(Connection connection, String schema, String tableName, String column) throws SQLException {
String sql = "SELECT MAX(" + quote(connection, column) + ") FROM " + qualifiedTable(connection, schema, tableName);
try (PreparedStatement ps = connection.prepareStatement(sql); ResultSet rs = ps.executeQuery()) {
tableName, column);
return;
}
try (PreparedStatement ps = connection.prepareStatement(sql)) {
try {
long next = computeNextValue(connection, schema, tableName, column);
executeIdentityRestart(dataSource, connection, schema, tableName, column, next);
logger.info("Advanced IDENTITY counter on [{}.{}.{}] to [{}]", schema, tableName, column, next);
Comment on lines +315 to +316
logger.warn("Failed to advance IDENTITY counter on [{}.{}.{}]: {}", schema, tableName, column,
restartError.getMessage());
}
}
} catch (SQLException metadataError) {
logger.warn("Failed to look up IDENTITY columns on [{}.{}]: {}", schema, tableName, metadataError.getMessage());
Comment on lines +358 to +359
logger.info("IDENTITY restart not implemented for dialect [{}] — skipping [{}.{}.{}]", dataSource.getDatabaseSystem(), schema,
tableName, column);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EDM] Add Java Templates

2 participants