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 ConnectorHostSqlTransformer, finished mapping
- Loading branch information
Showing
4 changed files
with
40 additions
and
12 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...n/java/com/evolveum/midpoint/repo/sqale/qmodel/connector/ConnectorHostSqlTransformer.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.connector; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.evolveum.midpoint.repo.sqale.qmodel.object.ObjectSqlTransformer; | ||
import com.evolveum.midpoint.repo.sqlbase.JdbcSession; | ||
import com.evolveum.midpoint.repo.sqlbase.SqlTransformerSupport; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorHostType; | ||
|
||
public class ConnectorHostSqlTransformer | ||
extends ObjectSqlTransformer<ConnectorHostType, QConnectorHost, MConnectorHost> { | ||
|
||
public ConnectorHostSqlTransformer( | ||
SqlTransformerSupport transformerSupport, QConnectorHostMapping mapping) { | ||
super(transformerSupport, mapping); | ||
} | ||
|
||
@Override | ||
public @NotNull MConnectorHost toRowObjectWithoutFullObject( | ||
ConnectorHostType schemaObject, JdbcSession jdbcSession) { | ||
MConnectorHost row = super.toRowObjectWithoutFullObject(schemaObject, jdbcSession); | ||
|
||
row.hostname = schemaObject.getHostname(); | ||
row.port = schemaObject.getPort(); | ||
|
||
return row; | ||
} | ||
} |
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