-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
7165d60
commit 8c0cbc1
Showing
16 changed files
with
498 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...-aggregation/src/test/java/com/yahoo/elide/datastores/aggregation/example/SubCountry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright 2019, Yahoo Inc. | ||
* Licensed under the Apache License, Version 2.0 | ||
* See LICENSE file in project root for terms. | ||
*/ | ||
package com.yahoo.elide.datastores.aggregation.example; | ||
|
||
import com.yahoo.elide.annotation.Include; | ||
import com.yahoo.elide.datastores.aggregation.annotation.Cardinality; | ||
import com.yahoo.elide.datastores.aggregation.annotation.CardinalitySize; | ||
import com.yahoo.elide.datastores.aggregation.annotation.FriendlyName; | ||
|
||
import org.hibernate.annotations.Subselect; | ||
|
||
import lombok.Data; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
|
||
/** | ||
* A root level entity for testing AggregationDataStore with @Subselect annotation | ||
*/ | ||
@Data | ||
@Entity | ||
@Include(rootLevel = true) | ||
@Subselect(value = "select * from countries") | ||
@Cardinality(size = CardinalitySize.SMALL) | ||
public class SubCountry { | ||
|
||
private String id; | ||
|
||
private String isoCode; | ||
|
||
private String name; | ||
|
||
@Id | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(final String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getIsoCode() { | ||
return isoCode; | ||
} | ||
|
||
public void setIsoCode(final String isoCode) { | ||
this.isoCode = isoCode; | ||
} | ||
|
||
@FriendlyName | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(final String name) { | ||
this.name = name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.