Skip to content

Commit

Permalink
Create AggregationDataStore module (#845)
Browse files Browse the repository at this point in the history
* Create AggregationDataStore module

* Address Aaron's comments

* Fix build failure

AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

Define QueryEngine Contract (#867)

Fixed rebase on master

SQL Query Engine  (#878)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

Added calcite as a dependency.  Merged in changes for QueryEngine interface

Fixed checkstyle issues

Added basic H2 DB test harness

Started breaking out projections

Moved getValue and setValue from PersistentResource to EntityDictionary

Added basic logic to hydrate entities

Added FromTable and FromSubquery annotations.  Add explicit exclusion of entity relationship hydration

Minor cleanup

Refactored HQLFilterOperation to take an alias generator

Added test support for RSQL filter generation. Some cleanup

Added basic support for WHERE clause filtering on the fact table

Added working test for subquery SQL

Added basic join logic for filters

Added a test with a subquery and a filter join

Refactored Schema classes and Query to support metric aggregation SQL expansion

Added group by support

Added logic for ID generation

Added sorting logic and test

Added pagination support and testing

All column references use proper name now for SQL

Removed calcite as a query engine

Refactored HQLFilterOperation so it can be used for Having and Where clause generaiton

Added HAVING clause support

Changed Query to take schema instead of entityClass

First pass at cleanup

Fixed checkstyles

Cleanup

Cleanup

Added a complex SQL expression test and fixed bugs

Fixed merge issues.  Added another test.  Added better logging

Fixed bug in pagination SQL generation

* Build is working

* Inspection rework

Add EntityProjection plumbing (#949)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

* Initial sketch

PersistentResourceTest now passes

LifeCycleTest tests now pass

More API changes for data store transaction.  Also fixed createObject in persistent resource to take the correct projection

Started to refactor tests

IncludedProcessorTest refactored

Refactored LifeCycleTest

Started refactor on PersistentResourceTest

More refactoring.  Fixed a bug in Resource.toPersistentResource

Only one test failing in PersistentResourceTest

PersistentResourceTests now pass

UpdateOnCreateTests now pass

Added skeleton for translating JSON-API URL path into an EntityProjection

Basic EntityProjectionMaker almost complete

Added ability to merge entity projections by relationship

Added first test for EntityProjectionMaker

Non-working veresion (but clean)

Tests now pass

All EntityProjectioNMaker tests pass

Elide-Core now builds

Added handling of sparse attributes and relationships

Expanding attributes for included entities

Fixed a number of bugs found in IT tests

Fixed some of the EntityProjectionMaker tests

Fixed unit tests

Made temporary modifications to exclude GraphQL (Build now passes)

Added sparse field unit tests for EntityProjectionMaker

* Fixed build issues after rebase

* Removed duplicated Schema class from rebase

* Entity projection with aliases (#963)

* Hacked up PersistentResource with new design

* Core now compiles (and tests can run

* EntityProjectionMaker tests pass

* Build now passes (major cleanup still needed

* Wire in entity projection4 json api (#964)

* Fixed DataStore API.  Fixed a lot of the core unit tests

* Checkstyles and more fixes

* Hibernate 5 Tests Pass

* Full build passes

* Wire in entity projection4 json api (#965)

* Initial concept.  No testing changed.

* Core compiles and EntityProjectionMaker tests (original ones) now pass

* Minor edits to TestRequestScope

* Full build passes now

* removed entity dictionary from entity projection

* Pre-inspection cleanup

* minor inspection fixup

Hydrate Relationship (#987)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

* Added basic H2 DB test harness

* Started breaking out projections

* Moved getValue and setValue from PersistentResource to EntityDictionary

* Added basic logic to hydrate entities

* Added FromTable and FromSubquery annotations.  Add explicit exclusion of entity relationship hydration

* Refactored HQLFilterOperation to take an alias generator

* Added test support for RSQL filter generation. Some cleanup

* Added basic support for WHERE clause filtering on the fact table

* Added working test for subquery SQL

* Added basic join logic for filters

* Added a test with a subquery and a filter join

* Refactored Schema classes and Query to support metric aggregation SQL expansion

* Added group by support

* Added logic for ID generation

* Added sorting logic and test

* Added pagination support and testing

* All column references use proper name now for SQL

* Removed calcite as a query engine

* Refactored HQLFilterOperation so it can be used for Having and Where clause generaiton

* Added HAVING clause support

* Changed Query to take schema instead of entityClass

* First pass at cleanup

* Fixed checkstyles

* Cleanup

* Hydrate Relationship

* Cleanup

* Added a complex SQL expression test and fixed bugs

* Fixed merge issues.  Added another test.  Added better logging

* Self-review

* Self-review

* Self-review

* Self-review

* Self-review

* Address comments from @aklish

* Refactor EntityHydrator (#893)

* rebase

* keep Jiaqi's changes

* fix id

* fix maven verify

* Remove HQLFilterOperation

* fix dictionary

* fix SqlEngineTest

* remove unused part

* make codacy happy

* should use getParametrizedType

* address comments

Implement GraphQLEntityProjectionMaker (#986)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

* Initial sketch

PersistentResourceTest now passes

LifeCycleTest tests now pass

More API changes for data store transaction.  Also fixed createObject in persistent resource to take the correct projection

Started to refactor tests

IncludedProcessorTest refactored

Refactored LifeCycleTest

Started refactor on PersistentResourceTest

More refactoring.  Fixed a bug in Resource.toPersistentResource

Only one test failing in PersistentResourceTest

PersistentResourceTests now pass

UpdateOnCreateTests now pass

Added skeleton for translating JSON-API URL path into an EntityProjection

Basic EntityProjectionMaker almost complete

Added ability to merge entity projections by relationship

Added first test for EntityProjectionMaker

Non-working veresion (but clean)

Tests now pass

All EntityProjectioNMaker tests pass

Elide-Core now builds

Added handling of sparse attributes and relationships

Expanding attributes for included entities

Fixed a number of bugs found in IT tests

Fixed some of the EntityProjectionMaker tests

Fixed unit tests

Made temporary modifications to exclude GraphQL (Build now passes)

Added sparse field unit tests for EntityProjectionMaker

* Fixed build issues after rebase

* GraphQL projection maker using document

* Argument handling and fragment check

* Add comments

* Add fragment resolver

* fix typo

* break code into more methods

* remove pagination and sorting

* Removed duplicated Schema class from rebase

* re-arrange keywords

* Address comment

* Add arguments for attribute fields

* Handle arguments

* support partial query, update edges/node logic

* Entity projection with aliases

* Entity projection with aliases (#963)

* Hacked up PersistentResource with new design

* Core now compiles (and tests can run

* EntityProjectionMaker tests pass

* Build now passes (major cleanup still needed

* fix create relationship object using entity

* Add tests passed

* code clean up

* refactor fatcher, fix test cases

* rename keywords

* rebase branch (#12)

* rebased

* Graphql projection refactor (#13)

* fix fragment resolver

* Fix variable resolver

* Wire in entity projection4 json api (#964)

* Fixed DataStore API.  Fixed a lot of the core unit tests

* Checkstyles and more fixes

* Hibernate 5 Tests Pass

* Full build passes

* Wire in entity projection4 json api (#965)

* Initial concept.  No testing changed.

* Core compiles and EntityProjectionMaker tests (original ones) now pass

* Minor edits to TestRequestScope

* Full build passes now

* removed entity dictionary from entity projection

* Pre-inspection cleanup

* minor inspection fixup

* rebase

* Rebased on AggregationDataStore

* clean up extra new lines

* address comments

* Builder pattern

* update comments

* remove projection in entity

* fix jackson

* Hydrate Relationship (#987) (#15)

* Address some codecy comments

* Add comment for partial query

* Reenable tests

* Address comments, refactor alias

* Add test for alias

* swapped test case

* fix get type

Added AggregationDataStore Code (#991)

* Adding testing for aggregation data store

* Debugging integration tests

* Continuing testing work

* AggregationDataStore

* AggregationDataStore testing

* Added more tests

* Aggregation Data Store

* Cleaned up testing code

* Cleaned up code, fixed helper for AggregationDataStore

* end

* Fixed checkstyle, other minor fixes

* fixed comment

* Minor fixes

* Fixed id type issue, added exception for queries with no metrics

Fixed build (#993)

Making TimeDimension an interface (#992)

[maven-release-plugin] prepare release 5.0.0-pr1

[maven-release-plugin] prepare for next development iteration

Renamed graphQL file to match test (#1002)

[maven-release-plugin] prepare release 5.0.0-pr2

[maven-release-plugin] prepare for next development iteration

Add JoinTo annotation (#1006)

* Added JoinTo Annotation

* Added working test

* Added TODO comment for next PR

* Added TODO comment for next PR

* Added Sorting and Filtering support for JoinTo Columns

* Fixed IT tests for Aggregation Data Store

* Moved entityManager creation to happen separately for each query (#1008)

* Moved entityManager creation to happen separately for each query

* Closing EntityManager after each query

* Inspection rework

Column annotation (#1017)

* Solved column issue and added QueryEngineFactory

* Caching query engine in AggregationDataStore

* Fixed column description

* Update SQLQueryEngine.java (#1019)

* Add SQLMetrix, rearrange packages (#1020)

* Add SQLMetrix, rearrange packages

* address comment

Manager transacton manually (#1021)

* Manager transacton manually

* Add readonly

Hydrate GraphQL Schema with parameterized attributes (#1018)

* GraphQL schema expose expected argument name and its type for each attribute

* Change empty arguments to unmodifable set

AggregationStore: Add multiple time grain definitions to schema (#1022)

* Fixed checkstyle warnings and errors.  Separated the Query dimension interface from the Schema dimension interface

* Added skeleton code to convert entity projection arguments into time grains

* Cleanup

* Class renames per inspection comments

* Inspection comments

Refactor time dimension logic (#1028)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

ISSUE-1026 Add support for @subselect (#1038)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

* ISSUE-1026 Add support for @subselect

* Address comments

ISSUE-1027 Support join for having clause (#1039)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

* ISSUE-1027 Support join for having clause

function name fixed to enableISO8601Dates (#1052)

Support for multiple queries at root is added (#1044)

* Support for multiple queries at root is added

* Added test with alias

* comments resolved

Add time grain to GraphQL schema (#1042)

* Added basic plumbing to push attributes from the entity projection down to the QueryEngine

* Added logic to expand SQL time expression in SQLQueryEngine

* Added SQLQueryEngine tests

* Added IT tests

* The AggregationStore now adds graphql parameters for parameterized columns

* Minor refactor

* Inspection rework

* Minor fix

Support multiple query of same entity with different alias (#1055)

* Support multiple query of same entity with different alias

* add static method to generate keyname for GraphQLProjectionInfo projections

* Remove aliasPartialQuerySameAttribute

MetadataStore Models (#1068)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

* Metadatastore models

* Address comments

* address comments

* move root

* fix style check

SQLQueryTemplate Model (#1073)

* SQLQueryTemplate

* SQLTables

* refactor

* update sql dimension projection

* update sql dimension projection

* clean up dimension projection

* refactor sql components

* aggregatable field rework

* add comments

* rearrange packages

* Add dimension projection back

* fix checkstyle

* Add dictionary

* Simplify MetricFunction and SQLQueryTemplate

* Address comments

Integrate Metadata Model and SQLQueryTemplate Model (#1083)

* Integrate Metadata Model and SQLQueryTemplate Model

* remove AggregationDictionary and AggregationManager

* Add timezone

* Can only query analyticView

Fixed issues with rebase

Add auto configuration for aggregation store (#1087)

* Added autoconfiguration for QueryEngineFactory

* Unified class scanning.  Started cleaning up datastores so they only register the entities they manage

* Full build passes

* Minor cleanup

* Minor refactoring

* Added EntityManagerFactory bean configuratino

* Refactored class scanning for Elide standalone

* Updated spring boot starter pom

* Removed @entity from all metadata models.  Started cleaning up entity dictionary entity registration

* Broken implementation.  Just checking in so I can revert if needed.

* All tests pass

* Added unit tests

* Minor cleanup

* One more fix

* Fixed broken tests

* Added package include support back

* Class scanning for annotations ignores inherited

* Added a test based on inspection comments

* Inspection comment fix

* Changed initalization of MetadataStore

* More inspection rework

* Turned back on OWASP scanning

* More rework

remove @inherited (#1092)

Support Non JPA Entity in AggregationDataStore (#1051)

* Create AggregationDataStore module (#845)

* Create AggregationDataStore module

* Address Aaron's comments

* Fix build failure

AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

Define QueryEngine Contract (#867)

Fixed rebase on master

SQL Query Engine  (#878)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

Added calcite as a dependency.  Merged in changes for QueryEngine interface

Fixed checkstyle issues

Added basic H2 DB test harness

Started breaking out projections

Moved getValue and setValue from PersistentResource to EntityDictionary

Added basic logic to hydrate entities

Added FromTable and FromSubquery annotations.  Add explicit exclusion of entity relationship hydration

Minor cleanup

Refactored HQLFilterOperation to take an alias generator

Added test support for RSQL filter generation. Some cleanup

Added basic support for WHERE clause filtering on the fact table

Added working test for subquery SQL

Added basic join logic for filters

Added a test with a subquery and a filter join

Refactored Schema classes and Query to support metric aggregation SQL expansion

Added group by support

Added logic for ID generation

Added sorting logic and test

Added pagination support and testing

All column references use proper name now for SQL

Removed calcite as a query engine

Refactored HQLFilterOperation so it can be used for Having and Where clause generaiton

Added HAVING clause support

Changed Query to take schema instead of entityClass

First pass at cleanup

Fixed checkstyles

Cleanup

Cleanup

Added a complex SQL expression test and fixed bugs

Fixed merge issues.  Added another test.  Added better logging

Fixed bug in pagination SQL generation

* Build is working

* Inspection rework

Add EntityProjection plumbing (#949)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

* Initial sketch

PersistentResourceTest now passes

LifeCycleTest tests now pass

More API changes for data store transaction.  Also fixed createObject in persistent resource to take the correct projection

Started to refactor tests

IncludedProcessorTest refactored

Refactored LifeCycleTest

Started refactor on PersistentResourceTest

More refactoring.  Fixed a bug in Resource.toPersistentResource

Only one test failing in PersistentResourceTest

PersistentResourceTests now pass

UpdateOnCreateTests now pass

Added skeleton for translating JSON-API URL path into an EntityProjection

Basic EntityProjectionMaker almost complete

Added ability to merge entity projections by relationship

Added first test for EntityProjectionMaker

Non-working veresion (but clean)

Tests now pass

All EntityProjectioNMaker tests pass

Elide-Core now builds

Added handling of sparse attributes and relationships

Expanding attributes for included entities

Fixed a number of bugs found in IT tests

Fixed some of the EntityProjectionMaker tests

Fixed unit tests

Made temporary modifications to exclude GraphQL (Build now passes)

Added sparse field unit tests for EntityProjectionMaker

* Fixed build issues after rebase

* Removed duplicated Schema class from rebase

* Entity projection with aliases (#963)

* Hacked up PersistentResource with new design

* Core now compiles (and tests can run

* EntityProjectionMaker tests pass

* Build now passes (major cleanup still needed

* Wire in entity projection4 json api (#964)

* Fixed DataStore API.  Fixed a lot of the core unit tests

* Checkstyles and more fixes

* Hibernate 5 Tests Pass

* Full build passes

* Wire in entity projection4 json api (#965)

* Initial concept.  No testing changed.

* Core compiles and EntityProjectionMaker tests (original ones) now pass

* Minor edits to TestRequestScope

* Full build passes now

* removed entity dictionary from entity projection

* Pre-inspection cleanup

* minor inspection fixup

Hydrate Relationship (#987)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

* Added basic H2 DB test harness

* Started breaking out projections

* Moved getValue and setValue from PersistentResource to EntityDictionary

* Added basic logic to hydrate entities

* Added FromTable and FromSubquery annotations.  Add explicit exclusion of entity relationship hydration

* Refactored HQLFilterOperation to take an alias generator

* Added test support for RSQL filter generation. Some cleanup

* Added basic support for WHERE clause filtering on the fact table

* Added working test for subquery SQL

* Added basic join logic for filters

* Added a test with a subquery and a filter join

* Refactored Schema classes and Query to support metric aggregation SQL expansion

* Added group by support

* Added logic for ID generation

* Added sorting logic and test

* Added pagination support and testing

* All column references use proper name now for SQL

* Removed calcite as a query engine

* Refactored HQLFilterOperation so it can be used for Having and Where clause generaiton

* Added HAVING clause support

* Changed Query to take schema instead of entityClass

* First pass at cleanup

* Fixed checkstyles

* Cleanup

* Hydrate Relationship

* Cleanup

* Added a complex SQL expression test and fixed bugs

* Fixed merge issues.  Added another test.  Added better logging

* Self-review

* Self-review

* Self-review

* Self-review

* Self-review

* Address comments from @aklish

* Refactor EntityHydrator (#893)

* rebase

* keep Jiaqi's changes

* fix id

* fix maven verify

* Remove HQLFilterOperation

* fix dictionary

* fix SqlEngineTest

* remove unused part

* make codacy happy

* should use getParametrizedType

* address comments

Implement GraphQLEntityProjectionMaker (#986)

* AggregationDataStore: Schema (#846)

* AggregationDataStore: Static Attribute Aggregation

* Address comments

* Implement TimeDimension and all its supporting components

* refactor

* Address comments from @aklish

* Address comments from @aklish && Tests & Javadoc

* Address comments from @aklish

* Address comments from @aklish and @hellohanchen

* Address comments from Aaron

* ToMany is not supported

* Address comments from Aaron

* Initial sketch

PersistentResourceTest now passes

LifeCycleTest tests now pass

More API changes for data store transaction.  Also fixed createObject in persistent resource to take the correct projection

Started to refactor tests

IncludedProcessorTest refactored

Refactored LifeCycleTest

Started refactor on PersistentResourceTest

More refactoring.  Fixed a bug in Resource.toPersistentResource

Only one test failing in PersistentResourceTest

PersistentResourceTests now pass

UpdateOnCreateTests now pass

Added skeleton for translating JSON-API URL path into an EntityProjection

Basic EntityProjectionMaker almost complete

Added ability to merge entity projections by relationship

Added first test for EntityProjectionMaker

Non-working veresion (but clean)

Tests now pass

All EntityProjectioNMaker tests pass

Elide-Core now builds

Added handling of sparse attributes and relationships

Expanding attributes for included entities

Fixed a number of bugs found in IT tests

Fixed some of the EntityProjectionMaker tests

Fixed unit tests

Made temporary modifications to exclude GraphQL (Build now passes)

Added sparse field unit tests for EntityProjectionMaker

* Fixed build issues after rebase

* GraphQL projection maker using document

* Argument handling and fragment check

* Add comments

* Add fragment resolver

* fix typo

* break code into more methods

* remove pagination and sorting

* Removed duplicated Schema class from rebase

* re-arrange keywords

* Address comment

* Add arguments for attribute fields

* Handle arguments

* support partial query, update edges/node logic

* Entity projection with aliases

* Entity projection with aliases (#963)

* Hacked up PersistentResource with new design

* Core now compiles (and tests can run

* EntityProjectionMaker tests pass

* Build now passes (major cleanup still needed

* fix create relationship object using entity

* Add tests passed

* code clean up

* refactor fatcher, fix test cases

* rename keywords

* rebase branch (#12)

* rebased

* Graphql projection refactor (#13)

* fix fragment resolver

* Fix variable resolver

* Wire in entity projection4 json api (#964)

* Fixed DataStore API.  Fixed a lot of the core unit tests

* Checkstyles and more fixes

* Hibernate 5 Tests Pass

* Full build passes

* Wire in entity projection4 json api (#965)

* Initial concept.  No testing changed.

* Core compiles and EntityProjectionMaker tests (original ones) now pass

* Minor edits to TestRequestScope

* Full build passes now

* removed entity dictionary from entity projection

* Pre-inspection cleanup

* minor inspection fixup

* rebase

* Rebased on AggregationDataStore

* clean up extra new lines

* address comments

* Builder pattern

* update comments

* remove projection in entity

* fix jackson

* Hydrate Relationship (#987) (#15)

* Address some codecy comments

* Add comment for partial query

* Reenable tests

* Address comments, refactor alias

* Add test for alias

* swapped test case

* fix get type

Added AggregationDataStore Code (#991)

* Adding testing for aggregation data store

* Debugging integration tests

* Continuing testing work

* AggregationDataStore

* AggregationDataStore testing

* Added more tests

* Aggregation Data Store

* Cleaned up testing code

* Cleaned up code, fixed helper for AggregationDataStore

* end

* Fixed checkstyle, other minor fixes

* fixed comment

* Minor fixes

* Fixed id type issue, added exception for queries with no metrics

Fixed build (#993)

Making TimeDimension an interface (#992)

* [maven-release-plugin] prepare release 5.0.0-pr1

* [maven-release-plugin] prepare for next development iteration

* Renamed graphQL file to match test (#1002)

* [maven-release-plugin] prepare release 5.0.0-pr2

* [maven-release-plugin] prepare for next development iteration

* Add JoinTo annotation (#1006)

* Added JoinTo Annotation

* Added working test

* Added TODO comment for next PR

* Added TODO comment for next PR

* Added Sorting and Filtering support for JoinTo Columns

* Fixed IT tests for Aggregation Data Store

* Moved entityManager creation to happen separately for each query (#1008)

* Moved entityManager creation to happen separately for each query

* Closing EntityManager after each query

* Inspection rework

* Column annotation (#1017)

* Solved column issue and added QueryEngineFactory

* Caching query engine in AggregationDataStore

* Fixed column description

* Update SQLQueryEngine.java (#1019)

* Add SQLMetrix, rearrange packages (#1020)

* Add SQLMetrix, rearrange packages

* address comment

* Manager transacton manually

* Add readonly

* Manager transacton manually (#1021)

* Manager transacton manually

* Add readonly

* Hydrate GraphQL Schema with parameterized attributes (#1018)

* GraphQL schema expose expected argument name and its type for each attribute

* Change empty arguments to unmodifable set

* AggregationStore: Add multiple time grain definitions to schema (#1022)

* Fixed checkstyle warnings and errors.  Separated the Query dimension interface from the Schema dimension interface

* Added skeleton code to convert entity projection arguments into time grains

* Cleanup

* Class renames per inspection comments

* Inspection comments

* some rework

* use getTimeDimension()

* change exception

* Refactor time dimension logic (#1028)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

* ISSUE-1026 Add support for @subselect (#1038)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

* ISSUE-1026 Add support for @subselect

* Address comments

* ISSUE-1027 Support join for having clause (#1039)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

* ISSUE-1027 Support join for having clause

* View Design

* Add tests and cleanup

* rename annotation

* function name fixed to enableISO8601Dates (#1052)

* fix bugs

* Support for multiple queries at root is added (#1044)

* Support for multiple queries at root is added

* Added test with alias

* comments resolved

* merge annotations

* don't group by view relationship

* Add time grain to GraphQL schema (#1042)

* Added basic plumbing to push attributes from the entity projection down to the QueryEngine

* Added logic to expand SQL time expression in SQLQueryEngine

* Added SQLQueryEngine tests

* Added IT tests

* The AggregationStore now adds graphql parameters for parameterized columns

* Minor refactor

* Inspection rework

* Minor fix

* Support multiple query of same entity with different alias (#1055)

* Support multiple query of same entity with different alias

* add static method to generate keyname for GraphQLProjectionInfo projections

* Remove aliasPartialQuerySameAttribute

* MetadataStore Models (#1068)

* Manager transacton manually

* Add readonly

* some rework

* use getTimeDimension()

* change exception

* Metadatastore models

* Address comments

* address comments

* move root

* fix style check

* SQLQueryTemplate Model (#1073)

* SQLQueryTemplate

* SQLTables

* refactor

* update sql dimension projection

* update sql dimension projection

* clean up dimension projection

* refactor sql components

* aggregatable field rework

* add comments

* rearrange packages

* Add dimension projection back

* fix checkstyle

* Add dictionary

* Simplify MetricFunction and SQLQueryTemplate

* Address comments

* Integrate Metadata Model and SQLQueryTemplate Model (#1083)

* Integrate Metadata Model and SQLQueryTemplate Model

* remove AggregationDictionary and AggregationManager

* Add timezone

* Can only query analyticView

* integrate view with aggregation and metadata

* remove includeField

* remove @view

* Use NonEntityDictionary

* remove id

* revert access changes

* fix JPA entity check

* remove @entity from analyticViews

* use table name as relationship type id

* revert NonEntitydictinoary

* tiny rework

* Integration tests

* Add jsonapi ittest

* aggregation data store doesn't manage jpa entities

* address comments

fix integration dependencies (#1093)

[maven-release-plugin] prepare release 5.0.0-pr3

[maven-release-plugin] prepare for next development iteration

Fixed elide standalone pom from rebase

Fixed minor bug in rebase

Fixed rebase

Improving class scanning performance for MetadataStore (#1117)

Enable elide5 travis builds (#1129)

* Move repeated @SQL annotations to class level (#1119)

* Turning on travis builds with code coverage for Elide 5.x

* Fixing security issue in spring-boot-web

Co-authored-by: Brutus5000 <Brutus5000@gmx.net>

Fix sorting and ambiguous join issue (#1127)

* Added sorting on aggregated metric based on latest elide-5.x

* Fix ambiguity problem

* update comments

* fix codacy

* refactor generateColumnReference

* update comment

* address comments

* test cleanup

* update unittest

* fix elide core alias

* QueryValidatorTest

* EntityProjectionTranslatorTest

* go joinFragment approach

* delete jointrienode

Support no metric query (#1137)

[maven-release-plugin] prepare release 5.0.0-pr4

[maven-release-plugin] prepare for next development iteration

Check dependency injection (#1138)

* Move repeated @SQL annotations to class level (#1119)

* Fixing OWASP security warning for Tomcat dependency in Spring Web (#1132)

* Adding support for dependency injection of Checks.  Added test injection classes

* Unit tests pass

* Tests pass

* Removed Initializer Concept

Co-authored-by: Brutus5000 <Brutus5000@gmx.net>

Fix travis log length (#1140)

* Move repeated @SQL annotations to class level (#1119)

* Fixing OWASP security warning for Tomcat dependency in Spring Web (#1132)

* Removed unnecessary request/response logging (to shorten travis logs)

* Address inspection comments

* Address inspection comments

* Address inspection comments

* Removed logging of graphQL model building to shorten length

* Fixed compilation error

Co-authored-by: Brutus5000 <Brutus5000@gmx.net>

[maven-release-plugin] prepare release 5.0.0-pr5

[maven-release-plugin] prepare for next development iteration
  • Loading branch information
QubitPi authored and Aaron Klish committed Jan 17, 2020
1 parent 4d70107 commit ef111d6
Show file tree
Hide file tree
Showing 273 changed files with 14,583 additions and 2,150 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
branches:
only:
- master
- elide-5.x
- "/^[0-9]+\\.[0-9]+(\\.[0-9]+|-(alpha|beta)-[0-9]+)/"

before_install:
Expand Down
2 changes: 1 addition & 1 deletion checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
<suppressions>
<!-- Suppress generated sources -->
<suppress files="[/\\]src[/\\]test[/\\]" checks="(JavadocType|LineLength|MethodLength)"/>
<suppress files="[/\\]src[/\\]test[/\\]" checks="(JavadocType|LineLength|MethodLength|MethodCount)"/>
<suppress files="[/\\]src[/\\]main[/\\]webapp[/\\]WEB-INF[/\\]api-docs[/\\]" checks=".*"/>
<suppress files="[/\\]target[/\\]" checks=".*"/>
<suppress files="\.csv" checks=".*"/>
Expand Down
3 changes: 1 addition & 2 deletions elide-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.yahoo.elide</groupId>
<artifactId>elide-parent-pom</artifactId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
</parent>

<licenses>
Expand Down Expand Up @@ -53,5 +53,4 @@
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -20,6 +19,5 @@
*/
@Target({METHOD, FIELD, TYPE, PACKAGE})
@Retention(RUNTIME)
@Inherited
public @interface Exclude {
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -18,7 +17,6 @@
*/
@Target({TYPE, PACKAGE})
@Retention(RUNTIME)
@Inherited
public @interface Include {

/**
Expand Down
6 changes: 3 additions & 3 deletions elide-contrib/elide-swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>elide-contrib-parent-pom</artifactId>
<groupId>com.yahoo.elide</groupId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
</parent>

<licenses>
Expand Down Expand Up @@ -42,7 +42,7 @@
<dependency>
<groupId>com.yahoo.elide</groupId>
<artifactId>elide-core</artifactId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -54,7 +54,7 @@
<dependency>
<groupId>com.yahoo.elide</groupId>
<artifactId>elide-integration-tests</artifactId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion elide-contrib/elide-test-helpers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>elide-contrib-parent-pom</artifactId>
<groupId>com.yahoo.elide</groupId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
</parent>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ public static Selection field(String name, Arguments arguments, SelectionSet...
return new Field(null, name, arguments, relayWrap(Arrays.asList(selectionSet)));
}

public static Selection field(String alias, String name, Arguments arguments, SelectionSet... selectionSet) {
return new Field(alias, name, arguments, relayWrap(Arrays.asList(selectionSet)));
}

/**
* Creates an attribute(scalar field) selection.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public String toGraphQLSpec() {

@Override
public String toResponse() {
if (selectionSet instanceof String) {
if (selectionSet instanceof String || selectionSet instanceof Number) {
// scalar response field
return String.format(
"\"%s\":%s",
Expand All @@ -92,7 +92,8 @@ public String toResponse() {
? "{\"edges\":[]}"
: getSelectionSet().toString()
);
} else {
}
else {
// object response field
return String.format("\"%s\":%s", getName(), ((SelectionSet) getSelectionSet()).toResponse());
}
Expand Down
4 changes: 2 additions & 2 deletions elide-contrib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>elide-parent-pom</artifactId>
<groupId>com.yahoo.elide</groupId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
</parent>

<licenses>
Expand Down Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>com.yahoo.elide</groupId>
<artifactId>elide-core</artifactId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
10 changes: 9 additions & 1 deletion elide-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>com.yahoo.elide</groupId>
<artifactId>elide-parent-pom</artifactId>
<version>4.5.11-SNAPSHOT</version>
<version>5.0.0-pr6-SNAPSHOT</version>
</parent>

<licenses>
Expand Down Expand Up @@ -182,6 +182,13 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.2.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand All @@ -200,6 +207,7 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${version.jetty}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
9 changes: 9 additions & 0 deletions elide-core/src/main/java/com/yahoo/elide/Elide.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.yahoo.elide.core.exceptions.UnableToAddSerdeException;
import com.yahoo.elide.extensions.JsonApiPatch;
import com.yahoo.elide.extensions.PatchRequestScope;
import com.yahoo.elide.jsonapi.EntityProjectionMaker;
import com.yahoo.elide.jsonapi.JsonApiMapper;
import com.yahoo.elide.jsonapi.models.JsonApiDocument;
import com.yahoo.elide.parsers.BaseVisitor;
Expand Down Expand Up @@ -156,6 +157,8 @@ public ElideResponse get(String path, MultivaluedMap<String, String> queryParams
return handleRequest(true, opaqueUser, dataStore::beginReadTransaction, (tx, user) -> {
JsonApiDocument jsonApiDoc = new JsonApiDocument();
RequestScope requestScope = new RequestScope(path, jsonApiDoc, tx, user, queryParams, elideSettings);
requestScope.setEntityProjection(new EntityProjectionMaker(elideSettings.getDictionary(),
requestScope).parsePath(path));
BaseVisitor visitor = new GetVisitor(requestScope);
return visit(path, requestScope, visitor);
});
Expand All @@ -174,6 +177,8 @@ public ElideResponse post(String path, String jsonApiDocument, Object opaqueUser
return handleRequest(false, opaqueUser, dataStore::beginTransaction, (tx, user) -> {
JsonApiDocument jsonApiDoc = mapper.readJsonApiDocument(jsonApiDocument);
RequestScope requestScope = new RequestScope(path, jsonApiDoc, tx, user, null, elideSettings);
requestScope.setEntityProjection(new EntityProjectionMaker(elideSettings.getDictionary(),
requestScope).parsePath(path));
BaseVisitor visitor = new PostVisitor(requestScope);
return visit(path, requestScope, visitor);
});
Expand Down Expand Up @@ -208,6 +213,8 @@ public ElideResponse patch(String contentType, String accept,
handler = (tx, user) -> {
JsonApiDocument jsonApiDoc = mapper.readJsonApiDocument(jsonApiDocument);
RequestScope requestScope = new RequestScope(path, jsonApiDoc, tx, user, null, elideSettings);
requestScope.setEntityProjection(new EntityProjectionMaker(elideSettings.getDictionary(),
requestScope).parsePath(path));
BaseVisitor visitor = new PatchVisitor(requestScope);
return visit(path, requestScope, visitor);
};
Expand All @@ -230,6 +237,8 @@ public ElideResponse delete(String path, String jsonApiDocument, Object opaqueUs
? new JsonApiDocument()
: mapper.readJsonApiDocument(jsonApiDocument);
RequestScope requestScope = new RequestScope(path, jsonApiDoc, tx, user, null, elideSettings);
requestScope.setEntityProjection(new EntityProjectionMaker(elideSettings.getDictionary(),
requestScope).parsePath(path));
BaseVisitor visitor = new DeleteVisitor(requestScope);
return visit(path, requestScope, visitor);
});
Expand Down
23 changes: 23 additions & 0 deletions elide-core/src/main/java/com/yahoo/elide/core/ArgumentType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2015, Yahoo Inc.
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root for terms.
*/
package com.yahoo.elide.core;

import lombok.Getter;

/**
* Argument Type wraps an argument to the type of value it accepts.
*/
public class ArgumentType {
@Getter
private String name;
@Getter
private Class<?> type;

public ArgumentType(String name, Class<?> type) {
this.name = name;
this.type = type;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package com.yahoo.elide.core;

import com.yahoo.elide.Injector;
import com.yahoo.elide.security.checks.Check;

/**
Expand All @@ -23,7 +24,7 @@ public interface CheckInstantiator {
*/
default Check getCheck(EntityDictionary dictionary, String checkName) {
Class<? extends Check> checkCls = dictionary.getCheck(checkName);
return instantiateCheck(checkCls);
return instantiateCheck(checkCls, dictionary.getInjector());
}

/**
Expand All @@ -32,9 +33,11 @@ default Check getCheck(EntityDictionary dictionary, String checkName) {
* @return the instance of the check
* @throws IllegalArgumentException if the check class cannot be instantiated with a zero argument constructor
*/
default Check instantiateCheck(Class<? extends Check> checkCls) {
default Check instantiateCheck(Class<? extends Check> checkCls, Injector injector) {
try {
return checkCls.newInstance();
Check check = checkCls.newInstance();
injector.inject(check);
return check;
} catch (InstantiationException | IllegalAccessException | NullPointerException e) {
String checkName = (checkCls != null) ? checkCls.getName() : "null";
throw new IllegalArgumentException("Could not instantiate specified check '" + checkName + "'.", e);
Expand Down
Loading

0 comments on commit ef111d6

Please sign in to comment.