Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repo-sqale: mapped m_archetype and m_dashboard
- Loading branch information
Showing
10 changed files
with
232 additions
and
19 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
15 changes: 15 additions & 0 deletions
15
repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qbean/MArchetype.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,15 @@ | ||
/* | ||
* 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.qbean; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qmodel.QArchetype; | ||
|
||
/** | ||
* Querydsl "row bean" type related to {@link QArchetype}. | ||
*/ | ||
public class MArchetype extends MObject { | ||
} |
15 changes: 15 additions & 0 deletions
15
repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qbean/MDashboard.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,15 @@ | ||
/* | ||
* 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.qbean; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qmodel.QArchetype; | ||
|
||
/** | ||
* Querydsl "row bean" type related to {@link QArchetype}. | ||
*/ | ||
public class MDashboard extends MObject { | ||
} |
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
46 changes: 46 additions & 0 deletions
46
...repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmapping/QArchetypeMapping.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,46 @@ | ||
/* | ||
* 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.qmapping; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qbean.MArchetype; | ||
import com.evolveum.midpoint.repo.sqale.qmodel.QArchetype; | ||
import com.evolveum.midpoint.repo.sqlbase.SqlRepoContext; | ||
import com.evolveum.midpoint.repo.sqlbase.SqlTransformerContext; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ArchetypeType; | ||
|
||
/** | ||
* Mapping between {@link QArchetype} and {@link ArchetypeType}. | ||
*/ | ||
public class QArchetypeMapping | ||
extends QObjectMapping<ArchetypeType, QArchetype, MArchetype> { | ||
|
||
public static final String DEFAULT_ALIAS_NAME = "a"; | ||
|
||
public static final QArchetypeMapping INSTANCE = new QArchetypeMapping(); | ||
|
||
private QArchetypeMapping() { | ||
super(QArchetype.TABLE_NAME, DEFAULT_ALIAS_NAME, | ||
ArchetypeType.class, QArchetype.class); | ||
} | ||
|
||
@Override | ||
protected QArchetype newAliasInstance(String alias) { | ||
return new QArchetype(alias); | ||
} | ||
|
||
@Override | ||
public ObjectSqlTransformer<ArchetypeType, QArchetype, MArchetype> | ||
createTransformer(SqlTransformerContext transformerContext, SqlRepoContext sqlRepoContext) { | ||
// no special class needed, no additional columns | ||
return new ObjectSqlTransformer<>(transformerContext, this); | ||
} | ||
|
||
@Override | ||
public MArchetype newRowObject() { | ||
return new MArchetype(); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmapping/QDashboardMapping.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,46 @@ | ||
/* | ||
* 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.qmapping; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qbean.MDashboard; | ||
import com.evolveum.midpoint.repo.sqale.qmodel.QDashboard; | ||
import com.evolveum.midpoint.repo.sqlbase.SqlRepoContext; | ||
import com.evolveum.midpoint.repo.sqlbase.SqlTransformerContext; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardType; | ||
|
||
/** | ||
* Mapping between {@link QDashboard} and {@link DashboardType}. | ||
*/ | ||
public class QDashboardMapping | ||
extends QObjectMapping<DashboardType, QDashboard, MDashboard> { | ||
|
||
public static final String DEFAULT_ALIAS_NAME = "d"; | ||
|
||
public static final QDashboardMapping INSTANCE = new QDashboardMapping(); | ||
|
||
private QDashboardMapping() { | ||
super(QDashboard.TABLE_NAME, DEFAULT_ALIAS_NAME, | ||
DashboardType.class, QDashboard.class); | ||
} | ||
|
||
@Override | ||
protected QDashboard newAliasInstance(String alias) { | ||
return new QDashboard(alias); | ||
} | ||
|
||
@Override | ||
public ObjectSqlTransformer<DashboardType, QDashboard, MDashboard> | ||
createTransformer(SqlTransformerContext transformerContext, SqlRepoContext sqlRepoContext) { | ||
// no special class needed, no additional columns | ||
return new ObjectSqlTransformer<>(transformerContext, this); | ||
} | ||
|
||
@Override | ||
public MDashboard newRowObject() { | ||
return new MDashboard(); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmodel/QArchetype.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,34 @@ | ||
/* | ||
* 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; | ||
|
||
import com.querydsl.sql.PrimaryKey; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qbean.MArchetype; | ||
|
||
/** | ||
* Querydsl query type for {@value #TABLE_NAME} table. | ||
*/ | ||
@SuppressWarnings("unused") | ||
public class QArchetype extends QObject<MArchetype> { | ||
|
||
private static final long serialVersionUID = -8367034620810300322L; | ||
|
||
public static final String TABLE_NAME = "m_archetype"; | ||
|
||
// no additional columns and relations | ||
|
||
public final PrimaryKey<MArchetype> pk = createPrimaryKey(oid); | ||
|
||
public QArchetype(String variable) { | ||
this(variable, DEFAULT_SCHEMA_NAME, TABLE_NAME); | ||
} | ||
|
||
public QArchetype(String variable, String schema, String table) { | ||
super(MArchetype.class, variable, schema, table); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmodel/QDashboard.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,34 @@ | ||
/* | ||
* 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; | ||
|
||
import com.querydsl.sql.PrimaryKey; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qbean.MDashboard; | ||
|
||
/** | ||
* Querydsl query type for {@value #TABLE_NAME} table. | ||
*/ | ||
@SuppressWarnings("unused") | ||
public class QDashboard extends QObject<MDashboard> { | ||
|
||
private static final long serialVersionUID = -3546780348548754579L; | ||
|
||
public static final String TABLE_NAME = "m_dashboard"; | ||
|
||
// no additional columns and relations | ||
|
||
public final PrimaryKey<MDashboard> pk = createPrimaryKey(oid); | ||
|
||
public QDashboard(String variable) { | ||
this(variable, DEFAULT_SCHEMA_NAME, TABLE_NAME); | ||
} | ||
|
||
public QDashboard(String variable, String schema, String table) { | ||
super(MDashboard.class, variable, schema, table); | ||
} | ||
} |
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