@@ -0,0 +1,2008 @@
+/*%0A * This program is part of the OpenLMIS logistics management information%0A * system platform software.%0A *%0A * Copyright %C2%A9 2015 ThoughtWorks, Inc.%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as published%0A * by the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version. This program is distributed in the%0A * hope that it will be useful, but WITHOUT ANY WARRANTY; without even the%0A * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.%0A * See the GNU Affero General Public License for more details. You should%0A * have received a copy of the GNU Affero General Public License along with%0A * this program. If not, see http://www.gnu.org/licenses. For additional%0A * information contact info@OpenLMIS.org%0A */%0A%0Apackage org.openlmis.core.model.repository;%0A%0A%0Aimport android.content.Context;%0A%0Aimport com.google.inject.Inject;%0Aimport com.j256.ormlite.misc.TransactionManager;%0Aimport org.openlmis.core.exceptions.LMISException;%0Aimport org.openlmis.core.model.ProgramDataFormBasicItem;%0Aimport org.openlmis.core.persistence.LmisSqliteOpenHelper;%0Aimport java.sql.SQLException;%0Aimport java.util.List;%0Aimport java.util.concurrent.Callable;%0A%0Apublic class ProgramBasicRepository %7B%0A%0A    private Context context;%0A%0A    @Inject%0A    public ProgramBasicRepository(Context context) %7B%0A        this.context = context;%0A    %7D%0A%0A    private List%3CProgramDataFormBasicItem%3E createInitProgramForm(final List%3CProgramDataFormBasicItem%3E items) throws LMISException %7B%0A        try %7B%0A            TransactionManager.callInTransaction(LmisSqliteOpenHelper.getInstance(context).getConnectionSource(), new Callable%3CObject%3E() %7B%0A                @Override%0A                public Object call() throws Exception %7B%0A                    return null;%0A                %7D%0A            %7D);%0A        %7D catch (SQLException e) %7B%0A            throw new LMISException(e);%0A        %7D%0A%0A        return items;%0A    %7D%0A%0A%7D%0A

add program basic repository