← Back to team overview

dhis-mobile-devs team mailing list archive

[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 178: remove THIS keyword, unused setters/getters

 

------------------------------------------------------------
revno: 178
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: lwuit-tracking
timestamp: Thu 2013-10-31 15:42:12 +0700
message:
  remove THIS keyword, unused setters/getters
modified:
  src/org/hisp/dhis/mobile/model/OrgUnit.java
  src/org/hisp/dhis/mobile/view/PersonRegistrationView.java


--
lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking
https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking

Your team DHIS mobile developers is subscribed to branch lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking/+edit-subscription
=== modified file 'src/org/hisp/dhis/mobile/model/OrgUnit.java'
--- src/org/hisp/dhis/mobile/model/OrgUnit.java	2013-10-30 09:20:56 +0000
+++ src/org/hisp/dhis/mobile/model/OrgUnit.java	2013-10-31 08:42:12 +0000
@@ -212,59 +212,59 @@
     public void serialize( DataOutputStream dataOutputStream )
         throws IOException
     {
-        dataOutputStream.writeInt( this.id );
-        dataOutputStream.writeUTF( this.name );
-        dataOutputStream.writeUTF( this.downloadAllUrl );
-        dataOutputStream.writeUTF( this.updateActivityPlanUrl );
-        dataOutputStream.writeUTF( this.uploadFacilityReportUrl );
-        dataOutputStream.writeUTF( this.uploadActivityReportUrl );
-        dataOutputStream.writeUTF( this.updateDataSetsUrl );
-        dataOutputStream.writeUTF( this.changeDataSetLangUrl );
-        dataOutputStream.writeUTF( this.searchUrl );
-        dataOutputStream.writeUTF( this.updateNewVersionUrl );
-        dataOutputStream.writeUTF( this.updateContactUrl );
-        dataOutputStream.writeUTF( this.findPatientUrl );
-        dataOutputStream.writeUTF( this.registerPersonUrl );
-        dataOutputStream.writeUTF( this.uploadProgramStageUrl );
-        dataOutputStream.writeUTF( this.enrollProgramUrl );
-        dataOutputStream.writeUTF( this.getVariesInfoUrl );
-        dataOutputStream.writeUTF( this.addRelationshipUrl );
-        dataOutputStream.writeUTF( this.downloadAnonymousProgramUrl );
-        dataOutputStream.writeUTF( this.findProgramUrl );
-        dataOutputStream.writeUTF( this.findLatestPersonUrl );
-        dataOutputStream.writeUTF( this.findPatientInAdvancedUrl );
-        dataOutputStream.writeUTF( this.findLostToFollowUpUrl );
-        dataOutputStream.writeUTF( this.handleLostToFollowUpUrl );
-        dataOutputStream.writeUTF( this.generateRepeatableEventUrl );
+        dataOutputStream.writeInt( id );
+        dataOutputStream.writeUTF( name );
+        dataOutputStream.writeUTF( downloadAllUrl );
+        dataOutputStream.writeUTF( updateActivityPlanUrl );
+        dataOutputStream.writeUTF( uploadFacilityReportUrl );
+        dataOutputStream.writeUTF( uploadActivityReportUrl );
+        dataOutputStream.writeUTF( updateDataSetsUrl );
+        dataOutputStream.writeUTF( changeDataSetLangUrl );
+        dataOutputStream.writeUTF( searchUrl );
+        dataOutputStream.writeUTF( updateNewVersionUrl );
+        dataOutputStream.writeUTF( updateContactUrl );
+        dataOutputStream.writeUTF( findPatientUrl );
+        dataOutputStream.writeUTF( registerPersonUrl );
+        dataOutputStream.writeUTF( uploadProgramStageUrl );
+        dataOutputStream.writeUTF( enrollProgramUrl );
+        dataOutputStream.writeUTF( getVariesInfoUrl );
+        dataOutputStream.writeUTF( addRelationshipUrl );
+        dataOutputStream.writeUTF( downloadAnonymousProgramUrl );
+        dataOutputStream.writeUTF( findProgramUrl );
+        dataOutputStream.writeUTF( findLatestPersonUrl );
+        dataOutputStream.writeUTF( findPatientInAdvancedUrl );
+        dataOutputStream.writeUTF( findLostToFollowUpUrl );
+        dataOutputStream.writeUTF( handleLostToFollowUpUrl );
+        dataOutputStream.writeUTF( generateRepeatableEventUrl );
     }
 
     public void deSerialize( DataInputStream dataInputStream )
         throws IOException
     {
-        this.id = dataInputStream.readInt();
-        this.name = dataInputStream.readUTF();
-        this.downloadAllUrl = dataInputStream.readUTF();
-        this.updateActivityPlanUrl = dataInputStream.readUTF();
-        this.uploadFacilityReportUrl = dataInputStream.readUTF();
-        this.uploadActivityReportUrl = dataInputStream.readUTF();
-        this.updateDataSetsUrl = dataInputStream.readUTF();
-        this.changeDataSetLangUrl = dataInputStream.readUTF();
-        this.searchUrl = dataInputStream.readUTF();
-        this.updateNewVersionUrl = dataInputStream.readUTF();
-        this.updateContactUrl = dataInputStream.readUTF();
-        this.findPatientUrl = dataInputStream.readUTF();
-        this.registerPersonUrl = dataInputStream.readUTF();
-        this.uploadProgramStageUrl = dataInputStream.readUTF();
-        this.enrollProgramUrl = dataInputStream.readUTF();
-        this.getVariesInfoUrl = dataInputStream.readUTF();
-        this.addRelationshipUrl = dataInputStream.readUTF();
-        this.downloadAnonymousProgramUrl = dataInputStream.readUTF();
-        this.findProgramUrl = dataInputStream.readUTF();
-        this.findLatestPersonUrl = dataInputStream.readUTF();
-        this.findPatientInAdvancedUrl = dataInputStream.readUTF();
-        this.findLostToFollowUpUrl = dataInputStream.readUTF();
-        this.handleLostToFollowUpUrl = dataInputStream.readUTF();
-        this.generateRepeatableEventUrl = dataInputStream.readUTF();
+        id = dataInputStream.readInt();
+        name = dataInputStream.readUTF();
+        downloadAllUrl = dataInputStream.readUTF();
+        updateActivityPlanUrl = dataInputStream.readUTF();
+        uploadFacilityReportUrl = dataInputStream.readUTF();
+        uploadActivityReportUrl = dataInputStream.readUTF();
+        updateDataSetsUrl = dataInputStream.readUTF();
+        changeDataSetLangUrl = dataInputStream.readUTF();
+        searchUrl = dataInputStream.readUTF();
+        updateNewVersionUrl = dataInputStream.readUTF();
+        updateContactUrl = dataInputStream.readUTF();
+        findPatientUrl = dataInputStream.readUTF();
+        registerPersonUrl = dataInputStream.readUTF();
+        uploadProgramStageUrl = dataInputStream.readUTF();
+        enrollProgramUrl = dataInputStream.readUTF();
+        getVariesInfoUrl = dataInputStream.readUTF();
+        addRelationshipUrl = dataInputStream.readUTF();
+        downloadAnonymousProgramUrl = dataInputStream.readUTF();
+        findProgramUrl = dataInputStream.readUTF();
+        findLatestPersonUrl = dataInputStream.readUTF();
+        findPatientInAdvancedUrl = dataInputStream.readUTF();
+        findLostToFollowUpUrl = dataInputStream.readUTF();
+        handleLostToFollowUpUrl = dataInputStream.readUTF();
+        generateRepeatableEventUrl = dataInputStream.readUTF();
     }
 
     public boolean checkNewVersion( double serverVersion )

=== modified file 'src/org/hisp/dhis/mobile/view/PersonRegistrationView.java'
--- src/org/hisp/dhis/mobile/view/PersonRegistrationView.java	2013-10-23 08:18:01 +0000
+++ src/org/hisp/dhis/mobile/view/PersonRegistrationView.java	2013-10-31 08:42:12 +0000
@@ -1,12 +1,8 @@
 package org.hisp.dhis.mobile.view;
 
-import java.io.IOException;
 import java.util.Hashtable;
 import java.util.Vector;
 
-import javax.microedition.rms.RecordStoreException;
-import javax.microedition.rms.RecordStoreFullException;
-
 import org.hisp.dhis.mobile.connection.ConnectionManager;
 import org.hisp.dhis.mobile.midlet.DHISMIDlet;
 import org.hisp.dhis.mobile.midlet.NameBasedMIDlet;
@@ -14,7 +10,6 @@
 import org.hisp.dhis.mobile.model.Patient;
 import org.hisp.dhis.mobile.model.PatientAttribute;
 import org.hisp.dhis.mobile.model.PatientIdentifier;
-import org.hisp.dhis.mobile.model.PatientIdentifierAndAttribute;
 import org.hisp.dhis.mobile.recordstore.PatientAttributeRecordStore;
 import org.hisp.dhis.mobile.recordstore.PatientIdentifierRecordStore;
 import org.hisp.dhis.mobile.ui.Text;
@@ -37,6 +32,7 @@
     extends AbstractView
     implements ActionListener
 {
+    private Patient patient;
 
     private Form mainForm;
 
@@ -80,8 +76,6 @@
 
     private NameBasedMIDlet nameBasedMIDlet;
 
-    private ConnectionManager connectionManager;
-
     private static Character APPROXIMATED = new Character( 'A' );
 
     private static Character DECLARED = new Character( 'D' );
@@ -112,6 +106,10 @@
 
     private boolean isValid = true;
 
+    private Vector patientAttributeVector;
+
+    private Vector patientIdentifierVector;
+
     public PersonRegistrationView( DHISMIDlet dhisMIDlet )
     {
         super( dhisMIDlet );
@@ -124,16 +122,16 @@
 
         getMainForm();
         mainForm.removeAll();
-        this.setDobWrongFortmatLabel( null );
-        this.setRequiredLabel( null );
-        this.patientIdentifierVector = null;
-        this.offlinePatientIdentifierVector = null;
-        this.patientIdentifierValueVector = new Vector();
-        this.patientAttributeValueVector = new Vector();
-        this.requiredIdentifierTable = new Hashtable();
-        this.requireAttributeVector = new Vector();
-        this.requiredIdentifierVector = new Vector();
-        this.isValid = true;
+        dobWrongFortmatLabel = null;
+        requiredLabel = null;
+        patientIdentifierVector = null;
+        offlinePatientIdentifierVector = null;
+        patientIdentifierValueVector = new Vector();
+        patientAttributeValueVector = new Vector();
+        requiredIdentifierTable = new Hashtable();
+        requireAttributeVector = new Vector();
+        requiredIdentifierVector = new Vector();
+        isValid = true;
         System.gc();
 
         fullNameLabel = new Label( "Fullname(*)" );
@@ -284,14 +282,12 @@
         {
             e.printStackTrace();
         }
-
     }
 
     public void showView()
     {
         prepareView();
         getMainForm().show();
-
     }
 
     public Form getMainForm()
@@ -680,173 +676,11 @@
         return dobWrongFortmatLabel;
     }
 
-    public Vector getRequiredIdentifierVector()
-    {
-        return requiredIdentifierVector;
-    }
-
-    public void setRequiredIdentifierVector( Vector requiredIdentifierVector )
-    {
-        this.requiredIdentifierVector = requiredIdentifierVector;
-    }
-
-    public Vector getRequireAttributeVector()
-    {
-        return requireAttributeVector;
-    }
-
-    public void setRequireAttributeVector( Vector requireAttributeVector )
-    {
-        this.requireAttributeVector = requireAttributeVector;
-    }
-
-    public Vector getPatientIdentifierValueVector()
-    {
-        return patientIdentifierValueVector;
-    }
-
-    public void setPatientIdentifierValueVector( Vector patientIdentifierValueVector )
-    {
-        this.patientIdentifierValueVector = patientIdentifierValueVector;
-    }
-
-    public Vector getPatientAttributeValueVector()
-    {
-        return patientAttributeValueVector;
-    }
-
-    public void setPatientAttributeValueVector( Vector patientAttributeValueVector )
-    {
-        this.patientAttributeValueVector = patientAttributeValueVector;
-    }
-
     public String getEnrollProgramId()
     {
         return enrollProgramId;
     }
 
-    public void setEnrollProgramId( String enrollProgramId )
-    {
-        this.enrollProgramId = enrollProgramId;
-    }
-
-    public Vector getOfflinePatientAttributeVector()
-    {
-        if ( offlinePatientAttributeVector == null )
-        {
-            try
-            {
-                this.offlinePatientAttributeVector = PatientAttributeRecordStore.loadOfflinePatientAttribute();
-            }
-            catch ( Exception e )
-            {
-                e.printStackTrace();
-            }
-        }
-        return offlinePatientAttributeVector;
-    }
-
-    public void setOfflinePatientAttributeVector( Vector offlinePatientAttributeVector )
-    {
-        this.offlinePatientAttributeVector = offlinePatientAttributeVector;
-    }
-
-    public Vector getOfflinePatientIdentifierVector()
-    {
-        if ( offlinePatientIdentifierVector == null )
-        {
-            try
-            {
-                this.offlinePatientIdentifierVector = PatientIdentifierRecordStore.loadOfflinePatientIdentifiers();
-            }
-            catch ( Exception e )
-            {
-                e.printStackTrace();
-            }
-        }
-        return offlinePatientIdentifierVector;
-    }
-
-    public void setOfflinePatientIdentifierVector( Vector offlinePatientIdentifierVector )
-    {
-        this.offlinePatientIdentifierVector = offlinePatientIdentifierVector;
-    }
-
-    private Vector patientAttributeVector;
-
-    private Vector patientIdentifierVector;
-
-    public Vector getPatientAttributeVector()
-        throws RecordStoreFullException, RecordStoreException, IOException
-    {
-        if ( patientAttributeVector == null )
-        {
-            try
-            {
-                this.patientAttributeVector = PatientAttributeRecordStore.loadPatientAttribute();
-
-            }
-            catch ( Exception e )
-            {
-                e.printStackTrace();
-            }
-        }
-        return patientAttributeVector;
-    }
-
-    public void setPatientAttributeVector( Vector patientAttributeVector )
-    {
-        this.patientAttributeVector = patientAttributeVector;
-    }
-
-    public Vector getPatientIdentifierVector()
-        throws RecordStoreFullException, RecordStoreException, IOException
-    {
-        if ( patientIdentifierVector == null )
-        {
-            try
-            {
-
-                this.patientIdentifierVector = PatientIdentifierRecordStore.loadPatientIdentifiers();
-
-            }
-            catch ( Exception e )
-            {
-                e.printStackTrace();
-            }
-        }
-        return patientIdentifierVector;
-    }
-
-    public void setPatientIdentifierVector( Vector patientIdentifierVector )
-    {
-        this.patientIdentifierVector = patientIdentifierVector;
-    }
-
-    private PatientIdentifierAndAttribute patientIdentifierAndAttribute;
-
-    public PatientIdentifierAndAttribute getPatientIdentifierAndAttribute()
-    {
-        return patientIdentifierAndAttribute;
-    }
-
-    public void setPatientIdentifierAndAttribute( PatientIdentifierAndAttribute patientIdentifierAndAttribute )
-    {
-        this.patientIdentifierAndAttribute = patientIdentifierAndAttribute;
-    }
-
-    private Patient patient;
-
-    public Patient getPatient()
-    {
-        return patient;
-    }
-
-    public void setPatient( Patient patient )
-    {
-        this.patient = patient;
-    }
-
     public TextField getTxtIncidentDate()
     {
         if ( txtIncidentDate == null )
@@ -856,51 +690,26 @@
         return txtIncidentDate;
     }
 
-    public void setTxtIncidentDate( TextField txtIncidentDate )
-    {
-        this.txtIncidentDate = txtIncidentDate;
-    }
-
     public Label getFullNameLabel()
     {
         return fullNameLabel;
     }
 
-    public void setFullNameLabel( Label fullNameLabel )
-    {
-        this.fullNameLabel = fullNameLabel;
-    }
-
     public Label getGenderLabel()
     {
         return genderLabel;
     }
 
-    public void setGenderLabel( Label genderLabel )
-    {
-        this.genderLabel = genderLabel;
-    }
-
     public Label getDateOfBirthLabel()
     {
         return dateOfBirthLabel;
     }
 
-    public void setDateOfBirthLabel( Label dateOfBirthLabel )
-    {
-        this.dateOfBirthLabel = dateOfBirthLabel;
-    }
-
     public Label getPhoneNumberLabel()
     {
         return phoneNumberLabel;
     }
 
-    public void setPhoneNumberLabel( Label phoneNumberLabel )
-    {
-        this.phoneNumberLabel = phoneNumberLabel;
-    }
-
     public TextField getFullNameTextField()
     {
         if ( fullNameTextField == null )
@@ -910,31 +719,16 @@
         return fullNameTextField;
     }
 
-    public void setFullNameTextField( TextField fullNameTextField )
-    {
-        this.fullNameTextField = fullNameTextField;
-    }
-
     public ComboBox getGenderComboBox()
     {
         return genderComboBox;
     }
 
-    public void setGenderComboBox( ComboBox genderComboBox )
-    {
-        this.genderComboBox = genderComboBox;
-    }
-
     public ComboBox getDateOfBirthComboBox()
     {
         return dateOfBirthComboBox;
     }
 
-    public void setDateOfBirthComboBox( ComboBox dateOfBirthComboBox )
-    {
-        this.dateOfBirthComboBox = dateOfBirthComboBox;
-    }
-
     public TextField getPhoneNumberTextField()
     {
         if ( phoneNumberTextField == null )
@@ -946,11 +740,6 @@
         return phoneNumberTextField;
     }
 
-    public void setPhoneNumberTextField( TextField phoneNumberTextField )
-    {
-        this.phoneNumberTextField = phoneNumberTextField;
-    }
-
     public Command getPersonRegistrationBackCommand()
     {
         if ( personRegistrationBackCommand == null )
@@ -960,11 +749,6 @@
         return personRegistrationBackCommand;
     }
 
-    public void setPersonRegistrationBackCommand( Command personRegistrationBackCommand )
-    {
-        this.personRegistrationBackCommand = personRegistrationBackCommand;
-    }
-
     public Command getPeronRegistrationSendCommand()
     {
         if ( personRegistrationSendCommand == null )
@@ -974,11 +758,6 @@
         return personRegistrationSendCommand;
     }
 
-    public void setPeronRegistrationSendCommand( Command peronRegistrationSendCommand )
-    {
-        this.personRegistrationSendCommand = peronRegistrationSendCommand;
-    }
-
     public Command getPersonRegistrationSaveCommand()
     {
         if ( personRegistrationSaveCommand == null )
@@ -988,51 +767,21 @@
         return personRegistrationSaveCommand;
     }
 
-    public void setPersonRegistrationSaveCommand( Command personRegistrationSaveCommand )
-    {
-        this.personRegistrationSaveCommand = personRegistrationSaveCommand;
-    }
-
     public TextField getDateOfBirthTextFiled()
     {
         return dateOfBirthTextFiled;
     }
 
-    public void setDateOfBirthTextFiled( TextField dateOfBirthTextFiled )
-    {
-        this.dateOfBirthTextFiled = dateOfBirthTextFiled;
-    }
-
-    public ConnectionManager getConnectionManager()
-    {
-        return connectionManager;
-    }
-
-    public void setConnectionManager( ConnectionManager connectionManager )
-    {
-        this.connectionManager = connectionManager;
-    }
-
     public Label getPatientIdentifierLabel()
     {
         return patientIdentifierLabel;
     }
 
-    public void setPatientIdentifierLabel( Label patientIdentifierLabel )
-    {
-        this.patientIdentifierLabel = patientIdentifierLabel;
-    }
-
     public Label getPatientAttributeLabel()
     {
         return patientAttributeLabel;
     }
 
-    public void setPatientAttributeLabel( Label patientAttributeLabel )
-    {
-        this.patientAttributeLabel = patientAttributeLabel;
-    }
-
     public TextField getPatientIdentifierTextField()
     {
         if ( patientIdentifierTextField == null )
@@ -1042,11 +791,6 @@
         return patientIdentifierTextField;
     }
 
-    public void setPatientIdentifierTextField( TextField patientIdentifierTextField )
-    {
-        this.patientIdentifierTextField = patientIdentifierTextField;
-    }
-
     public TextField getPatientAttributeTextField()
     {
         if ( patientAttributeTextField == null )
@@ -1055,20 +799,4 @@
         }
         return patientAttributeTextField;
     }
-
-    public void setPatientAttributeTextField( TextField patientAttributeTextField )
-    {
-        this.patientAttributeTextField = patientAttributeTextField;
-    }
-
-    public void setDobWrongFortmatLabel( Label dobWrongFortmatLabel )
-    {
-        this.dobWrongFortmatLabel = dobWrongFortmatLabel;
-    }
-
-    public void setRequiredLabel( Label requiredLabel )
-    {
-        this.requiredLabel = requiredLabel;
-    }
-
 }
\ No newline at end of file