|
38 | 38 | import org.eclipse.daanse.rolap.mapping.api.model.enums.AccessHierarchy; |
39 | 39 | import org.eclipse.daanse.rolap.mapping.api.model.enums.AccessMember; |
40 | 40 | import org.eclipse.daanse.rolap.mapping.api.model.enums.ColumnDataType; |
41 | | -import org.eclipse.daanse.rolap.mapping.api.model.enums.InternalDataType; |
42 | 41 | import org.eclipse.daanse.rolap.mapping.api.model.enums.HideMemberIfType; |
| 42 | +import org.eclipse.daanse.rolap.mapping.api.model.enums.InternalDataType; |
43 | 43 | import org.eclipse.daanse.rolap.mapping.api.model.enums.LevelType; |
44 | 44 | import org.eclipse.daanse.rolap.mapping.api.model.enums.RollupPolicyType; |
45 | 45 | import org.eclipse.daanse.rolap.mapping.instance.rec.complex.foodmart.FoodmartMappingSupplier; |
|
64 | 64 | import org.eclipse.daanse.rolap.mapping.pojo.CatalogMappingImpl; |
65 | 65 | import org.eclipse.daanse.rolap.mapping.pojo.CellFormatterMappingImpl; |
66 | 66 | import org.eclipse.daanse.rolap.mapping.pojo.CountMeasureMappingImpl; |
67 | | -import org.eclipse.daanse.rolap.mapping.pojo.PhysicalColumnMappingImpl; |
68 | 67 | import org.eclipse.daanse.rolap.mapping.pojo.CubeConnectorMappingImpl; |
69 | 68 | import org.eclipse.daanse.rolap.mapping.pojo.CubeMappingImpl; |
70 | 69 | import org.eclipse.daanse.rolap.mapping.pojo.DatabaseSchemaMappingImpl; |
|
79 | 78 | import org.eclipse.daanse.rolap.mapping.pojo.MaxMeasureMappingImpl; |
80 | 79 | import org.eclipse.daanse.rolap.mapping.pojo.MeasureGroupMappingImpl; |
81 | 80 | import org.eclipse.daanse.rolap.mapping.pojo.MeasureMappingImpl; |
82 | | -import org.eclipse.daanse.rolap.mapping.pojo.SumMeasureMappingImpl; |
83 | 81 | import org.eclipse.daanse.rolap.mapping.pojo.MemberFormatterMappingImpl; |
84 | 82 | import org.eclipse.daanse.rolap.mapping.pojo.MemberPropertyFormatterMappingImpl; |
85 | 83 | import org.eclipse.daanse.rolap.mapping.pojo.MemberPropertyMappingImpl; |
86 | 84 | import org.eclipse.daanse.rolap.mapping.pojo.ParentChildLinkMappingImpl; |
| 85 | +import org.eclipse.daanse.rolap.mapping.pojo.PhysicalColumnMappingImpl; |
87 | 86 | import org.eclipse.daanse.rolap.mapping.pojo.PhysicalCubeMappingImpl; |
88 | 87 | import org.eclipse.daanse.rolap.mapping.pojo.PhysicalTableMappingImpl; |
89 | 88 | import org.eclipse.daanse.rolap.mapping.pojo.RowMappingImpl; |
|
93 | 92 | import org.eclipse.daanse.rolap.mapping.pojo.SqlStatementMappingImpl; |
94 | 93 | import org.eclipse.daanse.rolap.mapping.pojo.SqlViewMappingImpl; |
95 | 94 | import org.eclipse.daanse.rolap.mapping.pojo.StandardDimensionMappingImpl; |
| 95 | +import org.eclipse.daanse.rolap.mapping.pojo.SumMeasureMappingImpl; |
96 | 96 | import org.eclipse.daanse.rolap.mapping.pojo.TableQueryMappingImpl; |
97 | 97 | import org.eclipse.daanse.rolap.mapping.pojo.TimeDimensionMappingImpl; |
98 | 98 | import org.eclipse.daanse.rolap.mapping.pojo.VirtualCubeMappingImpl; |
99 | 99 |
|
100 | | -import mondrian.test.UdfTest; |
| 100 | +import mondrian.test.FormatterUtil; |
| 101 | + |
| 102 | + |
101 | 103 |
|
102 | 104 | public class SchemaModifiers { |
103 | 105 |
|
@@ -7229,7 +7231,7 @@ protected List<? extends CalculatedMemberMapping> cubeCalculatedMembers(CubeMapp |
7229 | 7231 | .build(), |
7230 | 7232 | CalculatedMemberPropertyMappingImpl.builder() |
7231 | 7233 | .withName("CELL_FORMATTER") |
7232 | | - .withValue(UdfTest.FooBarCellFormatter.class.getName()) |
| 7234 | + .withValue(FormatterUtil.FooBarCellFormatter.class.getName()) |
7233 | 7235 | .build() |
7234 | 7236 | )) |
7235 | 7237 | .build()); |
@@ -8138,7 +8140,7 @@ protected List<? extends MeasureGroupMapping> physicalCubeMeasureGroups(Physical |
8138 | 8140 | .withName("Unit Sales Foo Bar") |
8139 | 8141 | .withColumn(FoodmartMappingSupplier.UNIT_SALES_COLUMN_IN_SALES_FACT_1997) |
8140 | 8142 |
|
8141 | | - .withFormatter(UdfTest.FooBarCellFormatter.class.getName()) |
| 8143 | + .withFormatter(FormatterUtil.FooBarCellFormatter.class.getName()) |
8142 | 8144 | .withMeasureGroup(mg) |
8143 | 8145 | .build())); |
8144 | 8146 | } |
@@ -9426,7 +9428,7 @@ protected List<? extends MeasureGroupMapping> physicalCubeMeasureGroups(Physical |
9426 | 9428 | .withColumn(FoodmartMappingSupplier.UNIT_SALES_COLUMN_IN_SALES_FACT_1997) |
9427 | 9429 |
|
9428 | 9430 | .withFormatString("Standard") |
9429 | | - .withFormatter(UdfTest.FooBarCellFormatter.class.getName()) |
| 9431 | + .withFormatter(FormatterUtil.FooBarCellFormatter.class.getName()) |
9430 | 9432 | .build())); |
9431 | 9433 | } |
9432 | 9434 | return result; |
@@ -9501,7 +9503,7 @@ protected List<? extends CalculatedMemberMapping> cubeCalculatedMembers(CubeMapp |
9501 | 9503 | .withCalculatedMemberProperties(List.of( |
9502 | 9504 | CalculatedMemberPropertyMappingImpl.builder() |
9503 | 9505 | .withName("CELL_FORMATTER") |
9504 | | - .withValue(UdfTest.FooBarCellFormatter.class.getName()) |
| 9506 | + .withValue(FormatterUtil.FooBarCellFormatter.class.getName()) |
9505 | 9507 | .build() |
9506 | 9508 | )) |
9507 | 9509 | .build()); |
@@ -9535,7 +9537,7 @@ protected List<? extends CalculatedMemberMapping> cubeCalculatedMembers(CubeMapp |
9535 | 9537 | .withFormula("[Measures].[Unit Sales]") |
9536 | 9538 | //.dimension("Measures") |
9537 | 9539 | .withCellFormatter(CellFormatterMappingImpl.builder() |
9538 | | - .withRef(UdfTest.FooBarCellFormatter.class.getName()) |
| 9540 | + .withRef(FormatterUtil.FooBarCellFormatter.class.getName()) |
9539 | 9541 | .build()) |
9540 | 9542 | .build()); |
9541 | 9543 | } |
@@ -9622,7 +9624,7 @@ protected List<? extends DimensionConnectorMapping> cubeDimensionConnectors(Cube |
9622 | 9624 | .withUniqueMembers(true) |
9623 | 9625 | //.withFormatter(UdfTest.FooBarMemberFormatter.class.getName()) |
9624 | 9626 | .withMemberFormatter(MemberFormatterMappingImpl.builder() |
9625 | | - .withRef(UdfTest.FooBarMemberFormatter.class.getName()) |
| 9627 | + .withRef(FormatterUtil.FooBarMemberFormatter.class.getName()) |
9626 | 9628 | .build()) |
9627 | 9629 | .build() |
9628 | 9630 | )) |
@@ -9746,7 +9748,7 @@ protected List<? extends DimensionConnectorMapping> cubeDimensionConnectors(Cube |
9746 | 9748 | MemberPropertyMappingImpl.builder() |
9747 | 9749 | .withName("Medium") |
9748 | 9750 | .withColumn(FoodmartMappingSupplier.MEDIA_TYPE_COLUMN_IN_PROMOTION) |
9749 | | - .withFormatter(MemberPropertyFormatterMappingImpl.builder().withRef(UdfTest.FooBarPropertyFormatter.class.getName()).build()) |
| 9751 | + .withFormatter(MemberPropertyFormatterMappingImpl.builder().withRef(FormatterUtil.FooBarPropertyFormatter.class.getName()).build()) |
9750 | 9752 | .build() |
9751 | 9753 | )) |
9752 | 9754 | .build() |
@@ -9811,7 +9813,7 @@ protected List<? extends DimensionConnectorMapping> cubeDimensionConnectors(Cube |
9811 | 9813 | MemberPropertyMappingImpl.builder() |
9812 | 9814 | .withName("Medium") |
9813 | 9815 | .withColumn(FoodmartMappingSupplier.MEDIA_TYPE_COLUMN_IN_PROMOTION) |
9814 | | - .withFormatter(MemberPropertyFormatterMappingImpl.builder().withRef(UdfTest.FooBarPropertyFormatter.class.getName()).build()) |
| 9816 | + .withFormatter(MemberPropertyFormatterMappingImpl.builder().withRef(FormatterUtil.FooBarPropertyFormatter.class.getName()).build()) |
9815 | 9817 | .build() |
9816 | 9818 | )) |
9817 | 9819 | .build() |
@@ -10045,34 +10047,34 @@ protected List<MappingUserDefinedFunction> schemaUserDefinedFunctions(MappingSch |
10045 | 10047 | */ |
10046 | 10048 | } |
10047 | 10049 |
|
10048 | | - public static class UdfTestModifier17 extends PojoMappingModifier { |
10049 | | - |
10050 | | - /* |
10051 | | - "<UserDefinedFunction name=\"Reverse\" className=\"" |
10052 | | - + functionClass.getName() |
10053 | | - + "\"/>\n"); |
10054 | | - */ |
10055 | | - |
10056 | | - private final Class<? extends UdfTest.ReverseFunction> functionClass; |
10057 | | - |
10058 | | - public UdfTestModifier17(CatalogMapping catalog, final Class<? extends UdfTest.ReverseFunction> functionClass) { |
10059 | | - super(catalog); |
10060 | | - this.functionClass = functionClass; |
10061 | | - } |
10062 | | - |
10063 | | - /* TODO: UserDefinedFunction |
10064 | | - @Override |
10065 | | - protected List<MappingUserDefinedFunction> schemaUserDefinedFunctions(MappingSchema schema) { |
10066 | | - List<MappingUserDefinedFunction> result = new ArrayList<>(); |
10067 | | - result.addAll(super.schemaUserDefinedFunctions(schema).stream().filter(f -> !"Reverse".equals(f.name())).toList()); |
10068 | | - result.add(UserDefinedFunctionRBuilder.builder() |
10069 | | - .name("Reverse") |
10070 | | - .className(functionClass.getName()) |
10071 | | - .build()); |
10072 | | - return result; |
10073 | | - } |
10074 | | - */ |
10075 | | - } |
| 10050 | +// public static class UdfTestModifier17 extends PojoMappingModifier { |
| 10051 | +// |
| 10052 | +// /* |
| 10053 | +// "<UserDefinedFunction name=\"Reverse\" className=\"" |
| 10054 | +// + functionClass.getName() |
| 10055 | +// + "\"/>\n"); |
| 10056 | +// */ |
| 10057 | +// |
| 10058 | +// private final Class<? extends FormatterUtil.ReverseFunction> functionClass; |
| 10059 | +// |
| 10060 | +// public UdfTestModifier17(CatalogMapping catalog, final Class<? extends FormatterUtil.ReverseFunction> functionClass) { |
| 10061 | +// super(catalog); |
| 10062 | +// this.functionClass = functionClass; |
| 10063 | +// } |
| 10064 | +// |
| 10065 | +// /* TODO: UserDefinedFunction |
| 10066 | +// @Override |
| 10067 | +// protected List<MappingUserDefinedFunction> schemaUserDefinedFunctions(MappingSchema schema) { |
| 10068 | +// List<MappingUserDefinedFunction> result = new ArrayList<>(); |
| 10069 | +// result.addAll(super.schemaUserDefinedFunctions(schema).stream().filter(f -> !"Reverse".equals(f.name())).toList()); |
| 10070 | +// result.add(UserDefinedFunctionRBuilder.builder() |
| 10071 | +// .name("Reverse") |
| 10072 | +// .className(functionClass.getName()) |
| 10073 | +// .build()); |
| 10074 | +// return result; |
| 10075 | +// } |
| 10076 | +// */ |
| 10077 | +// } |
10076 | 10078 |
|
10077 | 10079 | public static class UdfTestModifier18 extends PojoMappingModifier { |
10078 | 10080 |
|
|
0 commit comments