dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25441
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12628: PatientStore, removed unnecessary use of statement builder
------------------------------------------------------------
revno: 12628
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-14 12:30:06 +0200
message:
PatientStore, removed unnecessary use of statement builder
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2013-10-14 10:24:31 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2013-10-14 10:30:06 +0000
@@ -800,7 +800,7 @@
List<Patient> patients = new ArrayList<Patient>();
fullName = fullName.toLowerCase();
- String sql = "SELECT patientid FROM patient where lower( " + statementBuilder.getPatientFullName() + ") ='" + fullName + "'";
+ String sql = "SELECT patientid FROM patient where lower(name) = '" + fullName + "'";
if ( orgunitId != null && orgunitId != 0 )
{
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2013-10-11 08:27:42 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2013-10-14 10:30:06 +0000
@@ -171,8 +171,6 @@
String getAddDate( String dateField, int days );
- String getPatientFullName();
-
String queryDataElementStructureForOrgUnit();
String queryRawDataElementsForOrgUnitBetweenPeriods( Integer orgUnitId, List<Integer> betweenPeriodIds );
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2013-10-11 08:07:20 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2013-10-14 10:30:06 +0000
@@ -162,12 +162,6 @@
}
@Override
- public String getPatientFullName()
- {
- return "name";
- }
-
- @Override
public String queryDataElementStructureForOrgUnit()
{
StringBuffer sqlsb = new StringBuffer();
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java 2013-10-11 08:07:20 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java 2013-10-14 10:30:06 +0000
@@ -162,12 +162,6 @@
}
@Override
- public String getPatientFullName()
- {
- return "name";
- }
-
- @Override
public String queryDataElementStructureForOrgUnit()
{
StringBuffer sqlsb = new StringBuffer();
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2013-10-11 08:07:20 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2013-10-14 10:30:06 +0000
@@ -165,12 +165,6 @@
}
@Override
- public String getPatientFullName()
- {
- return "name";
- }
-
- @Override
public String queryDataElementStructureForOrgUnit()
{
StringBuffer sqlsb = new StringBuffer();
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2013-10-11 08:07:20 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2013-10-14 10:30:06 +0000
@@ -165,12 +165,6 @@
}
@Override
- public String getPatientFullName()
- {
- return "name";
- }
-
- @Override
public String queryDataElementStructureForOrgUnit()
{
StringBuffer sqlsb = new StringBuffer();