Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repo-sqale: added basic m_org mapping + owner_type for refs
- Loading branch information
Showing
12 changed files
with
260 additions
and
80 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
19 changes: 19 additions & 0 deletions
19
repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmodel/org/MOrg.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,19 @@ | ||
/* | ||
* Copyright (C) 2010-2021 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.repo.sqale.qmodel.org; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qmodel.role.MAbstractRole; | ||
import com.evolveum.midpoint.repo.sqale.qmodel.role.QRole; | ||
|
||
/** | ||
* Querydsl "row bean" type related to {@link QRole}. | ||
*/ | ||
public class MOrg extends MAbstractRole { | ||
|
||
public Integer displayOrder; | ||
public Boolean tenant; | ||
} |
42 changes: 42 additions & 0 deletions
42
repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmodel/org/QOrg.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,42 @@ | ||
/* | ||
* Copyright (C) 2010-2021 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.repo.sqale.qmodel.org; | ||
|
||
import java.sql.Types; | ||
|
||
import com.querydsl.core.types.dsl.BooleanPath; | ||
import com.querydsl.core.types.dsl.NumberPath; | ||
import com.querydsl.sql.ColumnMetadata; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qmodel.role.QAbstractRole; | ||
|
||
/** | ||
* Querydsl query type for {@value #TABLE_NAME} table. | ||
*/ | ||
@SuppressWarnings("unused") | ||
public class QOrg extends QAbstractRole<MOrg> { | ||
|
||
private static final long serialVersionUID = -7711059436053747571L; | ||
|
||
public static final String TABLE_NAME = "m_org"; | ||
|
||
public static final ColumnMetadata DISPLAY_ORDER = | ||
ColumnMetadata.named("displayOrder").ofType(Types.INTEGER); | ||
public static final ColumnMetadata TENANT = | ||
ColumnMetadata.named("tenant").ofType(Types.BOOLEAN); | ||
|
||
public final NumberPath<Integer> displayOrder = createInteger("displayOrder", DISPLAY_ORDER); | ||
public final BooleanPath tenant = createBoolean("tenant", TENANT); | ||
|
||
public QOrg(String variable) { | ||
this(variable, DEFAULT_SCHEMA_NAME, TABLE_NAME); | ||
} | ||
|
||
public QOrg(String variable, String schema, String table) { | ||
super(MOrg.class, variable, schema, table); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmodel/org/QOrgClosure.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,45 @@ | ||
/* | ||
* Copyright (C) 2010-2021 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.repo.sqale.qmodel.org; | ||
|
||
import com.querydsl.sql.ColumnMetadata; | ||
|
||
import com.evolveum.midpoint.repo.sqlbase.querydsl.FlexibleRelationalPathBase; | ||
import com.evolveum.midpoint.repo.sqlbase.querydsl.UuidPath; | ||
|
||
/** | ||
* Querydsl query type for common table expression (CTE) representing org hierarchy on the fly. | ||
* Does not use any backing bean, it is never retrieved directly, only used in the query. | ||
* This does not have to be under {@link FlexibleRelationalPathBase}, but is for convenience. | ||
*/ | ||
@SuppressWarnings("unused") | ||
public class QOrgClosure extends FlexibleRelationalPathBase<QOrgClosure> { | ||
|
||
private static final long serialVersionUID = 4406075586720866032L; | ||
|
||
public static final String DEFAULT_ALIAS_NAME = "orgc"; | ||
|
||
public static final ColumnMetadata PARENT = | ||
ColumnMetadata.named("parent").ofType(UuidPath.UUID_TYPE); | ||
public static final ColumnMetadata CHILD = | ||
ColumnMetadata.named("child").ofType(UuidPath.UUID_TYPE); | ||
|
||
public final UuidPath parent = createUuid("parent", PARENT); | ||
public final UuidPath child = createUuid("child", CHILD); | ||
|
||
public QOrgClosure() { | ||
this(DEFAULT_ALIAS_NAME, DEFAULT_SCHEMA_NAME); | ||
} | ||
|
||
public QOrgClosure(String variable) { | ||
this(variable, DEFAULT_SCHEMA_NAME); | ||
} | ||
|
||
public QOrgClosure(String variable, String schema) { | ||
super(QOrgClosure.class, variable, schema, "orgc"); // not a real table | ||
} | ||
} |
Oops, something went wrong.