this.channelRegistryStore = ChannelRegistryStoreFactory.getChannelRegistryStoreImpl();
this.counterStore = CounterStoreFactory.getCounterStoreImpl();
this.personManager = PersonManagerLocator.getPersonManager();
if (this.databaseMetadata.supportsOuterJoins()) {
final IJoinQueryString joinQuery = this.databaseMetadata.getJoinQuery();
if (joinQuery instanceof DatabaseMetaDataImpl.JdbcDb) {
joinQuery.addQuery("layout",
"{oj UP_LAYOUT_STRUCT ULS LEFT OUTER JOIN UP_LAYOUT_PARAM USP ON ULS.USER_ID = USP.USER_ID AND ULS.STRUCT_ID = USP.STRUCT_ID} WHERE");
joinQuery.addQuery("ss_struct",
"{oj UP_SS_STRUCT USS LEFT OUTER JOIN UP_SS_STRUCT_PAR USP ON USS.SS_ID=USP.SS_ID} WHERE");
joinQuery.addQuery("ss_theme",
"{oj UP_SS_THEME UTS LEFT OUTER JOIN UP_SS_THEME_PARM UTP ON UTS.SS_ID=UTP.SS_ID} WHERE");
}
else if (joinQuery instanceof DatabaseMetaDataImpl.PostgreSQLDb) {
joinQuery.addQuery("layout",
"UP_LAYOUT_STRUCT ULS LEFT OUTER JOIN UP_LAYOUT_PARAM USP ON ULS.USER_ID = USP.USER_ID AND ULS.STRUCT_ID = USP.STRUCT_ID WHERE");
joinQuery.addQuery("ss_struct",
"UP_SS_STRUCT USS LEFT OUTER JOIN UP_SS_STRUCT_PAR USP ON USS.SS_ID=USP.SS_ID WHERE");
joinQuery.addQuery("ss_theme",
"UP_SS_THEME UTS LEFT OUTER JOIN UP_SS_THEME_PARM UTP ON UTS.SS_ID=UTP.SS_ID WHERE");
}
else if (joinQuery instanceof DatabaseMetaDataImpl.OracleDb) {
joinQuery.addQuery("layout",
"UP_LAYOUT_STRUCT ULS, UP_LAYOUT_PARAM USP WHERE ULS.STRUCT_ID = USP.STRUCT_ID(+) AND ULS.USER_ID = USP.USER_ID(+) AND");
joinQuery.addQuery("ss_struct",
"UP_SS_STRUCT USS, UP_SS_STRUCT_PAR USP WHERE USS.SS_ID=USP.SS_ID(+) AND");
joinQuery.addQuery("ss_theme", "UP_SS_THEME UTS, UP_SS_THEME_PARM UTP WHERE UTS.SS_ID=UTP.SS_ID(+) AND");
}
else {
throw new Exception("Unknown database driver");
}
}