Skip to content

Commit

Permalink
#1184 move common schema utils to vuu.util.schema
Browse files Browse the repository at this point in the history
  • Loading branch information
junaidzm13 authored and chrisjstevo committed Feb 21, 2024
1 parent b57ebf1 commit ff550f7
Show file tree
Hide file tree
Showing 20 changed files with 25 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import org.finos.vuu.example.ignite.module.IgniteOrderDataModule
import org.finos.vuu.example.ignite.provider.IgniteOrderDataProvider.columnNameByExternalField
import org.finos.vuu.example.ignite.query.IndexCalculator
import org.finos.vuu.example.ignite.schema.ChildOrderEntityObject
import org.finos.vuu.feature.ignite.schema.SchemaMapper
import org.finos.vuu.plugin.virtualized.table.{VirtualizedRange, VirtualizedSessionTable, VirtualizedViewPortKeys}
import org.finos.vuu.provider.VirtualizedProvider
import org.finos.vuu.util.schema.SchemaMapper
import org.finos.vuu.viewport.ViewPort

import java.util.concurrent.atomic.AtomicInteger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import org.finos.vuu.core.module.simul.model.ChildOrder
import org.finos.vuu.core.sort.ModelType.SortSpecInternal
import org.finos.vuu.example.ignite.IgniteOrderStore
import org.finos.vuu.feature.ignite.FilterAndSortSpecToSql
import org.finos.vuu.feature.ignite.schema.SchemaMapper
import org.finos.vuu.net.FilterSpec
import org.finos.vuu.util.schema.SchemaMapper

class IgniteOrderDataQuery private (private val igniteOrderStore: IgniteOrderStore,
private val schemaMapper: SchemaMapper) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.finos.vuu.example.ignite.schema

import org.apache.ignite.cache.{QueryEntity, QueryIndex, QueryIndexType}
import org.finos.vuu.feature.ignite.schema.ExternalEntitySchema
import org.finos.vuu.util.schema.ExternalEntitySchema

import scala.collection.mutable
import scala.jdk.CollectionConverters._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.finos.vuu.example.ignite.schema

import org.apache.ignite.cache.QueryEntity
import org.finos.vuu.core.module.simul.model.ChildOrder
import org.finos.vuu.feature.ignite.schema.{ExternalEntitySchema, ExternalEntitySchemaBuilder}
import org.finos.vuu.util.schema.{ExternalEntitySchema, ExternalEntitySchemaBuilder}

