Make MifosCurrency a non-persistence unit  
-------------------------------------------

                 Key: MIFOS-2762
                 URL: http://mifosforge.jira.com/browse/MIFOS-2762
             Project: mifos
          Issue Type: Improvement
          Components: Misc
    Affects Versions: Release 1.4
            Reporter: Udai Gupta
             Fix For: Unscheduled


Improvements for MifosCurrency: (Proposal)
 - Refactoring, use MifosCurrency#currencyCode instead of 
MifosCurrency#currencyId in main code, currencyCode is a unique ISO 4217 (3 
letters) Alphabetic code.
        http://www.iso.org/iso/support/currency_codes_list-1.htm
 - Make sure the refacotring works and make the public getCurrencyId accessor 
to private so that it won't be available for use.
 - Make sure the named query usage of MifosCurrency gets replaced by a 
immutable MifocCurrency(currencyCode) object creation.
 - Create a currencyId, currencyCode Map using currency table as a workaround 
for CURRENCY_ID column in various table. Use this map to create 
MifosCurrency(currencyId) in MoneyCompositeUserType.
 - Remove Hibernate mapping for MifosCurrency.

Things to investigate (is it possible to)
 - use java.util.Currency to get Symbol and other information. (Wrapping)
 - replace CURRENCY_ID column (smallint NULL) to CURRENCY column (ENUM(ISO 4217 
list) NOT NULL) in various tables, it has to be a java based upgrade.

Benifits:
- Currency will not be a persistence unit, no need to initialize hibernate for 
Currency during testing.
- Get rid of 178 FK constraints (from SchemaSpy analysis)
- More readable data in table and USD, INR wil be stored in tables instead of 
currencyId 1, 2....
- ENUM of currency will takes 1 byte for ISO 4217, while currency_id takes 2 
byte (smallint)
     http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to