Skip to content

Commit

Permalink
Sync with DSL compiler snowflake change.
Browse files Browse the repository at this point in the history
Java build v0.9.0

Compiler doesn't use _snowflake suffix anymore.
Unlike entity/event there is not underlying table source, so original name can be used.
This improves naming on Oracle where only 30 chars are available.
Java processor name fix. Use proper qualified name.
  • Loading branch information
zapov committed Jan 21, 2016
1 parent 5c65dfe commit fb207b3
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static string FindSource(Type type)
else if (typeof(IDomainEvent).IsAssignableFrom(type))
source = SourceTypes[type] = "\"{0}\".\"{1}_EVENT\"".With(type.Namespace, type.Name.Replace('.', '$'));
else if (typeof(IIdentifiable).IsAssignableFrom(type))
source = SourceTypes[type] = "\"{0}\".\"{1}_SNOWFLAKE\"".With(type.Namespace, type.Name);
source = SourceTypes[type] = "\"{0}\".\"{1}\"".With(type.Namespace, type.Name);
//TODO cleanup
else if (typeof(IEntity).IsAssignableFrom(type))
source = SourceTypes[type] = "\"{0}\".\"{1}_ENTITY\"".With(type.Namespace, type.Name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static string FindSource(Type type)
else if (typeof(IDomainEvent).IsAssignableFrom(type))
source = SourceTypes[type] = "\"{0}\".\"{1}_event\"".With(type.Namespace, type.Name);
else if (typeof(IIdentifiable).IsAssignableFrom(type))
source = SourceTypes[type] = "\"{0}\".\"{1}_snowflake\"".With(type.Namespace, type.Name);
source = SourceTypes[type] = "\"{0}\".\"{1}\"".With(type.Namespace, type.Name);
//TODO cleanup
else if (typeof(IEntity).IsAssignableFrom(type))
source = SourceTypes[type] = "\"{0}\".\"{1}_entity\"".With(type.Namespace, type.Name);
Expand Down
11 changes: 0 additions & 11 deletions csharp/Server/Revenj.Http/build/post-build.mono.sh

This file was deleted.

8 changes: 4 additions & 4 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<description> DSL Platform compatible backend (https://dsl-platform.com)</description>
<url>https://github.com/ngs-doo/revenj</url>
<packaging>pom</packaging>
<version>0.8.1</version>
<version>0.9.0</version>

<modules>
<module>revenj-core</module>
Expand All @@ -22,19 +22,19 @@
<dependency>
<groupId>org.revenj</groupId>
<artifactId>revenj-core</artifactId>
<version>0.8.1</version>
<version>0.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.revenj</groupId>
<artifactId>revenj-servlet</artifactId>
<version>0.8.1</version>
<version>0.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.revenj</groupId>
<artifactId>revenj-storage</artifactId>
<version>0.8.1</version>
<version>0.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
9 changes: 2 additions & 7 deletions java/revenj-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<description> DSL Platform compatible backend (https://dsl-platform.com)</description>
<url>https://github.com/ngs-doo/revenj</url>
<packaging>jar</packaging>
<version>0.8.1</version>
<version>0.9.0</version>

<dependencies>
<dependency>
Expand Down Expand Up @@ -37,15 +37,10 @@
<artifactId>jinq-asm-rebased</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>com.dslplatform</groupId>
<artifactId>dsl-json</artifactId>
<version>0.9.5</version>
</dependency>
<dependency>
<groupId>com.dslplatform</groupId>
<artifactId>dsl-json-java8</artifactId>
<version>0.9.4</version>
<version>0.9.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
element,
eventAnnotation);
} else {
final String fullName;
if (element.getEnclosingElement() == null) {
fullName = element.asType().toString();
} else {
fullName = element.getEnclosingElement().asType().toString() + "$" + element.getSimpleName().toString();
}
boolean foundImpl = false;
for (TypeMirror iface : element.getInterfaces()) {
String sign = iface.toString();
Expand All @@ -66,7 +60,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
impl = new ArrayList<>();
handlers.put(sign, impl);
}
impl.add(fullName);
impl.add(element.getQualifiedName().toString());
foundImpl = true;
}
if (!foundImpl) {
Expand Down
4 changes: 2 additions & 2 deletions java/revenj-servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<description> DSL Platform compatible backend - servlet (https://dsl-platform.com)</description>
<url>https://github.com/ngs-doo/revenj</url>
<packaging>jar</packaging>
<version>0.8.1</version>
<version>0.9.0</version>

<repositories>
<repository>
Expand All @@ -24,7 +24,7 @@
<dependency>
<groupId>org.revenj</groupId>
<artifactId>revenj-core</artifactId>
<version>0.8.1</version>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
4 changes: 2 additions & 2 deletions java/revenj-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<description> DSL Platform compatible backend for Spring (https://dsl-platform.com)</description>
<url>https://github.com/ngs-doo/revenj</url>
<packaging>jar</packaging>
<version>0.8.1</version>
<version>0.9.0</version>

<dependencies>
<dependency>
<groupId>org.revenj</groupId>
<artifactId>revenj-core</artifactId>
<version>0.8.1</version>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down
4 changes: 2 additions & 2 deletions java/revenj-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<description> DSL Platform compatible backend - S3 integration (https://dsl-platform.com)</description>
<url>https://github.com/ngs-doo/revenj</url>
<packaging>jar</packaging>
<version>0.8.1</version>
<version>0.9.0</version>

<dependencies>
<dependency>
<groupId>org.revenj</groupId>
<artifactId>revenj-core</artifactId>
<version>0.8.1</version>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
Expand Down
4 changes: 2 additions & 2 deletions java/src/test/java/gen/model/Boot.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by DSL Platform
* v1.0.0.33672
* v1.0.0.17084
*/

package gen.model;
Expand Down Expand Up @@ -334,7 +334,7 @@ public void configure(org.revenj.extensibility.Container container) throws java.
metamodel.registerProperty(gen.model.test.Composite.class, "getLazies", "\"lazies\"", gen.model.test.Composite::getLazies);
metamodel.registerProperty(gen.model.test.Composite.class, "getIndexes", "\"indexes\"", gen.model.test.Composite::getIndexes);
test$converter$CompositeListConverter.configure(container);
metamodel.registerDataSource(gen.model.test.CompositeList.class, "\"test\".\"CompositeList_snowflake\"");
metamodel.registerDataSource(gen.model.test.CompositeList.class, "\"test\".\"CompositeList\"");
metamodel.registerProperty(gen.model.test.CompositeList.class, "getURI", "\"URI\"", gen.model.test.CompositeList::getURI);

container.register(gen.model.test.repositories.CompositeListRepository.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by DSL Platform
* v1.0.0.29923
* v1.0.0.17084
*/

package gen.model.test.converters;
Expand All @@ -21,12 +21,12 @@ public CompositeListConverter(List<ObjectConverter.ColumnInfo> allColumns) throw


final java.util.List<ObjectConverter.ColumnInfo> columns =
allColumns.stream().filter(it -> "test".equals(it.typeSchema) && "CompositeList_snowflake".equals(it.typeName))
allColumns.stream().filter(it -> "test".equals(it.typeSchema) && "CompositeList".equals(it.typeName))
.collect(Collectors.toList());
columnCount = columns.size();

column = columns.stream().filter(it -> "URI".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'URI' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'URI' column in test CompositeList. Check if DB is in sync");
__index___URI = (int)column.get().order - 1;

final java.util.List<ObjectConverter.ColumnInfo> columnsExtended =
Expand All @@ -39,95 +39,95 @@ public CompositeListConverter(List<ObjectConverter.ColumnInfo> allColumns) throw
__index__extended_URI = (int)column.get().order - 1;

column = columns.stream().filter(it -> "id".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'id' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'id' column in test CompositeList. Check if DB is in sync");
__index___id = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "id".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'id' column in test CompositeList. Check if DB is in sync");
__index__extended_id = (int)column.get().order - 1;

column = columns.stream().filter(it -> "enn".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'enn' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'enn' column in test CompositeList. Check if DB is in sync");
__index___enn = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "enn".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'enn' column in test CompositeList. Check if DB is in sync");
__index__extended_enn = (int)column.get().order - 1;

column = columns.stream().filter(it -> "en".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'en' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'en' column in test CompositeList. Check if DB is in sync");
__index___en = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "en".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'en' column in test CompositeList. Check if DB is in sync");
__index__extended_en = (int)column.get().order - 1;

column = columns.stream().filter(it -> "tsl".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'tsl' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'tsl' column in test CompositeList. Check if DB is in sync");
__index___tsl = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "tsl".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'tsl' column in test CompositeList. Check if DB is in sync");
__index__extended_tsl = (int)column.get().order - 1;

column = columns.stream().filter(it -> "change".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'change' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'change' column in test CompositeList. Check if DB is in sync");
__index___change = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "change".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'change' column in test CompositeList. Check if DB is in sync");
__index__extended_change = (int)column.get().order - 1;

column = columns.stream().filter(it -> "entities".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entities' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entities' column in test CompositeList. Check if DB is in sync");
__index___entities = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "entities".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entities' column in test CompositeList. Check if DB is in sync");
__index__extended_entities = (int)column.get().order - 1;

column = columns.stream().filter(it -> "simple".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'simple' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'simple' column in test CompositeList. Check if DB is in sync");
__index___simple = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "simple".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'simple' column in test CompositeList. Check if DB is in sync");
__index__extended_simple = (int)column.get().order - 1;

column = columns.stream().filter(it -> "number".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'number' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'number' column in test CompositeList. Check if DB is in sync");
__index___number = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "number".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'number' column in test CompositeList. Check if DB is in sync");
__index__extended_number = (int)column.get().order - 1;

column = columns.stream().filter(it -> "entitiesCount".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entitiesCount' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entitiesCount' column in test CompositeList. Check if DB is in sync");
__index___entitiesCount = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "entitiesCount".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entitiesCount' column in test CompositeList. Check if DB is in sync");
__index__extended_entitiesCount = (int)column.get().order - 1;

column = columns.stream().filter(it -> "hasEntities".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'hasEntities' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'hasEntities' column in test CompositeList. Check if DB is in sync");
__index___hasEntities = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "hasEntities".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'hasEntities' column in test CompositeList. Check if DB is in sync");
__index__extended_hasEntities = (int)column.get().order - 1;

column = columns.stream().filter(it -> "entityHasMoney".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entityHasMoney' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entityHasMoney' column in test CompositeList. Check if DB is in sync");
__index___entityHasMoney = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "entityHasMoney".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'entityHasMoney' column in test CompositeList. Check if DB is in sync");
__index__extended_entityHasMoney = (int)column.get().order - 1;

column = columns.stream().filter(it -> "indexes".equals(it.columnName)).findAny();
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'indexes' column in test CompositeList_snowflake. Check if DB is in sync");
if (!column.isPresent()) throw new java.io.IOException("Unable to find 'indexes' column in test CompositeList. Check if DB is in sync");
__index___indexes = (int)column.get().order - 1;

column = columnsExtended.stream().filter(it -> "indexes".equals(it.columnName)).findAny();
Expand All @@ -144,7 +144,7 @@ public void configure(org.revenj.patterns.ServiceLocator locator) {

@Override
public String getDbName() {
return "\"test\".\"CompositeList_snowflake\"";
return "\"test\".\"CompositeList\"";
}

@Override
Expand Down
Loading

0 comments on commit fb207b3

Please sign in to comment.