object ChildOrderEntityObject {
private val _schema = createSchema()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import org.finos.vuu.core.sort.SortDirection
import org.finos.vuu.example.ignite.module.IgniteOrderDataModule
import org.finos.vuu.example.ignite.schema.ChildOrderEntityObject
import org.finos.vuu.example.ignite.{IgniteOrderStore, TestUtils}
import org.finos.vuu.feature.ignite.schema.SchemaMapper
import org.finos.vuu.net.FilterSpec
import org.finos.vuu.util.schema.SchemaMapper
import org.scalatest.funsuite.AnyFunSuiteLike
import org.scalatest.matchers.should.Matchers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import org.finos.vuu.core.sort.SortDirection
import org.finos.vuu.core.table.{Column, Columns}
import org.finos.vuu.example.ignite.IgniteOrderStore
import org.finos.vuu.example.ignite.provider.IgniteOrderDataQueryTest.{entitySchema, internalColumns, internalColumnsByExternalFields}
import org.finos.vuu.feature.ignite.schema.{ExternalEntitySchemaBuilder, ExternalEntitySchema, SchemaMapper}
import org.finos.vuu.net.FilterSpec
import org.finos.vuu.util.schema.{ExternalEntitySchema, ExternalEntitySchemaBuilder, SchemaMapper}
import org.scalamock.scalatest.MockFactory
import org.scalatest.featurespec.AnyFeatureSpec
import org.scalatest.matchers.should.Matchers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.finos.vuu.example.ignite.schema

import org.finos.vuu.feature.ignite.schema.ExternalEntitySchemaBuilder
import org.finos.vuu.util.schema.ExternalEntitySchemaBuilder
import org.scalatest.featurespec.AnyFeatureSpec
import org.scalatest.matchers.should.Matchers

Expand Down
53 changes: 0 additions & 53 deletions example/rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,6 @@
<artifactId>vuu</artifactId>
<version>0.9.61-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.finos.vuu.plugin</groupId>
<artifactId>ignite-plugin</artifactId>
<version>0.9.61-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.finos.vuu</groupId>
<artifactId>vuu</artifactId>
<version>0.9.61-SNAPSHOT</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version}</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.13</artifactId>
<version>${scalatest.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>

<profiles>
Expand Down Expand Up @@ -137,7 +85,6 @@
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>

<phase>compile</phase>
<goals>
<goal>jar</goal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import org.finos.vuu.core.table.{DataTable, RowWithData}
import org.finos.vuu.example.rest.InstrumentServiceClient
import org.finos.vuu.example.rest.model.Instrument
import org.finos.vuu.example.rest.provider.InstrumentsProvider.{INSTRUMENTS_COUNT, columnNameByExternalField, externalSchema}
import org.finos.vuu.feature.ignite.schema.{ExternalEntitySchema, ExternalEntitySchemaBuilder, SchemaMapper}
import org.finos.vuu.provider.DefaultProvider
import org.finos.vuu.util.schema.{ExternalEntitySchema, ExternalEntitySchemaBuilder, SchemaMapper}

import scala.util.{Failure, Success}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package org.finos.vuu.feature.ignite
import org.finos.vuu.core.filter.FilterSpecParser
import org.finos.vuu.core.sort.ModelType.SortSpecInternal
import org.finos.vuu.feature.ignite.filter.{IgniteSqlFilterClause, IgniteSqlFilterTreeVisitor}
import org.finos.vuu.feature.ignite.schema.SchemaMapper
import org.finos.vuu.feature.ignite.sort.IgniteSqlSortBuilder
import org.finos.vuu.net.FilterSpec
import org.finos.vuu.util.schema.SchemaMapper

trait FilterAndSortSpecToSql {
def filterToSql(filterSpec: FilterSpec): String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.finos.vuu.feature.ignite.filter
import com.typesafe.scalalogging.StrictLogging
import org.finos.vuu.core.table.DataType.{CharDataType, StringDataType}
import org.finos.vuu.feature.ignite.filter.IgniteSqlFilterClause.EMPTY_SQL
import org.finos.vuu.feature.ignite.schema.SchemaMapper
import org.finos.vuu.util.schema.SchemaMapper

private object IgniteSqlFilterClause {
val EMPTY_SQL = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.finos.vuu.feature.ignite.sort

import org.finos.vuu.core.sort.ModelType.SortSpecInternal
import org.finos.vuu.core.sort.SortDirection
import org.finos.vuu.feature.ignite.schema.{SchemaMapper, SchemaField}
import org.finos.vuu.util.schema.SchemaMapper


//todo design discussions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package org.finos.vuu.feature.ignite.filter
import org.finos.vuu.core.filter.FilterSpecParser
import org.finos.vuu.core.table.{Column, SimpleColumn}
import org.finos.vuu.feature.ignite.TestInput._
import org.finos.vuu.feature.ignite.schema.{ExternalEntitySchema, SchemaField, SchemaMapper}
import org.finos.vuu.feature.ignite.{IgniteTestsBase, TestOrderEntity}
import org.finos.vuu.util.schema.{ExternalEntitySchema, SchemaField, SchemaMapper}

class IgniteSqlFilteringTest extends IgniteTestsBase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.finos.vuu.feature.ignite.sort

import org.finos.vuu.core.sort.SortDirection
import org.finos.vuu.feature.ignite.schema.{SchemaField, SchemaMapper}
import org.finos.vuu.util.schema.{SchemaField, SchemaMapper}
import org.scalatest.featurespec.AnyFeatureSpec
import org.scalamock.scalatest.MockFactory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.finos.vuu.feature.ignite.sort

import org.finos.vuu.core.sort.SortDirection
import org.finos.vuu.feature.ignite.TestInput.createTestOrderEntity
import org.finos.vuu.feature.ignite.schema.{SchemaField, SchemaMapper}
import org.finos.vuu.feature.ignite.{IgniteTestsBase, TestOrderEntity}
import org.finos.vuu.util.schema.{SchemaField, SchemaMapper}
import org.scalamock.scalatest.MockFactory

class IgniteSqlSortingTest extends IgniteTestsBase with MockFactory {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.finos.vuu.feature.ignite.schema
package org.finos.vuu.util.schema

import org.finos.vuu.feature.ignite.schema.EntitySchema.{ColumnName, Index, IndexName}
import org.finos.vuu.feature.ignite.schema.ExternalDataType.{ExternalDataType, fromString}
import org.finos.vuu.feature.ignite.schema.ExternalEntitySchemaBuilder.InvalidIndexException
import org.finos.vuu.util.schema.EntitySchema.{ColumnName, Index, IndexName}
import org.finos.vuu.util.schema.ExternalDataType.{ExternalDataType, fromString}
import org.finos.vuu.util.schema.ExternalEntitySchemaBuilder.InvalidIndexException

import scala.collection.mutable
import scala.collection.mutable.ListBuffer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package org.finos.vuu.feature.ignite.schema
package org.finos.vuu.util.schema

case class SchemaField(name: String, dType: Class[_], index: Int)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.finos.vuu.feature.ignite.schema
package org.finos.vuu.util.schema

import org.finos.vuu.core.table.Column

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.finos.vuu.feature.ignite.schema
package org.finos.vuu.util.schema

import org.finos.vuu.feature.ignite.schema.ExternalEntitySchemaBuilder.InvalidIndexException
import org.finos.vuu.util.schema.ExternalEntitySchemaBuilder.InvalidIndexException
import org.scalatest.featurespec.AnyFeatureSpec
import org.scalatest.matchers.should.Matchers
import org.scalatest.prop.TableDrivenPropertyChecks._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.finos.vuu.feature.ignite.schema
package org.finos.vuu.util.schema

import org.finos.vuu.core.module.vui.VuiStateModule.stringToFieldDef
import org.finos.vuu.core.table.{Column, Columns, SimpleColumn}
import org.finos.vuu.feature.ignite.schema.SchemaMapper.InvalidSchemaMapException
import org.finos.vuu.feature.ignite.schema.SchemaMapperTest.{fieldsMap, tableColumns}
import org.finos.vuu.util.schema.SchemaMapper.InvalidSchemaMapException
import org.finos.vuu.util.schema.SchemaMapperTest.{fieldsMap, tableColumns}
import org.scalatest.featurespec.AnyFeatureSpec
import org.scalatest.matchers.should.Matchers

Expand Down

0 comments on commit ff550f7

Please sign in to comment.