130 lines
4.8 KiB
Java
130 lines
4.8 KiB
Java
/*
|
|
* MIT License
|
|
*
|
|
* Copyright (c) 2018-2019 Daniel Cortes
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
|
|
package danielcortes.xyz.data;
|
|
|
|
import danielcortes.xyz.models.caja.CajaDAO;
|
|
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
|
import danielcortes.xyz.models.calculo_fondo.CalculoFondoDAO;
|
|
import danielcortes.xyz.models.calculo_fondo.SQLiteCalculoFondoDAO;
|
|
import danielcortes.xyz.models.documentos.DocumentosDAO;
|
|
import danielcortes.xyz.models.documentos.SQLiteDocumentosDAO;
|
|
import danielcortes.xyz.models.efectivo.EfectivoDAO;
|
|
import danielcortes.xyz.models.efectivo.SQLiteEfectivoDAO;
|
|
import danielcortes.xyz.models.egreso.EgresoDAO;
|
|
import danielcortes.xyz.models.egreso.SQLiteEgresoDAO;
|
|
import danielcortes.xyz.models.estado_resultado.EstadoResultadoDAO;
|
|
import danielcortes.xyz.models.estado_resultado.SQLiteEstadoResultadoDAO;
|
|
import danielcortes.xyz.models.informes.egresos.InformeEgresosContentDAO;
|
|
import danielcortes.xyz.models.informes.egresos.SQLiteInformeEgresosContentDAO;
|
|
import danielcortes.xyz.models.informes.libro_de_ventas.InformeLibroDeVentasContentDAO;
|
|
import danielcortes.xyz.models.informes.libro_de_ventas.SQLiteInformeLibroDeVentasContentDAO;
|
|
import danielcortes.xyz.models.ingreso.IngresoDAO;
|
|
import danielcortes.xyz.models.ingreso.SQLiteIngresoDAO;
|
|
import danielcortes.xyz.models.tipo_egreso.SQLiteTipoEgresoDAO;
|
|
import danielcortes.xyz.models.tipo_egreso.TipoEgresoDAO;
|
|
import danielcortes.xyz.models.tipo_ingreso.SQLiteTipoIngresoDAO;
|
|
import danielcortes.xyz.models.tipo_ingreso.TipoIngresoDAO;
|
|
import danielcortes.xyz.models.version.SQLiteVersionDAO;
|
|
import danielcortes.xyz.models.version.VersionDAO;
|
|
|
|
public class DAOManager {
|
|
|
|
private static final CajaDAO cajaDAO;
|
|
private static final CalculoFondoDAO calculoFondoDAO;
|
|
private static final DocumentosDAO documentosDAO;
|
|
private static final EfectivoDAO efectivoDAO;
|
|
private static final EgresoDAO egresoDAO;
|
|
private static final InformeEgresosContentDAO egresosContentDAO;
|
|
private static final InformeLibroDeVentasContentDAO libroDeVentasContentDAO;
|
|
private static final IngresoDAO ingresoDAO;
|
|
private static final TipoEgresoDAO tipoEgresoDAO;
|
|
private static final TipoIngresoDAO tipoIngresoDAO;
|
|
private static final EstadoResultadoDAO estadoResultadoDAO;
|
|
private static final VersionDAO versionDAO;
|
|
|
|
static {
|
|
cajaDAO = new SQLiteCajaDAO();
|
|
calculoFondoDAO = new SQLiteCalculoFondoDAO();
|
|
documentosDAO = new SQLiteDocumentosDAO();
|
|
efectivoDAO = new SQLiteEfectivoDAO();
|
|
egresoDAO = new SQLiteEgresoDAO();
|
|
egresosContentDAO = new SQLiteInformeEgresosContentDAO();
|
|
libroDeVentasContentDAO = new SQLiteInformeLibroDeVentasContentDAO();
|
|
ingresoDAO = new SQLiteIngresoDAO();
|
|
tipoEgresoDAO = new SQLiteTipoEgresoDAO();
|
|
tipoIngresoDAO = new SQLiteTipoIngresoDAO();
|
|
estadoResultadoDAO = new SQLiteEstadoResultadoDAO();
|
|
versionDAO = new SQLiteVersionDAO();
|
|
}
|
|
|
|
public static CajaDAO getCajaDAO() {
|
|
return cajaDAO;
|
|
}
|
|
|
|
public static CalculoFondoDAO getCalculoFondoDAO() {
|
|
return calculoFondoDAO;
|
|
}
|
|
|
|
public static DocumentosDAO getDocumentosDAO() {
|
|
return documentosDAO;
|
|
}
|
|
|
|
public static EfectivoDAO getEfectivoDAO() {
|
|
return efectivoDAO;
|
|
}
|
|
|
|
public static EgresoDAO getEgresoDAO() {
|
|
return egresoDAO;
|
|
}
|
|
|
|
public static InformeEgresosContentDAO getEgresosContentDAO() {
|
|
return egresosContentDAO;
|
|
}
|
|
|
|
public static InformeLibroDeVentasContentDAO getLibroDeVentasContentDAO() {
|
|
return libroDeVentasContentDAO;
|
|
}
|
|
|
|
public static IngresoDAO getIngresoDAO() {
|
|
return ingresoDAO;
|
|
}
|
|
|
|
public static TipoEgresoDAO getTipoEgresoDAO() {
|
|
return tipoEgresoDAO;
|
|
}
|
|
|
|
public static TipoIngresoDAO getTipoIngresoDAO() {
|
|
return tipoIngresoDAO;
|
|
}
|
|
|
|
public static EstadoResultadoDAO getEstadoResultadoDAO() {
|
|
return estadoResultadoDAO;
|
|
}
|
|
|
|
public static VersionDAO getVersionDAO() {
|
|
return versionDAO;
|
|
}
|
|
}
|