wip data tables
This commit is contained in:
@@ -115,10 +115,8 @@ CREATE TABLE `r_enum_value` (
|
|||||||
/* used to link MySql tables to Mifos X application tables for additional data needs */
|
/* used to link MySql tables to Mifos X application tables for additional data needs */
|
||||||
CREATE TABLE `x_registered_table` (
|
CREATE TABLE `x_registered_table` (
|
||||||
`registered_table_name` varchar(50) NOT NULL,
|
`registered_table_name` varchar(50) NOT NULL,
|
||||||
`registered_table_label` varchar(80) NOT NULL,
|
|
||||||
`application_table_name` varchar(50) NOT NULL,
|
`application_table_name` varchar(50) NOT NULL,
|
||||||
PRIMARY KEY (`registered_table_name`),
|
PRIMARY KEY (`registered_table_name`)
|
||||||
UNIQUE KEY `registered_table_label` (`registered_table_label`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- DDL for organisation wide related concepts
|
-- DDL for organisation wide related concepts
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
DROP TABLE IF EXISTS `x_registered_table`;
|
||||||
|
/* used to link MySql tables to Mifos X application tables for additional data needs */
|
||||||
|
CREATE TABLE `x_registered_table` (
|
||||||
|
`registered_table_name` varchar(50) NOT NULL,
|
||||||
|
`application_table_name` varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`registered_table_name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
@@ -4,13 +4,11 @@ public class DatatableData {
|
|||||||
|
|
||||||
private final String applicationTableName;
|
private final String applicationTableName;
|
||||||
private final String registeredTableName;
|
private final String registeredTableName;
|
||||||
private final String registeredTableLabel;
|
|
||||||
|
|
||||||
public DatatableData(final String applicationTableName,
|
public DatatableData(final String applicationTableName,
|
||||||
final String registeredTableName, final String registeredTableLabel) {
|
final String registeredTableName) {
|
||||||
this.applicationTableName = applicationTableName;
|
this.applicationTableName = applicationTableName;
|
||||||
this.registeredTableName = registeredTableName;
|
this.registeredTableName = registeredTableName;
|
||||||
this.registeredTableLabel = registeredTableLabel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getApplicationTableName() {
|
public String getApplicationTableName() {
|
||||||
@@ -21,8 +19,4 @@ public class DatatableData {
|
|||||||
return registeredTableName;
|
return registeredTableName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRegisteredTableLabel() {
|
|
||||||
return registeredTableLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
-3
@@ -177,7 +177,7 @@ public class ReadWriteNonCoreDataServiceImpl implements
|
|||||||
andClause = " and application_table_name = '" + appTable + "'";
|
andClause = " and application_table_name = '" + appTable + "'";
|
||||||
}
|
}
|
||||||
// PERMITTED datatables
|
// PERMITTED datatables
|
||||||
String sql = "select application_table_name, registered_table_name, registered_table_label"
|
String sql = "select application_table_name, registered_table_name"
|
||||||
+ " from x_registered_table "
|
+ " from x_registered_table "
|
||||||
+ " where exists"
|
+ " where exists"
|
||||||
+ " (select 'f'"
|
+ " (select 'f'"
|
||||||
@@ -202,8 +202,7 @@ public class ReadWriteNonCoreDataServiceImpl implements
|
|||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
datatables.add(new DatatableData(rs
|
datatables.add(new DatatableData(rs
|
||||||
.getString("application_table_name"), rs
|
.getString("application_table_name"), rs
|
||||||
.getString("registered_table_name"), rs
|
.getString("registered_table_name")));
|
||||||
.getString("registered_table_label")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user