diff options
author | shentao999 <shentao@chinamobile.com> | 2019-04-02 10:18:24 +0800 |
---|---|---|
committer | shentao999 <shentao@chinamobile.com> | 2019-04-02 10:18:25 +0800 |
commit | 7c291e0d10e63f403f016ede7d8e4ee47dcbf8a9 (patch) | |
tree | 824a1d19890dd6cd9fa2aac6fe5d7ea7d9e73090 /ecomp-portal-BE-common/src/main/webapp/WEB-INF | |
parent | 498b428a661aabf16f288bc8c3dffded35becef6 (diff) |
Add multi-language APIs into BE-common
Change-Id: Ia9fddbe81bb2eb8d3e0786fcc81f0469ed45bfa0
Issue-ID: PORTAL-376
Signed-off-by: shentao999 <shentao@chinamobile.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/webapp/WEB-INF')
-rw-r--r-- | ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml index 50264215..4e8943ce 100644 --- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml +++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml @@ -43,6 +43,29 @@ <!-- Publishes mappings and queries specific to the ONAP Portal application. --> <hibernate-mapping package="org.onap.portalapp.portal.domain"> + <!-- multilanguage --> + <class name="Language" table="fn_language"> + <id name="languageId" column="language_id"> + <generator class="native"> + <param name="sequence"></param> + </generator> + </id> + <property name="languageName" column="language_name" /> + <property name="languageAlias" column="language_alias" /> + </class> + + <class name="DisplayText" table="fn_display_text"> + <id name="id" column="id"> + <generator class="native"> + <param name="sequence"></param> + </generator> + </id> + + <property name="languageId" column="language_id" /> + <property name="textId" column="text_id" /> + <property name="label" column="text_label" /> + </class> + <!-- Widget class mapping details --> <class name="Widget" table="FN_WIDGET"> <id name="id" column="WIDGET_ID"> @@ -206,6 +229,7 @@ <property name="createdId" column="created_id" /> <property name="modifiedId" column="modified_id" /> <property name="timeZoneId" column="timezone" /> + <property name="languageId" column="language_id" /> <set name="EPUserApps" table="FN_USER_ROLE" lazy="false" sort="natural" inverse="true"> @@ -528,6 +552,25 @@ </many-to-one> </class> + <!-- multilanguage --> + <query name="queryLanguage"> + <![CDATA[ + from Language + ]]> + </query> + + <query name="displayText"> + <![CDATA[ + from DisplayText where languageId = :language_id + ]]> + </query> + + <query name="queryLanguageByLanguageId"> + <![CDATA[ + from Language where languageId = :language_id + ]]> + </query> + <!-- show the current user plus related users --> <sql-query name="relatedUsers"> <return-scalar column="org_user_id" type="java.lang.String" /> |