diff --git a/CuentasPersonales/.classpath b/CuentasPersonales/.classpath
new file mode 100644
index 0000000..8bc7954
--- /dev/null
+++ b/CuentasPersonales/.classpath
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/.mymetadata b/CuentasPersonales/.mymetadata
new file mode 100644
index 0000000..ec3fe0c
--- /dev/null
+++ b/CuentasPersonales/.mymetadata
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/.project b/CuentasPersonales/.project
new file mode 100644
index 0000000..8eef3c5
--- /dev/null
+++ b/CuentasPersonales/.project
@@ -0,0 +1,45 @@
+
+
+ CuentasPersonales
+
+
+
+
+
+ com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator
+
+
+
+
+ com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+ com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder
+
+
+
+
+
+ com.genuitec.eclipse.ast.deploy.core.deploymentnature
+ com.genuitec.eclipse.j2eedt.core.webnature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/CuentasPersonales/.settings/com.genuitec.eclipse.ws.prefs b/CuentasPersonales/.settings/com.genuitec.eclipse.ws.prefs
new file mode 100644
index 0000000..12a8d25
--- /dev/null
+++ b/CuentasPersonales/.settings/com.genuitec.eclipse.ws.prefs
@@ -0,0 +1,3 @@
+#Wed Apr 04 12:27:09 COT 2012
+eclipse.preferences.version=1
+ws.framework.id=com.genuitec.eclipse.ws.jaxws
diff --git a/CuentasPersonales/.settings/org.eclipse.jdt.core.prefs b/CuentasPersonales/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..03498bc
--- /dev/null
+++ b/CuentasPersonales/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed Apr 04 12:27:09 COT 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/CuentasPersonales/WebRoot/META-INF/MANIFEST.MF b/CuentasPersonales/WebRoot/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/CuentasPersonales/WebRoot/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/CuentasPersonales/WebRoot/WEB-INF/classes/META-INF/persistence.xml b/CuentasPersonales/WebRoot/WEB-INF/classes/META-INF/persistence.xml
new file mode 100644
index 0000000..0cb2e4a
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/classes/META-INF/persistence.xml
@@ -0,0 +1,23 @@
+
+
+
+ org.hibernate.ejb.HibernatePersistence
+ org.zathura.cuentas.personales.CpDetalleMovimiento
+ org.zathura.cuentas.personales.CpGrupoMovimiento
+ org.zathura.cuentas.personales.CpMovimiento
+ org.zathura.cuentas.personales.CpTipoMovimiento
+ org.zathura.cuentas.personales.CpUsuarios
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/WEB-INF/classes/log4j.dtd b/CuentasPersonales/WebRoot/WEB-INF/classes/log4j.dtd
new file mode 100644
index 0000000..cfc8a5d
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/classes/log4j.dtd
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/WEB-INF/classes/log4j.xml b/CuentasPersonales/WebRoot/WEB-INF/classes/log4j.xml
new file mode 100644
index 0000000..4330e38
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/classes/log4j.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/WEB-INF/facelets/footer.jspx b/CuentasPersonales/WebRoot/WEB-INF/facelets/footer.jspx
new file mode 100644
index 0000000..ad01ab4
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/facelets/footer.jspx
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/WEB-INF/facelets/footerInitialMenu.jspx b/CuentasPersonales/WebRoot/WEB-INF/facelets/footerInitialMenu.jspx
new file mode 100644
index 0000000..ad01ab4
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/facelets/footerInitialMenu.jspx
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/WEB-INF/facelets/header.jspx b/CuentasPersonales/WebRoot/WEB-INF/facelets/header.jspx
new file mode 100644
index 0000000..8c375d2
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/facelets/header.jspx
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/WEB-INF/faces-config.xml b/CuentasPersonales/WebRoot/WEB-INF/faces-config.xml
new file mode 100644
index 0000000..46c0ce0
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/faces-config.xml
@@ -0,0 +1,272 @@
+
+
+
+
+
+ cpDetalleMovimientoView
+ org.zathura.cuentas.presentation.backingBeans.CpDetalleMovimientoView
+ request
+
+
+ cpGrupoMovimientoView
+ org.zathura.cuentas.presentation.backingBeans.CpGrupoMovimientoView
+ request
+
+
+ cpMovimientoView
+ org.zathura.cuentas.presentation.backingBeans.CpMovimientoView
+ session
+
+
+ cpTipoMovimientoView
+ org.zathura.cuentas.presentation.backingBeans.CpTipoMovimientoView
+ request
+
+
+ cpUsuariosView
+ org.zathura.cuentas.presentation.backingBeans.CpUsuariosView
+ request
+
+
+ /XHTML/cpDetalleMovimiento.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpDetalleMovimientoListDataTable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpDetalleMovimientoListDataTableEditable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpDetalleMovimiento
+ /XHTML/cpDetalleMovimiento.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpDetalleMovimientoListDataTable
+ /XHTML/cpDetalleMovimientoListDataTable.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpDetalleMovimientoListDataTableEditable
+ /XHTML/cpDetalleMovimientoListDataTableEditable.xhtml
+
+
+
+
+ /XHTML/cpGrupoMovimiento.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpGrupoMovimientoListDataTable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpGrupoMovimientoListDataTableEditable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpGrupoMovimiento
+ /XHTML/cpGrupoMovimiento.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpGrupoMovimientoListDataTable
+ /XHTML/cpGrupoMovimientoListDataTable.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpGrupoMovimientoListDataTableEditable
+ /XHTML/cpGrupoMovimientoListDataTableEditable.xhtml
+
+
+
+
+ /XHTML/cpMovimiento.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpMovimientoListDataTable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpMovimientoListDataTableEditable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpMovimiento
+ /XHTML/cpMovimiento.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpMovimientoListDataTable
+ /XHTML/cpMovimientoListDataTable.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpMovimientoListDataTableEditable
+ /XHTML/cpMovimientoListDataTableEditable.xhtml
+
+
+
+
+ /XHTML/cpTipoMovimiento.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpTipoMovimientoListDataTable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpTipoMovimientoListDataTableEditable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpTipoMovimiento
+ /XHTML/cpTipoMovimiento.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpTipoMovimientoListDataTable
+ /XHTML/cpTipoMovimientoListDataTable.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpTipoMovimientoListDataTableEditable
+ /XHTML/cpTipoMovimientoListDataTableEditable.xhtml
+
+
+
+
+ /XHTML/cpUsuarios.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpUsuariosListDataTable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/cpUsuariosListDataTableEditable.xhtml
+
+ goInitialMenu
+ /XHTML/initialMenu.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpUsuarios
+ /XHTML/cpUsuarios.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpUsuariosListDataTable
+ /XHTML/cpUsuariosListDataTable.xhtml
+
+
+
+
+ /XHTML/initialMenu.xhtml
+
+ goCpUsuariosListDataTableEditable
+ /XHTML/cpUsuariosListDataTableEditable.xhtml
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/WEB-INF/web.xml b/CuentasPersonales/WebRoot/WEB-INF/web.xml
new file mode 100644
index 0000000..7b66cb8
--- /dev/null
+++ b/CuentasPersonales/WebRoot/WEB-INF/web.xml
@@ -0,0 +1,40 @@
+
+
+
+
+ index.jsp
+
+
+ Faces Servlet
+ javax.faces.webapp.FacesServlet
+ 1
+
+
+ Faces Servlet
+ *.faces
+
+
+
+ Faces Servlet
+ *.xhtml
+
+
+
+ Resource Servlet
+ org.primefaces.resource.ResourceServlet
+
+
+ Resource Servlet
+ /primefaces_resource/*
+
+
+
+ primefaces.THEME
+ aristo
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/CommonColumnsContent.xhtml b/CuentasPersonales/WebRoot/XHTML/CommonColumnsContent.xhtml
new file mode 100644
index 0000000..42121fb
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/CommonColumnsContent.xhtml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/CommonLayout.xhtml b/CuentasPersonales/WebRoot/XHTML/CommonLayout.xhtml
new file mode 100644
index 0000000..c8b9ee5
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/CommonLayout.xhtml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ .::Zathuracode Generator 3.0::.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/MyXhtml.xhtml b/CuentasPersonales/WebRoot/XHTML/MyXhtml.xhtml
new file mode 100644
index 0000000..ce04944
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/MyXhtml.xhtml
@@ -0,0 +1,384 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Descripcion Movimiento
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Aplicar Movimiento para el Año :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #{MESES}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimiento.xhtml b/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimiento.xhtml
new file mode 100644
index 0000000..269c52e
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimiento.xhtml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimientoListDataTable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimientoListDataTable.xhtml
new file mode 100644
index 0000000..f91d4a5
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimientoListDataTable.xhtml
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimientoListDataTableEditable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimientoListDataTableEditable.xhtml
new file mode 100644
index 0000000..9461cb6
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpDetalleMovimientoListDataTableEditable.xhtml
@@ -0,0 +1,215 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimiento.xhtml b/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimiento.xhtml
new file mode 100644
index 0000000..fee0c9f
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimiento.xhtml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimientoListDataTable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimientoListDataTable.xhtml
new file mode 100644
index 0000000..1c10c54
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimientoListDataTable.xhtml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimientoListDataTableEditable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimientoListDataTableEditable.xhtml
new file mode 100644
index 0000000..37f2192
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpGrupoMovimientoListDataTableEditable.xhtml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpMovimiento.xhtml b/CuentasPersonales/WebRoot/XHTML/cpMovimiento.xhtml
new file mode 100644
index 0000000..ccfd90c
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpMovimiento.xhtml
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpMovimientoListDataTable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpMovimientoListDataTable.xhtml
new file mode 100644
index 0000000..f95cb98
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpMovimientoListDataTable.xhtml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpMovimientoListDataTableEditable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpMovimientoListDataTableEditable.xhtml
new file mode 100644
index 0000000..eec2f58
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpMovimientoListDataTableEditable.xhtml
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpTipoMovimiento.xhtml b/CuentasPersonales/WebRoot/XHTML/cpTipoMovimiento.xhtml
new file mode 100644
index 0000000..b7cfb87
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpTipoMovimiento.xhtml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpTipoMovimientoListDataTable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpTipoMovimientoListDataTable.xhtml
new file mode 100644
index 0000000..32803b3
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpTipoMovimientoListDataTable.xhtml
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpTipoMovimientoListDataTableEditable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpTipoMovimientoListDataTableEditable.xhtml
new file mode 100644
index 0000000..54c4db9
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpTipoMovimientoListDataTableEditable.xhtml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpUsuarios.xhtml b/CuentasPersonales/WebRoot/XHTML/cpUsuarios.xhtml
new file mode 100644
index 0000000..a2db67d
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpUsuarios.xhtml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpUsuariosListDataTable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpUsuariosListDataTable.xhtml
new file mode 100644
index 0000000..eee4882
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpUsuariosListDataTable.xhtml
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/cpUsuariosListDataTableEditable.xhtml b/CuentasPersonales/WebRoot/XHTML/cpUsuariosListDataTableEditable.xhtml
new file mode 100644
index 0000000..5cb92b5
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/cpUsuariosListDataTableEditable.xhtml
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/XHTML/initialMenu.xhtml b/CuentasPersonales/WebRoot/XHTML/initialMenu.xhtml
new file mode 100644
index 0000000..40db701
--- /dev/null
+++ b/CuentasPersonales/WebRoot/XHTML/initialMenu.xhtml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/WebRoot/css/style.css b/CuentasPersonales/WebRoot/css/style.css
new file mode 100644
index 0000000..6600a8a
--- /dev/null
+++ b/CuentasPersonales/WebRoot/css/style.css
@@ -0,0 +1,400 @@
+/* Main Layout Styles */
+body {
+ background: #EBEBEB;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #666;
+}
+
+
+
+.right {
+ float: right;
+}
+
+.left {
+ float: left;
+}
+
+img {
+ border: none;
+}
+
+ul,li {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+form {
+ margin: 0;
+ padding: 0;
+}
+
+a {
+ color: #0088B5;
+ font-weight: bold;
+}
+
+a:hover {
+ color: #0078A0;
+}
+
+#container {
+ width: 1155px;
+ padding: 15px;
+ -moz-border-radius: 13px;
+ background: #fff;
+ margin: 10px auto;
+ overflow: auto;
+}
+
+#content {
+ width: 1330px;
+ overflow: auto;
+}
+
+#header {
+ width: 930px;
+ height: 55px;
+}
+
+.logo {
+
+}
+
+ul#toplinks {
+ float: right;
+ color: #999;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+ul#toplinks li {
+ float: right;
+ margin: 3px 0 0 10px;
+}
+
+ul#toplinks a {
+ color: #999;
+ font-weight: normal;
+}
+
+ul#toplinks a:hover {
+ color: #666;
+ font-weight: normal;
+}
+
+#nav {
+ padding: 0;
+ width: 910px;
+ background: #008DBC url(images/bg_nav.png) repeat-x bottom;
+ padding: 9px 0 10px 20px;
+ -moz-border-radius: 10px;
+ color: #fff;
+ height: 12px;
+ margin: 15px 0;
+}
+
+#nav li {
+ padding-right: 20px;
+ float: left;
+ display: block;
+}
+
+#nav a {
+ color: #fff;
+ text-decoration: none;
+ font-weight: normal;
+}
+
+#nav a:hover {
+ color: #33CCFF;
+}
+
+#footer {
+ width: 960px;
+ text-align: center;
+ margin: 10px auto;
+ padding-bottom: 15px;
+ clear: both;
+}
+
+#footer ul {
+ width: 380px;
+ margin: 0 auto;
+}
+
+#footer li {
+ float: center;
+ margin-right: 20px;
+}
+
+#footer li a {
+ color: #999;
+}
+
+/* Homepage Styles */
+#topbox {
+ width: 890px;
+ padding: 20px;
+ -moz-border-radius: 10px;
+ background: #00ACE6 url(images/bg_fptopbox.png) repeat-x bottom;
+ overflow: auto;
+ color: #fff;
+}
+
+#topbox h4 {
+ color: #fff;
+ font-size: 12px;
+ letter-spacing: -1px;
+ margin: 0;
+ padding: 0 0 5px 0;
+}
+
+#topbox input {
+ border: 1px solid #0093C4;
+ padding: 3px 3px;
+ width: 230px;
+}
+
+#topbox select {
+ margin-left: 3px;
+}
+
+#topbox .btn {
+ padding: 3px 5px;
+ background: #004055;
+ color: #fff;
+ border: none;
+ -moz-border-radius: 3px;
+ position: absolute;
+ margin-left: 5px;
+ cursor: pointer;
+ width: 60px;
+ font-size: 12px;
+}
+
+#topbox .btn:hover {
+ background: #005773;
+}
+
+#tbleft {
+ float: left;
+ width: 450px;
+ padding: 15px 0 0 10px;
+}
+
+#tbleft .tld {
+ width: 75px;
+}
+
+#tbright {
+ font-size: 12px;
+ float: right;
+ width: 390px;
+ border-left: 1px solid #00ACE5;
+ padding-left: 15px;
+}
+
+#tbright #boxleft {
+ float: left;
+ width: 225px;
+}
+
+#tbright input {
+ width: 145px;
+ margin: 5px 0 0 5px;
+}
+
+#tbright p {
+ float: right;
+ margin: 0;
+ padding: 0;
+}
+
+#tbright p.link {
+ float: left;
+ margin: 13px 0 0 10px;
+ font-size: 12px;
+ padding: 0;
+}
+
+#tbright a {
+ color: #fff;
+ text-decoration: underline;
+}
+
+ul#promobox {
+ width: 930px;
+ position: relative;
+ float: left;
+ margin-bottom: 15px;
+}
+
+ul#promobox p {
+ margin: 0;
+ padding: 0;
+}
+
+ul#promobox li {
+ width: 270px;
+ padding: 20px 10px 20px 20px;
+ float: left;
+ background: #008DBC url(images/bg_promo1.png) repeat-x bottom;
+ margin: 15px 15px 0 0;
+ -moz-border-radius: 10px;
+ color: #fff;
+}
+
+ul#promobox ul {
+ margin: 0 0 10px 0;
+}
+
+ul#promobox li ul li {
+ margin: 5px 0 0 0;
+ background: url(images/bullet.png) no-repeat left center;
+ padding: 0 0 0 10px;
+ width: 250px;
+}
+
+ul#promobox li h3 {
+ line-height: 1;
+ color: #fff;
+ letter-spacing: -1px;
+ font-size: 12px;
+ float: left;
+ margin: 0;
+ padding: 0 0 3px 0;
+}
+
+ul#promobox li .pricebox {
+ line-height: 1;
+ float: right;
+ text-align: center;
+ padding-right: 10px;
+}
+
+ul#promobox li .pricebox .lrg {
+ line-height: 1;
+ letter-spacing: -1px;
+ font-size: 12px;
+ font-weight: bold;
+ margin: 0;
+ padding: 0;
+}
+
+ul#promobox a {
+ background: #004055;
+ color: #fff;
+ float: left;
+ margin: 15px 10px 0 0;
+ padding: 5px 10px;
+ text-decoration: none;
+ -moz-border-radius: 5px;
+ font-weight: normal;
+}
+
+ul#promobox a:hover {
+ background: #005773;
+}
+
+ul#promobox li.two {
+ background: #00ACE6 url(images/bg_promo2.png) repeat-x bottom;
+}
+
+ul#promobox li.three {
+ margin-right: 0;
+ background: #09C1FF url(images/bg_promo3.png) repeat-x bottom;
+}
+
+#newsbox {
+ width: 575px;
+ padding: 20px;
+ background: #f7f7f7;
+ float: left;
+ -moz-border-radius: 10px;
+}
+
+#newsbox p {
+ margin: 0;
+ padding: 0;
+}
+
+#newsbox h5 {
+ font-size: 12px;
+ letter-spacing: -1px;
+ color: #006C91;
+ margin: 0;
+ padding: 0;
+ line-height: 1;
+}
+
+#newsbox h6 a {
+ font-size: 12px;
+ letter-spacing: -1px;
+ color: #006C91;
+ margin: 0;
+ padding: 0;
+ line-height: 1;
+}
+
+#newsbox h6 {
+ margin-bottom: 2px;
+ padding: 0;
+ line-height: 1;
+}
+
+#newsbox li {
+ margin-top: 15px;
+ line-height: 1.5em;
+}
+
+#newsbox .rss a {
+ float: right;
+ margin: 3px 8px 0 0;
+ color: #999;
+ font-weight: normal;
+}
+
+#quotes {
+ width: 260px;
+ padding: 20px;
+ float: right;
+ background: #09C1FF url(images/bg_promo3.png) repeat-x bottom;
+ -moz-border-radius: 10px;
+ color: #fff;
+}
+
+#quotes p {
+ margin: 0;
+ padding: 0;
+}
+
+#quotes h3 {
+ line-height: 1;
+ letter-spacing: -1px;
+ font-size: 25px;
+ margin: 0;
+ padding: 0;
+}
+
+#quotes li {
+ margin-top: 17px;
+ font-size: 12px;
+ font-weight: bold;
+ letter-spacing: -1px;
+}
+
+#quotes a {
+ float: left;
+ color: #fff;
+ padding: 0;
+ margin-top: 15px;
+}
+
+/* Para que se vean pequenos los componentes*/
+th,td {
+ font-size: 12px;
+}
\ No newline at end of file
diff --git a/CuentasPersonales/WebRoot/images/ajaxloadingbar.gif b/CuentasPersonales/WebRoot/images/ajaxloadingbar.gif
new file mode 100644
index 0000000..47adbf0
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/ajaxloadingbar.gif differ
diff --git a/CuentasPersonales/WebRoot/images/bg_fptopbox.png b/CuentasPersonales/WebRoot/images/bg_fptopbox.png
new file mode 100644
index 0000000..fb3ef68
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/bg_fptopbox.png differ
diff --git a/CuentasPersonales/WebRoot/images/bg_nav.png b/CuentasPersonales/WebRoot/images/bg_nav.png
new file mode 100644
index 0000000..d0b4f1f
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/bg_nav.png differ
diff --git a/CuentasPersonales/WebRoot/images/bg_promo1.png b/CuentasPersonales/WebRoot/images/bg_promo1.png
new file mode 100644
index 0000000..54ca445
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/bg_promo1.png differ
diff --git a/CuentasPersonales/WebRoot/images/bg_promo2.png b/CuentasPersonales/WebRoot/images/bg_promo2.png
new file mode 100644
index 0000000..b8fe307
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/bg_promo2.png differ
diff --git a/CuentasPersonales/WebRoot/images/bg_promo3.png b/CuentasPersonales/WebRoot/images/bg_promo3.png
new file mode 100644
index 0000000..7ae9d68
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/bg_promo3.png differ
diff --git a/CuentasPersonales/WebRoot/images/bullet.png b/CuentasPersonales/WebRoot/images/bullet.png
new file mode 100644
index 0000000..119bdfb
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/bullet.png differ
diff --git a/CuentasPersonales/WebRoot/images/crud.png b/CuentasPersonales/WebRoot/images/crud.png
new file mode 100644
index 0000000..a7df420
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/crud.png differ
diff --git a/CuentasPersonales/WebRoot/images/dataTable.png b/CuentasPersonales/WebRoot/images/dataTable.png
new file mode 100644
index 0000000..0540e9d
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/dataTable.png differ
diff --git a/CuentasPersonales/WebRoot/images/dataTableEditable.png b/CuentasPersonales/WebRoot/images/dataTableEditable.png
new file mode 100644
index 0000000..047e2f2
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/dataTableEditable.png differ
diff --git a/CuentasPersonales/WebRoot/images/home.png b/CuentasPersonales/WebRoot/images/home.png
new file mode 100644
index 0000000..345ce47
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/home.png differ
diff --git a/CuentasPersonales/WebRoot/images/icon.png b/CuentasPersonales/WebRoot/images/icon.png
new file mode 100644
index 0000000..8b03f86
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/icon.png differ
diff --git a/CuentasPersonales/WebRoot/images/icon_rss.png b/CuentasPersonales/WebRoot/images/icon_rss.png
new file mode 100644
index 0000000..80d468a
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/icon_rss.png differ
diff --git a/CuentasPersonales/WebRoot/images/logo.png b/CuentasPersonales/WebRoot/images/logo.png
new file mode 100644
index 0000000..7638204
Binary files /dev/null and b/CuentasPersonales/WebRoot/images/logo.png differ
diff --git a/CuentasPersonales/WebRoot/index.jsp b/CuentasPersonales/WebRoot/index.jsp
new file mode 100644
index 0000000..487d8ab
--- /dev/null
+++ b/CuentasPersonales/WebRoot/index.jsp
@@ -0,0 +1,17 @@
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
+<%
+String path = request.getContextPath();
+String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+.::Powered by Zathura Code Generator 2012::.
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/generado/META-INF/persistence.xml b/CuentasPersonales/generado/META-INF/persistence.xml
new file mode 100644
index 0000000..0cb2e4a
--- /dev/null
+++ b/CuentasPersonales/generado/META-INF/persistence.xml
@@ -0,0 +1,23 @@
+
+
+
+ org.hibernate.ejb.HibernatePersistence
+ org.zathura.cuentas.personales.CpDetalleMovimiento
+ org.zathura.cuentas.personales.CpGrupoMovimiento
+ org.zathura.cuentas.personales.CpMovimiento
+ org.zathura.cuentas.personales.CpTipoMovimiento
+ org.zathura.cuentas.personales.CpUsuarios
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/generado/log4j.dtd b/CuentasPersonales/generado/log4j.dtd
new file mode 100644
index 0000000..cfc8a5d
--- /dev/null
+++ b/CuentasPersonales/generado/log4j.dtd
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CuentasPersonales/generado/log4j.xml b/CuentasPersonales/generado/log4j.xml
new file mode 100644
index 0000000..4330e38
--- /dev/null
+++ b/CuentasPersonales/generado/log4j.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpDetalleMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpDetalleMovimientoDAO.java
new file mode 100644
index 0000000..a0318c5
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpDetalleMovimientoDAO.java
@@ -0,0 +1,424 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.personales.CpDetalleMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+
+/**
+* A data access object (DAO) providing persistence and search support for
+* CpDetalleMovimiento entities. Transaction control of the save(), update() and delete()
+* operations must be handled externally by senders of these methods or must be
+* manually added to each of these methods for data to be persisted to the JPA
+* datastore.
+*
+* @author Zathura Code Generator http://code.google.com/p/zathura
+* @see lidis.CpDetalleMovimiento
+*
+*/
+public class CpDetalleMovimientoDAO implements ICpDetalleMovimientoDAO {
+ private EntityManager getEntityManager() {
+ return EntityManagerHelper.getEntityManager();
+ }
+
+ /**
+ * Perform an initial save of a previously unsaved CpDetalleMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpDetalleMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpDetalleMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpDetalleMovimiento entity) {
+ EntityManagerHelper.log("saving CpDetalleMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ getEntityManager().persist(entity);
+ EntityManagerHelper.log("save successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("save failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Delete a persistent CpDetalleMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpDetalleMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpDetalleMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpDetalleMovimiento entity) {
+ EntityManagerHelper.log("deleting CpDetalleMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ entity = getEntityManager()
+ .getReference(CpDetalleMovimiento.class,
+ entity.getIdDetalleMovimiento());
+ getEntityManager().remove(entity);
+ EntityManagerHelper.log("delete successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("delete failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Persist a previously saved CpDetalleMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpDetalleMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = CpDetalleMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpDetalleMovimiento entity to update
+ * @return CpDetalleMovimiento the persisted CpDetalleMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpDetalleMovimiento update(CpDetalleMovimiento entity) {
+ EntityManagerHelper.log("updating CpDetalleMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ CpDetalleMovimiento result = getEntityManager()
+ .merge(entity);
+ EntityManagerHelper.log("update successful", Level.INFO, null);
+
+ return result;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("update failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public CpDetalleMovimiento findById(Long id) {
+ EntityManagerHelper.log(
+ "finding CpDetalleMovimiento instance with id: " + id, Level.INFO,
+ null);
+
+ try {
+ CpDetalleMovimiento instance = getEntityManager()
+ .find(CpDetalleMovimiento.class,
+ id);
+
+ return instance;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpDetalleMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the metaData.name of the CpDetalleMovimiento property to query
+ * @param value
+ * the property value to match
+ * @return List< CpDetalleMovimiento> found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value) {
+ EntityManagerHelper.log(
+ "finding CpDetalleMovimiento instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpDetalleMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property metaData.name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpDetalleMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpDetalleMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * number of results to return.
+ * @return List found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value, final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log(
+ "finding CpDetalleMovimiento instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpDetalleMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByAnno(Object anno,
+ int... rowStartIdxAndCount) {
+ return findByProperty(ANNO, anno, rowStartIdxAndCount);
+ }
+
+ public List findByAnno(Object anno) {
+ return findByProperty(ANNO, anno);
+ }
+
+ public List findByFehcaRegistro(Object fehcaRegistro,
+ int... rowStartIdxAndCount) {
+ return findByProperty(FEHCAREGISTRO, fehcaRegistro, rowStartIdxAndCount);
+ }
+
+ public List findByFehcaRegistro(Object fehcaRegistro) {
+ return findByProperty(FEHCAREGISTRO, fehcaRegistro);
+ }
+
+ public List findByIdDetalleMovimiento(
+ Object idDetalleMovimiento, int... rowStartIdxAndCount) {
+ return findByProperty(IDDETALLEMOVIMIENTO, idDetalleMovimiento,
+ rowStartIdxAndCount);
+ }
+
+ public List findByIdDetalleMovimiento(
+ Object idDetalleMovimiento) {
+ return findByProperty(IDDETALLEMOVIMIENTO, idDetalleMovimiento);
+ }
+
+ public List findByMes(Object mes,
+ int... rowStartIdxAndCount) {
+ return findByProperty(MES, mes, rowStartIdxAndCount);
+ }
+
+ public List findByMes(Object mes) {
+ return findByProperty(MES, mes);
+ }
+
+ public List findByObservaciones(Object observaciones,
+ int... rowStartIdxAndCount) {
+ return findByProperty(OBSERVACIONES, observaciones, rowStartIdxAndCount);
+ }
+
+ public List findByObservaciones(Object observaciones) {
+ return findByProperty(OBSERVACIONES, observaciones);
+ }
+
+ public List findByPendiente(Object pendiente,
+ int... rowStartIdxAndCount) {
+ return findByProperty(PENDIENTE, pendiente, rowStartIdxAndCount);
+ }
+
+ public List findByPendiente(Object pendiente) {
+ return findByProperty(PENDIENTE, pendiente);
+ }
+
+ public List findByValorMovimiento(
+ Object valorMovimiento, int... rowStartIdxAndCount) {
+ return findByProperty(VALORMOVIMIENTO, valorMovimiento,
+ rowStartIdxAndCount);
+ }
+
+ public List findByValorMovimiento(
+ Object valorMovimiento) {
+ return findByProperty(VALORMOVIMIENTO, valorMovimiento);
+ }
+
+ public List findByValorPago(Object valorPago,
+ int... rowStartIdxAndCount) {
+ return findByProperty(VALORPAGO, valorPago, rowStartIdxAndCount);
+ }
+
+ public List findByValorPago(Object valorPago) {
+ return findByProperty(VALORPAGO, valorPago);
+ }
+
+ /**
+ * Find all CpDetalleMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpDetalleMovimiento entities
+ */
+ @SuppressWarnings("unchecked")
+ public List findAll(final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log("finding all CpDetalleMovimiento instances",
+ Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpDetalleMovimiento model";
+ Query query = getEntityManager().createQuery(queryString);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find all failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByCriteria(String whereCondition) {
+ EntityManagerHelper.log("finding CpDetalleMovimiento " +
+ whereCondition, Level.INFO, null);
+
+ try {
+ String where = ((whereCondition == null) ||
+ (whereCondition.length() == 0)) ? "" : ("where " +
+ whereCondition);
+ final String queryString = "select model from CpDetalleMovimiento model " +
+ where;
+ Query query = getEntityManager().createQuery(queryString);
+ List entitiesList = query.getResultList();
+
+ return entitiesList;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find By Criteria in CpDetalleMovimiento failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findPageCpDetalleMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults) {
+ EntityManagerHelper.log("finding CpDetalleMovimiento findPageCpDetalleMovimiento",
+ Level.INFO, null);
+
+ if ((sortColumnName != null) && (sortColumnName.length() > 0)) {
+ try {
+ String queryString = "select model from CpDetalleMovimiento model order by model." +
+ sortColumnName + " " + (sortAscending ? "asc" : "desc");
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ } else {
+ try {
+ String queryString = "select model from CpDetalleMovimiento model";
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Long findTotalNumberCpDetalleMovimiento() {
+ EntityManagerHelper.log("finding CpDetalleMovimiento count",
+ Level.INFO, null);
+
+ try {
+ String queryString = "select count(*) from CpDetalleMovimiento model";
+
+ return (Long) getEntityManager().createQuery(queryString)
+ .getSingleResult();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpGrupoMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpGrupoMovimientoDAO.java
new file mode 100644
index 0000000..753cc9b
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpGrupoMovimientoDAO.java
@@ -0,0 +1,375 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.personales.CpGrupoMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+
+/**
+* A data access object (DAO) providing persistence and search support for
+* CpGrupoMovimiento entities. Transaction control of the save(), update() and delete()
+* operations must be handled externally by senders of these methods or must be
+* manually added to each of these methods for data to be persisted to the JPA
+* datastore.
+*
+* @author Zathura Code Generator http://code.google.com/p/zathura
+* @see lidis.CpGrupoMovimiento
+*
+*/
+public class CpGrupoMovimientoDAO implements ICpGrupoMovimientoDAO {
+ private EntityManager getEntityManager() {
+ return EntityManagerHelper.getEntityManager();
+ }
+
+ /**
+ * Perform an initial save of a previously unsaved CpGrupoMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpGrupoMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpGrupoMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpGrupoMovimiento entity) {
+ EntityManagerHelper.log("saving CpGrupoMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ getEntityManager().persist(entity);
+ EntityManagerHelper.log("save successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("save failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Delete a persistent CpGrupoMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpGrupoMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpGrupoMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpGrupoMovimiento entity) {
+ EntityManagerHelper.log("deleting CpGrupoMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ entity = getEntityManager()
+ .getReference(CpGrupoMovimiento.class,
+ entity.getIdGrupoMovimiento());
+ getEntityManager().remove(entity);
+ EntityManagerHelper.log("delete successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("delete failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Persist a previously saved CpGrupoMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpGrupoMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = CpGrupoMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpGrupoMovimiento entity to update
+ * @return CpGrupoMovimiento the persisted CpGrupoMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpGrupoMovimiento update(CpGrupoMovimiento entity) {
+ EntityManagerHelper.log("updating CpGrupoMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ CpGrupoMovimiento result = getEntityManager()
+ .merge(entity);
+ EntityManagerHelper.log("update successful", Level.INFO, null);
+
+ return result;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("update failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public CpGrupoMovimiento findById(Long id) {
+ EntityManagerHelper.log("finding CpGrupoMovimiento instance with id: " +
+ id, Level.INFO, null);
+
+ try {
+ CpGrupoMovimiento instance = getEntityManager()
+ .find(CpGrupoMovimiento.class, id);
+
+ return instance;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpGrupoMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the metaData.name of the CpGrupoMovimiento property to query
+ * @param value
+ * the property value to match
+ * @return List< CpGrupoMovimiento> found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value) {
+ EntityManagerHelper.log(
+ "finding CpGrupoMovimiento instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpGrupoMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property metaData.name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpGrupoMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpGrupoMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * number of results to return.
+ * @return List found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value, final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log(
+ "finding CpGrupoMovimiento instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpGrupoMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByDescripcion(Object descripcion,
+ int... rowStartIdxAndCount) {
+ return findByProperty(DESCRIPCION, descripcion, rowStartIdxAndCount);
+ }
+
+ public List findByDescripcion(Object descripcion) {
+ return findByProperty(DESCRIPCION, descripcion);
+ }
+
+ public List findByIdGrupoMovimiento(
+ Object idGrupoMovimiento, int... rowStartIdxAndCount) {
+ return findByProperty(IDGRUPOMOVIMIENTO, idGrupoMovimiento,
+ rowStartIdxAndCount);
+ }
+
+ public List findByIdGrupoMovimiento(
+ Object idGrupoMovimiento) {
+ return findByProperty(IDGRUPOMOVIMIENTO, idGrupoMovimiento);
+ }
+
+ public List findByObservacion(Object observacion,
+ int... rowStartIdxAndCount) {
+ return findByProperty(OBSERVACION, observacion, rowStartIdxAndCount);
+ }
+
+ public List findByObservacion(Object observacion) {
+ return findByProperty(OBSERVACION, observacion);
+ }
+
+ /**
+ * Find all CpGrupoMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpGrupoMovimiento entities
+ */
+ @SuppressWarnings("unchecked")
+ public List findAll(final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log("finding all CpGrupoMovimiento instances",
+ Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpGrupoMovimiento model";
+ Query query = getEntityManager().createQuery(queryString);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find all failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByCriteria(String whereCondition) {
+ EntityManagerHelper.log("finding CpGrupoMovimiento " + whereCondition,
+ Level.INFO, null);
+
+ try {
+ String where = ((whereCondition == null) ||
+ (whereCondition.length() == 0)) ? "" : ("where " +
+ whereCondition);
+ final String queryString = "select model from CpGrupoMovimiento model " +
+ where;
+ Query query = getEntityManager().createQuery(queryString);
+ List entitiesList = query.getResultList();
+
+ return entitiesList;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find By Criteria in CpGrupoMovimiento failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findPageCpGrupoMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults) {
+ EntityManagerHelper.log("finding CpGrupoMovimiento findPageCpGrupoMovimiento",
+ Level.INFO, null);
+
+ if ((sortColumnName != null) && (sortColumnName.length() > 0)) {
+ try {
+ String queryString = "select model from CpGrupoMovimiento model order by model." +
+ sortColumnName + " " + (sortAscending ? "asc" : "desc");
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ } else {
+ try {
+ String queryString = "select model from CpGrupoMovimiento model";
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Long findTotalNumberCpGrupoMovimiento() {
+ EntityManagerHelper.log("finding CpGrupoMovimiento count", Level.INFO,
+ null);
+
+ try {
+ String queryString = "select count(*) from CpGrupoMovimiento model";
+
+ return (Long) getEntityManager().createQuery(queryString)
+ .getSingleResult();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpMovimientoDAO.java
new file mode 100644
index 0000000..d5069e3
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpMovimientoDAO.java
@@ -0,0 +1,371 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.personales.CpMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+
+/**
+* A data access object (DAO) providing persistence and search support for
+* CpMovimiento entities. Transaction control of the save(), update() and delete()
+* operations must be handled externally by senders of these methods or must be
+* manually added to each of these methods for data to be persisted to the JPA
+* datastore.
+*
+* @author Zathura Code Generator http://code.google.com/p/zathura
+* @see lidis.CpMovimiento
+*
+*/
+public class CpMovimientoDAO implements ICpMovimientoDAO {
+ private EntityManager getEntityManager() {
+ return EntityManagerHelper.getEntityManager();
+ }
+
+ /**
+ * Perform an initial save of a previously unsaved CpMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpMovimiento entity) {
+ EntityManagerHelper.log("saving CpMovimiento instance", Level.INFO, null);
+
+ try {
+ getEntityManager().persist(entity);
+ EntityManagerHelper.log("save successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("save failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Delete a persistent CpMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpMovimiento entity) {
+ EntityManagerHelper.log("deleting CpMovimiento instance", Level.INFO,
+ null);
+
+ try {
+ entity = getEntityManager()
+ .getReference(CpMovimiento.class,
+ entity.getIdMovimiento());
+ getEntityManager().remove(entity);
+ EntityManagerHelper.log("delete successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("delete failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Persist a previously saved CpMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = CpMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpMovimiento entity to update
+ * @return CpMovimiento the persisted CpMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpMovimiento update(CpMovimiento entity) {
+ EntityManagerHelper.log("updating CpMovimiento instance", Level.INFO,
+ null);
+
+ try {
+ CpMovimiento result = getEntityManager()
+ .merge(entity);
+ EntityManagerHelper.log("update successful", Level.INFO, null);
+
+ return result;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("update failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public CpMovimiento findById(Long id) {
+ EntityManagerHelper.log("finding CpMovimiento instance with id: " + id,
+ Level.INFO, null);
+
+ try {
+ CpMovimiento instance = getEntityManager()
+ .find(CpMovimiento.class, id);
+
+ return instance;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the metaData.name of the CpMovimiento property to query
+ * @param value
+ * the property value to match
+ * @return List< CpMovimiento> found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value) {
+ EntityManagerHelper.log(
+ "finding CpMovimiento instance with property: " + propertyName +
+ ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property metaData.name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * number of results to return.
+ * @return List found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value, final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log("finding CpMovimiento instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByDescripcionMovimiento(
+ Object descripcionMovimiento, int... rowStartIdxAndCount) {
+ return findByProperty(DESCRIPCIONMOVIMIENTO, descripcionMovimiento,
+ rowStartIdxAndCount);
+ }
+
+ public List findByDescripcionMovimiento(
+ Object descripcionMovimiento) {
+ return findByProperty(DESCRIPCIONMOVIMIENTO, descripcionMovimiento);
+ }
+
+ public List findByIdMovimiento(Object idMovimiento,
+ int... rowStartIdxAndCount) {
+ return findByProperty(IDMOVIMIENTO, idMovimiento, rowStartIdxAndCount);
+ }
+
+ public List findByIdMovimiento(Object idMovimiento) {
+ return findByProperty(IDMOVIMIENTO, idMovimiento);
+ }
+
+ public List findByObservaciones(Object observaciones,
+ int... rowStartIdxAndCount) {
+ return findByProperty(OBSERVACIONES, observaciones, rowStartIdxAndCount);
+ }
+
+ public List findByObservaciones(Object observaciones) {
+ return findByProperty(OBSERVACIONES, observaciones);
+ }
+
+ /**
+ * Find all CpMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpMovimiento entities
+ */
+ @SuppressWarnings("unchecked")
+ public List findAll(final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log("finding all CpMovimiento instances",
+ Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpMovimiento model";
+ Query query = getEntityManager().createQuery(queryString);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find all failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByCriteria(String whereCondition) {
+ EntityManagerHelper.log("finding CpMovimiento " + whereCondition,
+ Level.INFO, null);
+
+ try {
+ String where = ((whereCondition == null) ||
+ (whereCondition.length() == 0)) ? "" : ("where " +
+ whereCondition);
+ final String queryString = "select model from CpMovimiento model " +
+ where;
+ Query query = getEntityManager().createQuery(queryString);
+ List entitiesList = query.getResultList();
+
+ return entitiesList;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find By Criteria in CpMovimiento failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findPageCpMovimiento(String sortColumnName,
+ boolean sortAscending, int startRow, int maxResults) {
+ EntityManagerHelper.log("finding CpMovimiento findPageCpMovimiento",
+ Level.INFO, null);
+
+ if ((sortColumnName != null) && (sortColumnName.length() > 0)) {
+ try {
+ String queryString = "select model from CpMovimiento model order by model." +
+ sortColumnName + " " + (sortAscending ? "asc" : "desc");
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ } else {
+ try {
+ String queryString = "select model from CpMovimiento model";
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Long findTotalNumberCpMovimiento() {
+ EntityManagerHelper.log("finding CpMovimiento count", Level.INFO, null);
+
+ try {
+ String queryString = "select count(*) from CpMovimiento model";
+
+ return (Long) getEntityManager().createQuery(queryString)
+ .getSingleResult();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpTipoMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpTipoMovimientoDAO.java
new file mode 100644
index 0000000..9e81483
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpTipoMovimientoDAO.java
@@ -0,0 +1,375 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.personales.CpTipoMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+
+/**
+* A data access object (DAO) providing persistence and search support for
+* CpTipoMovimiento entities. Transaction control of the save(), update() and delete()
+* operations must be handled externally by senders of these methods or must be
+* manually added to each of these methods for data to be persisted to the JPA
+* datastore.
+*
+* @author Zathura Code Generator http://code.google.com/p/zathura
+* @see lidis.CpTipoMovimiento
+*
+*/
+public class CpTipoMovimientoDAO implements ICpTipoMovimientoDAO {
+ private EntityManager getEntityManager() {
+ return EntityManagerHelper.getEntityManager();
+ }
+
+ /**
+ * Perform an initial save of a previously unsaved CpTipoMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpTipoMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpTipoMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpTipoMovimiento entity) {
+ EntityManagerHelper.log("saving CpTipoMovimiento instance", Level.INFO,
+ null);
+
+ try {
+ getEntityManager().persist(entity);
+ EntityManagerHelper.log("save successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("save failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Delete a persistent CpTipoMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpTipoMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpTipoMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpTipoMovimiento entity) {
+ EntityManagerHelper.log("deleting CpTipoMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ entity = getEntityManager()
+ .getReference(CpTipoMovimiento.class,
+ entity.getIdTipoMovimiento());
+ getEntityManager().remove(entity);
+ EntityManagerHelper.log("delete successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("delete failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Persist a previously saved CpTipoMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpTipoMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = CpTipoMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpTipoMovimiento entity to update
+ * @return CpTipoMovimiento the persisted CpTipoMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpTipoMovimiento update(CpTipoMovimiento entity) {
+ EntityManagerHelper.log("updating CpTipoMovimiento instance",
+ Level.INFO, null);
+
+ try {
+ CpTipoMovimiento result = getEntityManager()
+ .merge(entity);
+ EntityManagerHelper.log("update successful", Level.INFO, null);
+
+ return result;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("update failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public CpTipoMovimiento findById(Long id) {
+ EntityManagerHelper.log("finding CpTipoMovimiento instance with id: " +
+ id, Level.INFO, null);
+
+ try {
+ CpTipoMovimiento instance = getEntityManager()
+ .find(CpTipoMovimiento.class, id);
+
+ return instance;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpTipoMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the metaData.name of the CpTipoMovimiento property to query
+ * @param value
+ * the property value to match
+ * @return List< CpTipoMovimiento> found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value) {
+ EntityManagerHelper.log(
+ "finding CpTipoMovimiento instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpTipoMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property metaData.name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpTipoMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpTipoMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * number of results to return.
+ * @return List found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value, final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log(
+ "finding CpTipoMovimiento instance with property: " + propertyName +
+ ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpTipoMovimiento model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByDescripcion(Object descripcion,
+ int... rowStartIdxAndCount) {
+ return findByProperty(DESCRIPCION, descripcion, rowStartIdxAndCount);
+ }
+
+ public List findByDescripcion(Object descripcion) {
+ return findByProperty(DESCRIPCION, descripcion);
+ }
+
+ public List findByIdTipoMovimiento(
+ Object idTipoMovimiento, int... rowStartIdxAndCount) {
+ return findByProperty(IDTIPOMOVIMIENTO, idTipoMovimiento,
+ rowStartIdxAndCount);
+ }
+
+ public List findByIdTipoMovimiento(
+ Object idTipoMovimiento) {
+ return findByProperty(IDTIPOMOVIMIENTO, idTipoMovimiento);
+ }
+
+ public List findByObservacion(Object observacion,
+ int... rowStartIdxAndCount) {
+ return findByProperty(OBSERVACION, observacion, rowStartIdxAndCount);
+ }
+
+ public List findByObservacion(Object observacion) {
+ return findByProperty(OBSERVACION, observacion);
+ }
+
+ /**
+ * Find all CpTipoMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpTipoMovimiento entities
+ */
+ @SuppressWarnings("unchecked")
+ public List findAll(final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log("finding all CpTipoMovimiento instances",
+ Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpTipoMovimiento model";
+ Query query = getEntityManager().createQuery(queryString);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find all failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByCriteria(String whereCondition) {
+ EntityManagerHelper.log("finding CpTipoMovimiento " + whereCondition,
+ Level.INFO, null);
+
+ try {
+ String where = ((whereCondition == null) ||
+ (whereCondition.length() == 0)) ? "" : ("where " +
+ whereCondition);
+ final String queryString = "select model from CpTipoMovimiento model " +
+ where;
+ Query query = getEntityManager().createQuery(queryString);
+ List entitiesList = query.getResultList();
+
+ return entitiesList;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find By Criteria in CpTipoMovimiento failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findPageCpTipoMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults) {
+ EntityManagerHelper.log("finding CpTipoMovimiento findPageCpTipoMovimiento",
+ Level.INFO, null);
+
+ if ((sortColumnName != null) && (sortColumnName.length() > 0)) {
+ try {
+ String queryString = "select model from CpTipoMovimiento model order by model." +
+ sortColumnName + " " + (sortAscending ? "asc" : "desc");
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ } else {
+ try {
+ String queryString = "select model from CpTipoMovimiento model";
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Long findTotalNumberCpTipoMovimiento() {
+ EntityManagerHelper.log("finding CpTipoMovimiento count", Level.INFO,
+ null);
+
+ try {
+ String queryString = "select count(*) from CpTipoMovimiento model";
+
+ return (Long) getEntityManager().createQuery(queryString)
+ .getSingleResult();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpUsuariosDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpUsuariosDAO.java
new file mode 100644
index 0000000..7fc6b4a
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/CpUsuariosDAO.java
@@ -0,0 +1,407 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.personales.CpUsuarios;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+
+/**
+* A data access object (DAO) providing persistence and search support for
+* CpUsuarios entities. Transaction control of the save(), update() and delete()
+* operations must be handled externally by senders of these methods or must be
+* manually added to each of these methods for data to be persisted to the JPA
+* datastore.
+*
+* @author Zathura Code Generator http://code.google.com/p/zathura
+* @see lidis.CpUsuarios
+*
+*/
+public class CpUsuariosDAO implements ICpUsuariosDAO {
+ private EntityManager getEntityManager() {
+ return EntityManagerHelper.getEntityManager();
+ }
+
+ /**
+ * Perform an initial save of a previously unsaved CpUsuarios entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpUsuariosDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpUsuarios entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpUsuarios entity) {
+ EntityManagerHelper.log("saving CpUsuarios instance", Level.INFO, null);
+
+ try {
+ getEntityManager().persist(entity);
+ EntityManagerHelper.log("save successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("save failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Delete a persistent CpUsuarios entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * CpUsuariosDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpUsuarios entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpUsuarios entity) {
+ EntityManagerHelper.log("deleting CpUsuarios instance", Level.INFO, null);
+
+ try {
+ entity = getEntityManager()
+ .getReference(CpUsuarios.class, entity.getIdUsuario());
+ getEntityManager().remove(entity);
+ EntityManagerHelper.log("delete successful", Level.INFO, null);
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("delete failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Persist a previously saved CpUsuarios entity and return it or a copy of it
+ * to the sender. A copy of the CpUsuarios entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = CpUsuariosDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpUsuarios entity to update
+ * @return CpUsuarios the persisted CpUsuarios entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpUsuarios update(CpUsuarios entity) {
+ EntityManagerHelper.log("updating CpUsuarios instance", Level.INFO, null);
+
+ try {
+ CpUsuarios result = getEntityManager().merge(entity);
+ EntityManagerHelper.log("update successful", Level.INFO, null);
+
+ return result;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("update failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public CpUsuarios findById(Long id) {
+ EntityManagerHelper.log("finding CpUsuarios instance with id: " + id,
+ Level.INFO, null);
+
+ try {
+ CpUsuarios instance = getEntityManager().find(CpUsuarios.class, id);
+
+ return instance;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpUsuarios entities with a specific property value.
+ *
+ * @param propertyName
+ * the metaData.name of the CpUsuarios property to query
+ * @param value
+ * the property value to match
+ * @return List< CpUsuarios> found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value) {
+ EntityManagerHelper.log("finding CpUsuarios instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpUsuarios model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property metaData.name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ /**
+ * Find all CpUsuarios entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpUsuarios property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * number of results to return.
+ * @return List found by query
+ */
+ @SuppressWarnings("unchecked")
+ public List findByProperty(String propertyName,
+ final Object value, final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log("finding CpUsuarios instance with property: " +
+ propertyName + ", value: " + value, Level.INFO, null);
+
+ try {
+ final String queryString = "select model from CpUsuarios model where model." +
+ propertyName + "= :propertyValue";
+ Query query = getEntityManager().createQuery(queryString);
+ query.setParameter("propertyValue", value);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find by property name failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByActivo(Object activo,
+ int... rowStartIdxAndCount) {
+ return findByProperty(ACTIVO, activo, rowStartIdxAndCount);
+ }
+
+ public List findByActivo(Object activo) {
+ return findByProperty(ACTIVO, activo);
+ }
+
+ public List findByApellido(Object apellido,
+ int... rowStartIdxAndCount) {
+ return findByProperty(APELLIDO, apellido, rowStartIdxAndCount);
+ }
+
+ public List findByApellido(Object apellido) {
+ return findByProperty(APELLIDO, apellido);
+ }
+
+ public List findByContrasena(Object contrasena,
+ int... rowStartIdxAndCount) {
+ return findByProperty(CONTRASENA, contrasena, rowStartIdxAndCount);
+ }
+
+ public List findByContrasena(Object contrasena) {
+ return findByProperty(CONTRASENA, contrasena);
+ }
+
+ public List findByCorreo(Object correo,
+ int... rowStartIdxAndCount) {
+ return findByProperty(CORREO, correo, rowStartIdxAndCount);
+ }
+
+ public List findByCorreo(Object correo) {
+ return findByProperty(CORREO, correo);
+ }
+
+ public List findByIdUsuario(Object idUsuario,
+ int... rowStartIdxAndCount) {
+ return findByProperty(IDUSUARIO, idUsuario, rowStartIdxAndCount);
+ }
+
+ public List findByIdUsuario(Object idUsuario) {
+ return findByProperty(IDUSUARIO, idUsuario);
+ }
+
+ public List findByMovil(Object movil, int... rowStartIdxAndCount) {
+ return findByProperty(MOVIL, movil, rowStartIdxAndCount);
+ }
+
+ public List findByMovil(Object movil) {
+ return findByProperty(MOVIL, movil);
+ }
+
+ public List findByNombre(Object nombre,
+ int... rowStartIdxAndCount) {
+ return findByProperty(NOMBRE, nombre, rowStartIdxAndCount);
+ }
+
+ public List findByNombre(Object nombre) {
+ return findByProperty(NOMBRE, nombre);
+ }
+
+ public List findByObservaciones(Object observaciones,
+ int... rowStartIdxAndCount) {
+ return findByProperty(OBSERVACIONES, observaciones, rowStartIdxAndCount);
+ }
+
+ public List findByObservaciones(Object observaciones) {
+ return findByProperty(OBSERVACIONES, observaciones);
+ }
+
+ /**
+ * Find all CpUsuarios entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpUsuarios entities
+ */
+ @SuppressWarnings("unchecked")
+ public List findAll(final int... rowStartIdxAndCount) {
+ EntityManagerHelper.log("finding all CpUsuarios instances", Level.INFO,
+ null);
+
+ try {
+ final String queryString = "select model from CpUsuarios model";
+ Query query = getEntityManager().createQuery(queryString);
+
+ if ((rowStartIdxAndCount != null) &&
+ (rowStartIdxAndCount.length > 0)) {
+ int rowStartIdx = Math.max(0, rowStartIdxAndCount[0]);
+
+ if (rowStartIdx > 0) {
+ query.setFirstResult(rowStartIdx);
+ }
+
+ if (rowStartIdxAndCount.length > 1) {
+ int rowCount = Math.max(0, rowStartIdxAndCount[1]);
+
+ if (rowCount > 0) {
+ query.setMaxResults(rowCount);
+ }
+ }
+ }
+
+ return query.getResultList();
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find all failed", Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findByCriteria(String whereCondition) {
+ EntityManagerHelper.log("finding CpUsuarios " + whereCondition,
+ Level.INFO, null);
+
+ try {
+ String where = ((whereCondition == null) ||
+ (whereCondition.length() == 0)) ? "" : ("where " +
+ whereCondition);
+ final String queryString = "select model from CpUsuarios model " +
+ where;
+ Query query = getEntityManager().createQuery(queryString);
+ List entitiesList = query.getResultList();
+
+ return entitiesList;
+ } catch (RuntimeException re) {
+ EntityManagerHelper.log("find By Criteria in CpUsuarios failed",
+ Level.SEVERE, re);
+ throw re;
+ }
+ }
+
+ public List findPageCpUsuarios(String sortColumnName,
+ boolean sortAscending, int startRow, int maxResults) {
+ EntityManagerHelper.log("finding CpUsuarios findPageCpUsuarios",
+ Level.INFO, null);
+
+ if ((sortColumnName != null) && (sortColumnName.length() > 0)) {
+ try {
+ String queryString = "select model from CpUsuarios model order by model." +
+ sortColumnName + " " + (sortAscending ? "asc" : "desc");
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ } else {
+ try {
+ String queryString = "select model from CpUsuarios model";
+
+ return getEntityManager().createQuery(queryString)
+ .setFirstResult(startRow).setMaxResults(maxResults)
+ .getResultList();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Long findTotalNumberCpUsuarios() {
+ EntityManagerHelper.log("finding CpUsuarios count", Level.INFO, null);
+
+ try {
+ String queryString = "select count(*) from CpUsuarios model";
+
+ return (Long) getEntityManager().createQuery(queryString)
+ .getSingleResult();
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpDetalleMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpDetalleMovimientoDAO.java
new file mode 100644
index 0000000..2d7bafd
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpDetalleMovimientoDAO.java
@@ -0,0 +1,192 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.personales.CpDetalleMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * Interface for CpDetalleMovimientoDAO.
+ *
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ */
+public interface ICpDetalleMovimientoDAO {
+ // property constants
+ //public static final Long ANNO = "anno";
+ public static final String ANNO = "anno";
+
+ //public static final Date FEHCAREGISTRO = "fehcaRegistro";
+ public static final String FEHCAREGISTRO = "fehcaRegistro";
+
+ //public static final Long IDDETALLEMOVIMIENTO = "idDetalleMovimiento";
+ public static final String IDDETALLEMOVIMIENTO = "idDetalleMovimiento";
+
+ //public static final Long MES = "mes";
+ public static final String MES = "mes";
+
+ //public static final String OBSERVACIONES = "observaciones";
+ public static final String OBSERVACIONES = "observaciones";
+
+ //public static final String PENDIENTE = "pendiente";
+ public static final String PENDIENTE = "pendiente";
+
+ //public static final Long VALORMOVIMIENTO = "valorMovimiento";
+ public static final String VALORMOVIMIENTO = "valorMovimiento";
+
+ //public static final Long VALORPAGO = "valorPago";
+ public static final String VALORPAGO = "valorPago";
+
+ /**
+ * Perform an initial save of a previously unsaved CpDetalleMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpDetalleMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpDetalleMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpDetalleMovimiento entity);
+
+ /**
+ * Delete a persistent CpDetalleMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpDetalleMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpDetalleMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpDetalleMovimiento entity);
+
+ /**
+ * Persist a previously saved CpDetalleMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpDetalleMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = ICpDetalleMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpDetalleMovimiento entity to update
+ * @return CpDetalleMovimiento the persisted CpDetalleMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpDetalleMovimiento update(CpDetalleMovimiento entity);
+
+ public CpDetalleMovimiento findById(Long id);
+
+ /**
+ * Find all CpDetalleMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpDetalleMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List found by query
+ */
+ public List findByProperty(String propertyName,
+ Object value, int... rowStartIdxAndCount);
+
+ public List findByCriteria(String whereCondition);
+
+ public List findByAnno(Object anno);
+
+ public List findByAnno(Object anno,
+ int... rowStartIdxAndCount);
+
+ public List findByFehcaRegistro(Object fehcaRegistro);
+
+ public List findByFehcaRegistro(Object fehcaRegistro,
+ int... rowStartIdxAndCount);
+
+ public List findByIdDetalleMovimiento(
+ Object idDetalleMovimiento);
+
+ public List findByIdDetalleMovimiento(
+ Object idDetalleMovimiento, int... rowStartIdxAndCount);
+
+ public List findByMes(Object mes);
+
+ public List findByMes(Object mes,
+ int... rowStartIdxAndCount);
+
+ public List findByObservaciones(Object observaciones);
+
+ public List findByObservaciones(Object observaciones,
+ int... rowStartIdxAndCount);
+
+ public List findByPendiente(Object pendiente);
+
+ public List findByPendiente(Object pendiente,
+ int... rowStartIdxAndCount);
+
+ public List findByValorMovimiento(
+ Object valorMovimiento);
+
+ public List findByValorMovimiento(
+ Object valorMovimiento, int... rowStartIdxAndCount);
+
+ public List findByValorPago(Object valorPago);
+
+ public List findByValorPago(Object valorPago,
+ int... rowStartIdxAndCount);
+
+ /**
+ * Find all CpDetalleMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpDetalleMovimiento entities
+ */
+ public List findAll(int... rowStartIdxAndCount);
+
+ public List findPageCpDetalleMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults);
+
+ public Long findTotalNumberCpDetalleMovimiento();
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpGrupoMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpGrupoMovimientoDAO.java
new file mode 100644
index 0000000..ee13fc6
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpGrupoMovimientoDAO.java
@@ -0,0 +1,151 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.personales.CpGrupoMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * Interface for CpGrupoMovimientoDAO.
+ *
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ */
+public interface ICpGrupoMovimientoDAO {
+ // property constants
+ //public static final String DESCRIPCION = "descripcion";
+ public static final String DESCRIPCION = "descripcion";
+
+ //public static final Long IDGRUPOMOVIMIENTO = "idGrupoMovimiento";
+ public static final String IDGRUPOMOVIMIENTO = "idGrupoMovimiento";
+
+ //public static final String OBSERVACION = "observacion";
+ public static final String OBSERVACION = "observacion";
+
+ /**
+ * Perform an initial save of a previously unsaved CpGrupoMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpGrupoMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpGrupoMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpGrupoMovimiento entity);
+
+ /**
+ * Delete a persistent CpGrupoMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpGrupoMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpGrupoMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpGrupoMovimiento entity);
+
+ /**
+ * Persist a previously saved CpGrupoMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpGrupoMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = ICpGrupoMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpGrupoMovimiento entity to update
+ * @return CpGrupoMovimiento the persisted CpGrupoMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpGrupoMovimiento update(CpGrupoMovimiento entity);
+
+ public CpGrupoMovimiento findById(Long id);
+
+ /**
+ * Find all CpGrupoMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpGrupoMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List found by query
+ */
+ public List findByProperty(String propertyName,
+ Object value, int... rowStartIdxAndCount);
+
+ public List findByCriteria(String whereCondition);
+
+ public List findByDescripcion(Object descripcion);
+
+ public List findByDescripcion(Object descripcion,
+ int... rowStartIdxAndCount);
+
+ public List findByIdGrupoMovimiento(
+ Object idGrupoMovimiento);
+
+ public List findByIdGrupoMovimiento(
+ Object idGrupoMovimiento, int... rowStartIdxAndCount);
+
+ public List findByObservacion(Object observacion);
+
+ public List findByObservacion(Object observacion,
+ int... rowStartIdxAndCount);
+
+ /**
+ * Find all CpGrupoMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpGrupoMovimiento entities
+ */
+ public List findAll(int... rowStartIdxAndCount);
+
+ public List findPageCpGrupoMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults);
+
+ public Long findTotalNumberCpGrupoMovimiento();
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpMovimientoDAO.java
new file mode 100644
index 0000000..541cde2
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpMovimientoDAO.java
@@ -0,0 +1,150 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.personales.CpMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * Interface for CpMovimientoDAO.
+ *
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ */
+public interface ICpMovimientoDAO {
+ // property constants
+ //public static final String DESCRIPCIONMOVIMIENTO = "descripcionMovimiento";
+ public static final String DESCRIPCIONMOVIMIENTO = "descripcionMovimiento";
+
+ //public static final Long IDMOVIMIENTO = "idMovimiento";
+ public static final String IDMOVIMIENTO = "idMovimiento";
+
+ //public static final String OBSERVACIONES = "observaciones";
+ public static final String OBSERVACIONES = "observaciones";
+
+ /**
+ * Perform an initial save of a previously unsaved CpMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpMovimiento entity);
+
+ /**
+ * Delete a persistent CpMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpMovimiento entity);
+
+ /**
+ * Persist a previously saved CpMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = ICpMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpMovimiento entity to update
+ * @return CpMovimiento the persisted CpMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpMovimiento update(CpMovimiento entity);
+
+ public CpMovimiento findById(Long id);
+
+ /**
+ * Find all CpMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List found by query
+ */
+ public List findByProperty(String propertyName, Object value,
+ int... rowStartIdxAndCount);
+
+ public List findByCriteria(String whereCondition);
+
+ public List findByDescripcionMovimiento(
+ Object descripcionMovimiento);
+
+ public List findByDescripcionMovimiento(
+ Object descripcionMovimiento, int... rowStartIdxAndCount);
+
+ public List findByIdMovimiento(Object idMovimiento);
+
+ public List findByIdMovimiento(Object idMovimiento,
+ int... rowStartIdxAndCount);
+
+ public List findByObservaciones(Object observaciones);
+
+ public List findByObservaciones(Object observaciones,
+ int... rowStartIdxAndCount);
+
+ /**
+ * Find all CpMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpMovimiento entities
+ */
+ public List findAll(int... rowStartIdxAndCount);
+
+ public List findPageCpMovimiento(String sortColumnName,
+ boolean sortAscending, int startRow, int maxResults);
+
+ public Long findTotalNumberCpMovimiento();
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpTipoMovimientoDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpTipoMovimientoDAO.java
new file mode 100644
index 0000000..38bf7f1
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpTipoMovimientoDAO.java
@@ -0,0 +1,151 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.personales.CpTipoMovimiento;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * Interface for CpTipoMovimientoDAO.
+ *
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ */
+public interface ICpTipoMovimientoDAO {
+ // property constants
+ //public static final String DESCRIPCION = "descripcion";
+ public static final String DESCRIPCION = "descripcion";
+
+ //public static final Long IDTIPOMOVIMIENTO = "idTipoMovimiento";
+ public static final String IDTIPOMOVIMIENTO = "idTipoMovimiento";
+
+ //public static final String OBSERVACION = "observacion";
+ public static final String OBSERVACION = "observacion";
+
+ /**
+ * Perform an initial save of a previously unsaved CpTipoMovimiento entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpTipoMovimientoDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpTipoMovimiento entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpTipoMovimiento entity);
+
+ /**
+ * Delete a persistent CpTipoMovimiento entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpTipoMovimientoDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpTipoMovimiento entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpTipoMovimiento entity);
+
+ /**
+ * Persist a previously saved CpTipoMovimiento entity and return it or a copy of it
+ * to the sender. A copy of the CpTipoMovimiento entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = ICpTipoMovimientoDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpTipoMovimiento entity to update
+ * @return CpTipoMovimiento the persisted CpTipoMovimiento entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpTipoMovimiento update(CpTipoMovimiento entity);
+
+ public CpTipoMovimiento findById(Long id);
+
+ /**
+ * Find all CpTipoMovimiento entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpTipoMovimiento property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List found by query
+ */
+ public List findByProperty(String propertyName,
+ Object value, int... rowStartIdxAndCount);
+
+ public List findByCriteria(String whereCondition);
+
+ public List findByDescripcion(Object descripcion);
+
+ public List findByDescripcion(Object descripcion,
+ int... rowStartIdxAndCount);
+
+ public List findByIdTipoMovimiento(
+ Object idTipoMovimiento);
+
+ public List findByIdTipoMovimiento(
+ Object idTipoMovimiento, int... rowStartIdxAndCount);
+
+ public List findByObservacion(Object observacion);
+
+ public List findByObservacion(Object observacion,
+ int... rowStartIdxAndCount);
+
+ /**
+ * Find all CpTipoMovimiento entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpTipoMovimiento entities
+ */
+ public List findAll(int... rowStartIdxAndCount);
+
+ public List findPageCpTipoMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults);
+
+ public Long findTotalNumberCpTipoMovimiento();
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpUsuariosDAO.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpUsuariosDAO.java
new file mode 100644
index 0000000..22a66f5
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/dao/ICpUsuariosDAO.java
@@ -0,0 +1,188 @@
+package org.zathura.cuentas.dataaccess.dao;
+
+import org.zathura.cuentas.personales.CpUsuarios;
+
+import java.math.BigDecimal;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * Interface for CpUsuariosDAO.
+ *
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ */
+public interface ICpUsuariosDAO {
+ // property constants
+ //public static final String ACTIVO = "activo";
+ public static final String ACTIVO = "activo";
+
+ //public static final String APELLIDO = "apellido";
+ public static final String APELLIDO = "apellido";
+
+ //public static final String CONTRASENA = "contrasena";
+ public static final String CONTRASENA = "contrasena";
+
+ //public static final String CORREO = "correo";
+ public static final String CORREO = "correo";
+
+ //public static final Long IDUSUARIO = "idUsuario";
+ public static final String IDUSUARIO = "idUsuario";
+
+ //public static final Long MOVIL = "movil";
+ public static final String MOVIL = "movil";
+
+ //public static final String NOMBRE = "nombre";
+ public static final String NOMBRE = "nombre";
+
+ //public static final String OBSERVACIONES = "observaciones";
+ public static final String OBSERVACIONES = "observaciones";
+
+ /**
+ * Perform an initial save of a previously unsaved CpUsuarios entity. All
+ * subsequent persist actions of this entity should use the #update()
+ * method. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpUsuariosDAO.save(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpUsuarios entity to persist
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void save(CpUsuarios entity);
+
+ /**
+ * Delete a persistent CpUsuarios entity. This operation must be performed
+ * within the a database transaction context for the entity's data to be
+ * permanently deleted from the persistence store, i.e., database. This
+ * method uses the
+ * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * ICpUsuariosDAO.delete(entity);
+ * EntityManagerHelper.commit();
+ * entity = null;
+ *
+ *
+ * @param entity
+ * CpUsuarios entity to delete
+ * @throws RuntimeException
+ * when the operation fails
+ */
+ public void delete(CpUsuarios entity);
+
+ /**
+ * Persist a previously saved CpUsuarios entity and return it or a copy of it
+ * to the sender. A copy of the CpUsuarios entity parameter is returned when
+ * the JPA persistence mechanism has not previously been tracking the
+ * updated entity. This operation must be performed within the a database
+ * transaction context for the entity's data to be permanently saved to the
+ * persistence store, i.e., database. This method uses the
+ * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
+ * operation.
+ *
+ *
+ * EntityManagerHelper.beginTransaction();
+ * entity = ICpUsuariosDAO.update(entity);
+ * EntityManagerHelper.commit();
+ *
+ *
+ * @param entity
+ * CpUsuarios entity to update
+ * @return CpUsuarios the persisted CpUsuarios entity instance, may not be the
+ * same
+ * @throws RuntimeException
+ * if the operation fails
+ */
+ public CpUsuarios update(CpUsuarios entity);
+
+ public CpUsuarios findById(Long id);
+
+ /**
+ * Find all CpUsuarios entities with a specific property value.
+ *
+ * @param propertyName
+ * the name of the CpUsuarios property to query
+ * @param value
+ * the property value to match
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List found by query
+ */
+ public List findByProperty(String propertyName, Object value,
+ int... rowStartIdxAndCount);
+
+ public List findByCriteria(String whereCondition);
+
+ public List findByActivo(Object activo);
+
+ public List findByActivo(Object activo,
+ int... rowStartIdxAndCount);
+
+ public List findByApellido(Object apellido);
+
+ public List findByApellido(Object apellido,
+ int... rowStartIdxAndCount);
+
+ public List findByContrasena(Object contrasena);
+
+ public List findByContrasena(Object contrasena,
+ int... rowStartIdxAndCount);
+
+ public List findByCorreo(Object correo);
+
+ public List findByCorreo(Object correo,
+ int... rowStartIdxAndCount);
+
+ public List findByIdUsuario(Object idUsuario);
+
+ public List findByIdUsuario(Object idUsuario,
+ int... rowStartIdxAndCount);
+
+ public List findByMovil(Object movil);
+
+ public List findByMovil(Object movil, int... rowStartIdxAndCount);
+
+ public List findByNombre(Object nombre);
+
+ public List findByNombre(Object nombre,
+ int... rowStartIdxAndCount);
+
+ public List findByObservaciones(Object observaciones);
+
+ public List findByObservaciones(Object observaciones,
+ int... rowStartIdxAndCount);
+
+ /**
+ * Find all CpUsuarios entities.
+ *
+ * @param rowStartIdxAndCount
+ * Optional int varargs. rowStartIdxAndCount[0] specifies the the
+ * row index in the query result-set to begin collecting the
+ * results. rowStartIdxAndCount[1] specifies the the maximum
+ * count of results to return.
+ * @return List all CpUsuarios entities
+ */
+ public List findAll(int... rowStartIdxAndCount);
+
+ public List findPageCpUsuarios(String sortColumnName,
+ boolean sortAscending, int startRow, int maxResults);
+
+ public Long findTotalNumberCpUsuarios();
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/daoFactory/JPADaoFactory.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/daoFactory/JPADaoFactory.java
new file mode 100644
index 0000000..775d19e
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/daoFactory/JPADaoFactory.java
@@ -0,0 +1,66 @@
+package org.zathura.cuentas.dataaccess.daoFactory;
+import org.zathura.cuentas.dataaccess.dao.*;
+/**
+ * Factory for Data Access Objects Strategy The DAO pattern can be made highly flexible
+ * by adopting the Abstract Factory [GoF] and the Factory Method [GoF] patterns.
+ * When the underlying storage is not subject to change from one implementation to another,
+ * this strategy can be implemented using the Factory Method pattern to produce a number of DAOs needed by the application.
+ * This class is a Factory Method pattern
+ *
+ * @author Zathura Code Generator http://code.google.com/p/zathura/
+ */
+public class JPADaoFactory {
+private static JPADaoFactory instance = null;
+/**
+*
+* @return JPADaoFactory
+*/
+public static JPADaoFactory getInstance(){
+if(instance == null){
+instance = new JPADaoFactory();
+}
+return instance;
+}
+private JPADaoFactory(){
+}
+ /**
+ * This method instantiates the ICpDetalleMovimientoDAO class for JPA
+ * that is used in this applications deployment environment to access the data.
+ * @return ICpDetalleMovimientoDAO implementation
+ */
+ public ICpDetalleMovimientoDAO getCpDetalleMovimientoDAO() {
+ return new CpDetalleMovimientoDAO();
+ }
+ /**
+ * This method instantiates the ICpGrupoMovimientoDAO class for JPA
+ * that is used in this applications deployment environment to access the data.
+ * @return ICpGrupoMovimientoDAO implementation
+ */
+ public ICpGrupoMovimientoDAO getCpGrupoMovimientoDAO() {
+ return new CpGrupoMovimientoDAO();
+ }
+ /**
+ * This method instantiates the ICpMovimientoDAO class for JPA
+ * that is used in this applications deployment environment to access the data.
+ * @return ICpMovimientoDAO implementation
+ */
+ public ICpMovimientoDAO getCpMovimientoDAO() {
+ return new CpMovimientoDAO();
+ }
+ /**
+ * This method instantiates the ICpTipoMovimientoDAO class for JPA
+ * that is used in this applications deployment environment to access the data.
+ * @return ICpTipoMovimientoDAO implementation
+ */
+ public ICpTipoMovimientoDAO getCpTipoMovimientoDAO() {
+ return new CpTipoMovimientoDAO();
+ }
+ /**
+ * This method instantiates the ICpUsuariosDAO class for JPA
+ * that is used in this applications deployment environment to access the data.
+ * @return ICpUsuariosDAO implementation
+ */
+ public ICpUsuariosDAO getCpUsuariosDAO() {
+ return new CpUsuariosDAO();
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/entityManager/EntityManagerHelper.java b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/entityManager/EntityManagerHelper.java
new file mode 100644
index 0000000..ef7afd5
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/dataaccess/entityManager/EntityManagerHelper.java
@@ -0,0 +1,75 @@
+package org.zathura.cuentas.dataaccess.entityManager;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+import javax.persistence.Query;
+
+
+/**
+*
+* @author Zathura Code Generator http://code.google.com/p/zathura
+*
+*/
+public class EntityManagerHelper {
+ private static final EntityManagerFactory emf;
+ private static final ThreadLocal threadLocal;
+ private static final Logger logger;
+
+ static {
+ emf = Persistence.createEntityManagerFactory("CuentasPersonalesPU");
+ threadLocal = new ThreadLocal();
+ logger = Logger.getLogger("CuentasPersonalesPU");
+ logger.setLevel(Level.ALL);
+ }
+
+ public static EntityManager getEntityManager() {
+ EntityManager manager = threadLocal.get();
+
+ if ((manager == null) || !manager.isOpen()) {
+ manager = emf.createEntityManager();
+ threadLocal.set(manager);
+ }
+
+ return manager;
+ }
+
+ public static void closeEntityManager() {
+ EntityManager em = threadLocal.get();
+ threadLocal.set(null);
+
+ if (em != null) {
+ em.close();
+ }
+ }
+
+ public static void beginTransaction() {
+ getEntityManager().getTransaction().begin();
+ }
+
+ public static void commit() {
+ getEntityManager().getTransaction().commit();
+ }
+
+ public static void rollback() {
+ if ((getEntityManager().getTransaction() != null) &&
+ (getEntityManager().getTransaction().isActive() == true)) {
+ getEntityManager().getTransaction().rollback();
+ }
+ }
+
+ public static Query createQuery(String query) {
+ return getEntityManager().createQuery(query);
+ }
+
+ public static void flush() {
+ getEntityManager().flush();
+ }
+
+ public static void log(String info, Level level, Throwable ex) {
+ logger.log(level, info, ex);
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/exceptions/ZMessManager.java b/CuentasPersonales/generado/org/zathura/cuentas/exceptions/ZMessManager.java
new file mode 100644
index 0000000..f081ae3
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/exceptions/ZMessManager.java
@@ -0,0 +1,81 @@
+package org.zathura.cuentas.exceptions;
+
+public class ZMessManager extends Exception {
+ private static final long serialVersionUID = 1L;
+ public final static String ALL = "All ";
+ public final static String ENTCHILD = "related tables(childs)";
+ public final static String FOREIGNDATA = "foreign classes data: ";
+ public static String ENTITY_SUCCESFULLYSAVED = "Entity succesfully saved";
+ public static String ENTITY_SUCCESFULLYDELETED = "Entity succesfully deleted";
+ public static String ENTITY_SUCCESFULLYMODIFIED = "Entity succesfully modified";
+ public static String ENTITY_WITHSAMEKEY = "Another Entity with the same key was found";
+ public static String ENTITY_NOENTITYTOUPDATE = "No Entity was found, with the typed key ";
+
+ public ZMessManager() {
+ }
+
+ public ZMessManager(String exception) {
+ super(exception);
+ }
+
+ public class NotValidFieldException extends ZMessManager {
+ private static final long serialVersionUID = 1L;
+
+ public NotValidFieldException(String info) {
+ super("The value for the field: \"" + info + "\" is not valid");
+ }
+ }
+
+ public class EmptyFieldException extends ZMessManager {
+ private static final long serialVersionUID = 1L;
+
+ public EmptyFieldException(String info) {
+ super("The value for the field: \"" + info +
+ "\" cant be null or empty");
+ }
+ }
+
+ public class NotValidFormatException extends ZMessManager {
+ private static final long serialVersionUID = 1L;
+
+ public NotValidFormatException(String info) {
+ super("The Format or length for the field: \"" + info +
+ "\" is not valid");
+ }
+ }
+
+ public class DeletingException extends ZMessManager {
+ private static final long serialVersionUID = 1L;
+
+ public DeletingException(String info) {
+ super("The Entity you are trying to delete " +
+ "may have related information, " +
+ "please before trying again, " +
+ "check the data on the entity, \"" + info + "\"");
+ }
+ }
+
+ public class ForeignException extends ZMessManager {
+ private static final long serialVersionUID = 1L;
+
+ public ForeignException(String info) {
+ super("There was no data related with the input \"" + info + "\"");
+ }
+ }
+
+ public class GettingException extends ZMessManager {
+ private static final long serialVersionUID = 1L;
+
+ public GettingException(String info) {
+ super("There was an exception getting " + info);
+ }
+ }
+
+ public class FindingException extends ZMessManager {
+ private static final long serialVersionUID = 1L;
+
+ public FindingException(String info) {
+ super("There was an exception trying to find " + info);
+ }
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/CpDetalleMovimiento.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpDetalleMovimiento.java
new file mode 100644
index 0000000..7b4690a
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpDetalleMovimiento.java
@@ -0,0 +1,153 @@
+package org.zathura.cuentas.personales;
+// Generated 4/04/2012 12:36:59 PM by Zathura powered by Hibernate Tools 3.2.4.GA
+
+
+import java.util.Date;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * CpDetalleMovimiento generated by Zathura powered by Hibernate-tools(hbm2java)
+ */
+@Entity
+@Table(name="CP_DETALLE_MOVIMIENTO"
+ ,schema="CUENTAPERSONAL"
+)
+@SequenceGenerator(name = "detallemovimintoIdSec", sequenceName = "SEC_CPDETALLEMOVIMIENTO")
+public class CpDetalleMovimiento implements java.io.Serializable {
+
+
+ private Long idDetalleMovimiento;
+ private CpMovimiento cpMovimiento;
+ private Long anno;
+ private Long mes;
+ private Long valorMovimiento;
+ private Long valorPago;
+ private String pendiente;
+ private Date fehcaRegistro;
+ private String observaciones;
+
+ public CpDetalleMovimiento() {
+ }
+
+
+ public CpDetalleMovimiento(Long idDetalleMovimiento, CpMovimiento cpMovimiento) {
+ this.idDetalleMovimiento = idDetalleMovimiento;
+ this.cpMovimiento = cpMovimiento;
+ }
+ public CpDetalleMovimiento(Long idDetalleMovimiento, CpMovimiento cpMovimiento, Long anno, Long mes, Long valorMovimiento, Long valorPago, String pendiente, Date fehcaRegistro, String observaciones) {
+ this.idDetalleMovimiento = idDetalleMovimiento;
+ this.cpMovimiento = cpMovimiento;
+ this.anno = anno;
+ this.mes = mes;
+ this.valorMovimiento = valorMovimiento;
+ this.valorPago = valorPago;
+ this.pendiente = pendiente;
+ this.fehcaRegistro = fehcaRegistro;
+ this.observaciones = observaciones;
+ }
+
+ @Id
+ @GeneratedValue(generator = "detallemovimintoIdSec")
+ @Column(name="ID_DETALLE_MOVIMIENTO", unique=true, nullable=false, precision=22, scale=0)
+ public Long getIdDetalleMovimiento() {
+ return this.idDetalleMovimiento;
+ }
+
+ public void setIdDetalleMovimiento(Long idDetalleMovimiento) {
+ this.idDetalleMovimiento = idDetalleMovimiento;
+ }
+
+@ManyToOne(fetch=FetchType.LAZY)
+ @JoinColumn(name="ID_MOVIMIENTO", nullable=false)
+ public CpMovimiento getCpMovimiento() {
+ return this.cpMovimiento;
+ }
+
+ public void setCpMovimiento(CpMovimiento cpMovimiento) {
+ this.cpMovimiento = cpMovimiento;
+ }
+
+
+ @Column(name="ANNO", precision=22, scale=0)
+ public Long getAnno() {
+ return this.anno;
+ }
+
+ public void setAnno(Long anno) {
+ this.anno = anno;
+ }
+
+
+ @Column(name="MES", precision=22, scale=0)
+ public Long getMes() {
+ return this.mes;
+ }
+
+ public void setMes(Long mes) {
+ this.mes = mes;
+ }
+
+
+ @Column(name="VALOR_MOVIMIENTO", precision=22, scale=0)
+ public Long getValorMovimiento() {
+ return this.valorMovimiento;
+ }
+
+ public void setValorMovimiento(Long valorMovimiento) {
+ this.valorMovimiento = valorMovimiento;
+ }
+
+
+ @Column(name="VALOR_PAGO", precision=22, scale=0)
+ public Long getValorPago() {
+ return this.valorPago;
+ }
+
+ public void setValorPago(Long valorPago) {
+ this.valorPago = valorPago;
+ }
+
+
+ @Column(name="PENDIENTE", length=1)
+ public String getPendiente() {
+ return this.pendiente;
+ }
+
+ public void setPendiente(String pendiente) {
+ this.pendiente = pendiente;
+ }
+
+
+ @Column(name="FEHCA_REGISTRO", length=7)
+ public Date getFehcaRegistro() {
+ return this.fehcaRegistro;
+ }
+
+ public void setFehcaRegistro(Date fehcaRegistro) {
+ this.fehcaRegistro = fehcaRegistro;
+ }
+
+
+ @Column(name="OBSERVACIONES", length=100)
+ public String getObservaciones() {
+ return this.observaciones;
+ }
+
+ public void setObservaciones(String observaciones) {
+ this.observaciones = observaciones;
+ }
+
+
+
+
+}
+
+
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/CpGrupoMovimiento.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpGrupoMovimiento.java
new file mode 100644
index 0000000..14e2259
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpGrupoMovimiento.java
@@ -0,0 +1,104 @@
+package org.zathura.cuentas.personales;
+// Generated 4/04/2012 12:36:59 PM by Zathura powered by Hibernate Tools 3.2.4.GA
+
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * CpGrupoMovimiento generated by Zathura powered by Hibernate-tools(hbm2java)
+ */
+@Entity
+@Table(name="CP_GRUPO_MOVIMIENTO"
+ ,schema="CUENTAPERSONAL"
+)
+public class CpGrupoMovimiento implements java.io.Serializable {
+
+
+ private Long idGrupoMovimiento;
+ private CpTipoMovimiento cpTipoMovimiento;
+ private String descripcion;
+ private String observacion;
+ private Set cpMovimientos = new HashSet(0);
+
+ public CpGrupoMovimiento() {
+ }
+
+
+ public CpGrupoMovimiento(Long idGrupoMovimiento, CpTipoMovimiento cpTipoMovimiento) {
+ this.idGrupoMovimiento = idGrupoMovimiento;
+ this.cpTipoMovimiento = cpTipoMovimiento;
+ }
+ public CpGrupoMovimiento(Long idGrupoMovimiento, CpTipoMovimiento cpTipoMovimiento, String descripcion, String observacion, Set cpMovimientos) {
+ this.idGrupoMovimiento = idGrupoMovimiento;
+ this.cpTipoMovimiento = cpTipoMovimiento;
+ this.descripcion = descripcion;
+ this.observacion = observacion;
+ this.cpMovimientos = cpMovimientos;
+ }
+
+ @Id
+
+
+ @Column(name="ID_GRUPO_MOVIMIENTO", unique=true, nullable=false, precision=22, scale=0)
+ public Long getIdGrupoMovimiento() {
+ return this.idGrupoMovimiento;
+ }
+
+ public void setIdGrupoMovimiento(Long idGrupoMovimiento) {
+ this.idGrupoMovimiento = idGrupoMovimiento;
+ }
+
+@ManyToOne(fetch=FetchType.LAZY)
+ @JoinColumn(name="ID_TIPO_MOVIMIENTO", nullable=false)
+ public CpTipoMovimiento getCpTipoMovimiento() {
+ return this.cpTipoMovimiento;
+ }
+
+ public void setCpTipoMovimiento(CpTipoMovimiento cpTipoMovimiento) {
+ this.cpTipoMovimiento = cpTipoMovimiento;
+ }
+
+
+ @Column(name="DESCRIPCION", length=50)
+ public String getDescripcion() {
+ return this.descripcion;
+ }
+
+ public void setDescripcion(String descripcion) {
+ this.descripcion = descripcion;
+ }
+
+
+ @Column(name="OBSERVACION", length=50)
+ public String getObservacion() {
+ return this.observacion;
+ }
+
+ public void setObservacion(String observacion) {
+ this.observacion = observacion;
+ }
+
+@OneToMany(fetch=FetchType.LAZY, mappedBy="cpGrupoMovimiento")
+ public Set getCpMovimientos() {
+ return this.cpMovimientos;
+ }
+
+ public void setCpMovimientos(Set cpMovimientos) {
+ this.cpMovimientos = cpMovimientos;
+ }
+
+
+
+
+}
+
+
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/CpMovimiento.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpMovimiento.java
new file mode 100644
index 0000000..0cc4074
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpMovimiento.java
@@ -0,0 +1,119 @@
+package org.zathura.cuentas.personales;
+// Generated 4/04/2012 12:36:59 PM by Zathura powered by Hibernate Tools 3.2.4.GA
+
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * CpMovimiento generated by Zathura powered by Hibernate-tools(hbm2java)
+ */
+@Entity
+@Table(name="CP_MOVIMIENTO"
+ ,schema="CUENTAPERSONAL"
+)
+@SequenceGenerator(name = "movimintoIdSec", sequenceName = "SEC_CPMOVIMIENTO")
+public class CpMovimiento implements java.io.Serializable {
+
+
+ private Long idMovimiento;
+ private CpUsuarios cpUsuarios;
+ private CpGrupoMovimiento cpGrupoMovimiento;
+ private String descripcionMovimiento;
+ private String observaciones;
+ private Set cpDetalleMovimientos = new HashSet(0);
+
+ public CpMovimiento() {
+ }
+
+
+ public CpMovimiento(Long idMovimiento, CpUsuarios cpUsuarios, CpGrupoMovimiento cpGrupoMovimiento) {
+ this.idMovimiento = idMovimiento;
+ this.cpUsuarios = cpUsuarios;
+ this.cpGrupoMovimiento = cpGrupoMovimiento;
+ }
+ public CpMovimiento(Long idMovimiento, CpUsuarios cpUsuarios, CpGrupoMovimiento cpGrupoMovimiento, String descripcionMovimiento, String observaciones, Set cpDetalleMovimientos) {
+ this.idMovimiento = idMovimiento;
+ this.cpUsuarios = cpUsuarios;
+ this.cpGrupoMovimiento = cpGrupoMovimiento;
+ this.descripcionMovimiento = descripcionMovimiento;
+ this.observaciones = observaciones;
+ this.cpDetalleMovimientos = cpDetalleMovimientos;
+ }
+
+ @Id
+ @GeneratedValue(generator = "movimintoIdSec")
+ @Column(name="ID_MOVIMIENTO", unique=true, nullable=false, precision=22, scale=0)
+ public Long getIdMovimiento() {
+ return this.idMovimiento;
+ }
+
+ public void setIdMovimiento(Long idMovimiento) {
+ this.idMovimiento = idMovimiento;
+ }
+
+@ManyToOne(fetch=FetchType.LAZY)
+ @JoinColumn(name="ID_USUARIO", nullable=false)
+ public CpUsuarios getCpUsuarios() {
+ return this.cpUsuarios;
+ }
+
+ public void setCpUsuarios(CpUsuarios cpUsuarios) {
+ this.cpUsuarios = cpUsuarios;
+ }
+
+@ManyToOne(fetch=FetchType.LAZY)
+ @JoinColumn(name="ID_GRUPO_MOVIMIENTO", nullable=false)
+ public CpGrupoMovimiento getCpGrupoMovimiento() {
+ return this.cpGrupoMovimiento;
+ }
+
+ public void setCpGrupoMovimiento(CpGrupoMovimiento cpGrupoMovimiento) {
+ this.cpGrupoMovimiento = cpGrupoMovimiento;
+ }
+
+
+ @Column(name="DESCRIPCION_MOVIMIENTO", length=50)
+ public String getDescripcionMovimiento() {
+ return this.descripcionMovimiento;
+ }
+
+ public void setDescripcionMovimiento(String descripcionMovimiento) {
+ this.descripcionMovimiento = descripcionMovimiento;
+ }
+
+
+ @Column(name="OBSERVACIONES", length=50)
+ public String getObservaciones() {
+ return this.observaciones;
+ }
+
+ public void setObservaciones(String observaciones) {
+ this.observaciones = observaciones;
+ }
+
+@OneToMany(fetch=FetchType.LAZY, mappedBy="cpMovimiento")
+ public Set getCpDetalleMovimientos() {
+ return this.cpDetalleMovimientos;
+ }
+
+ public void setCpDetalleMovimientos(Set cpDetalleMovimientos) {
+ this.cpDetalleMovimientos = cpDetalleMovimientos;
+ }
+
+
+
+
+}
+
+
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/CpTipoMovimiento.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpTipoMovimiento.java
new file mode 100644
index 0000000..93a106f
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpTipoMovimiento.java
@@ -0,0 +1,89 @@
+package org.zathura.cuentas.personales;
+// Generated 4/04/2012 12:36:59 PM by Zathura powered by Hibernate Tools 3.2.4.GA
+
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * CpTipoMovimiento generated by Zathura powered by Hibernate-tools(hbm2java)
+ */
+@Entity
+@Table(name="CP_TIPO_MOVIMIENTO"
+ ,schema="CUENTAPERSONAL"
+)
+public class CpTipoMovimiento implements java.io.Serializable {
+
+
+ private Long idTipoMovimiento;
+ private String descripcion;
+ private String observacion;
+ private Set cpGrupoMovimientos = new HashSet(0);
+
+ public CpTipoMovimiento() {
+ }
+
+
+ public CpTipoMovimiento(Long idTipoMovimiento) {
+ this.idTipoMovimiento = idTipoMovimiento;
+ }
+ public CpTipoMovimiento(Long idTipoMovimiento, String descripcion, String observacion, Set cpGrupoMovimientos) {
+ this.idTipoMovimiento = idTipoMovimiento;
+ this.descripcion = descripcion;
+ this.observacion = observacion;
+ this.cpGrupoMovimientos = cpGrupoMovimientos;
+ }
+
+ @Id
+
+
+ @Column(name="ID_TIPO_MOVIMIENTO", unique=true, nullable=false, precision=22, scale=0)
+ public Long getIdTipoMovimiento() {
+ return this.idTipoMovimiento;
+ }
+
+ public void setIdTipoMovimiento(Long idTipoMovimiento) {
+ this.idTipoMovimiento = idTipoMovimiento;
+ }
+
+
+ @Column(name="DESCRIPCION", length=30)
+ public String getDescripcion() {
+ return this.descripcion;
+ }
+
+ public void setDescripcion(String descripcion) {
+ this.descripcion = descripcion;
+ }
+
+
+ @Column(name="OBSERVACION", length=50)
+ public String getObservacion() {
+ return this.observacion;
+ }
+
+ public void setObservacion(String observacion) {
+ this.observacion = observacion;
+ }
+
+@OneToMany(fetch=FetchType.LAZY, mappedBy="cpTipoMovimiento")
+ public Set getCpGrupoMovimientos() {
+ return this.cpGrupoMovimientos;
+ }
+
+ public void setCpGrupoMovimientos(Set cpGrupoMovimientos) {
+ this.cpGrupoMovimientos = cpGrupoMovimientos;
+ }
+
+
+
+
+}
+
+
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/CpUsuarios.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpUsuarios.java
new file mode 100644
index 0000000..0ca40be
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/CpUsuarios.java
@@ -0,0 +1,149 @@
+package org.zathura.cuentas.personales;
+// Generated 4/04/2012 12:36:59 PM by Zathura powered by Hibernate Tools 3.2.4.GA
+
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * CpUsuarios generated by Zathura powered by Hibernate-tools(hbm2java)
+ */
+@Entity
+@Table(name="CP_USUARIOS"
+ ,schema="CUENTAPERSONAL"
+)
+public class CpUsuarios implements java.io.Serializable {
+
+
+ private Long idUsuario;
+ private String nombre;
+ private String apellido;
+ private String correo;
+ private String contrasena;
+ private Long movil;
+ private String activo;
+ private String observaciones;
+ private Set cpMovimientos = new HashSet(0);
+
+ public CpUsuarios() {
+ }
+
+
+ public CpUsuarios(Long idUsuario) {
+ this.idUsuario = idUsuario;
+ }
+ public CpUsuarios(Long idUsuario, String nombre, String apellido, String correo, String contrasena, Long movil, String activo, String observaciones, Set cpMovimientos) {
+ this.idUsuario = idUsuario;
+ this.nombre = nombre;
+ this.apellido = apellido;
+ this.correo = correo;
+ this.contrasena = contrasena;
+ this.movil = movil;
+ this.activo = activo;
+ this.observaciones = observaciones;
+ this.cpMovimientos = cpMovimientos;
+ }
+
+ @Id
+
+
+ @Column(name="ID_USUARIO", unique=true, nullable=false, precision=22, scale=0)
+ public Long getIdUsuario() {
+ return this.idUsuario;
+ }
+
+ public void setIdUsuario(Long idUsuario) {
+ this.idUsuario = idUsuario;
+ }
+
+
+ @Column(name="NOMBRE", length=50)
+ public String getNombre() {
+ return this.nombre;
+ }
+
+ public void setNombre(String nombre) {
+ this.nombre = nombre;
+ }
+
+
+ @Column(name="APELLIDO", length=50)
+ public String getApellido() {
+ return this.apellido;
+ }
+
+ public void setApellido(String apellido) {
+ this.apellido = apellido;
+ }
+
+
+ @Column(name="CORREO", length=50)
+ public String getCorreo() {
+ return this.correo;
+ }
+
+ public void setCorreo(String correo) {
+ this.correo = correo;
+ }
+
+
+ @Column(name="CONTRASENA", length=50)
+ public String getContrasena() {
+ return this.contrasena;
+ }
+
+ public void setContrasena(String contrasena) {
+ this.contrasena = contrasena;
+ }
+
+
+ @Column(name="MOVIL", precision=22, scale=0)
+ public Long getMovil() {
+ return this.movil;
+ }
+
+ public void setMovil(Long movil) {
+ this.movil = movil;
+ }
+
+
+ @Column(name="ACTIVO", length=1)
+ public String getActivo() {
+ return this.activo;
+ }
+
+ public void setActivo(String activo) {
+ this.activo = activo;
+ }
+
+
+ @Column(name="OBSERVACIONES", length=50)
+ public String getObservaciones() {
+ return this.observaciones;
+ }
+
+ public void setObservaciones(String observaciones) {
+ this.observaciones = observaciones;
+ }
+
+@OneToMany(fetch=FetchType.LAZY, mappedBy="cpUsuarios")
+ public Set getCpMovimientos() {
+ return this.cpMovimientos;
+ }
+
+ public void setCpMovimientos(Set cpMovimientos) {
+ this.cpMovimientos = cpMovimientos;
+ }
+
+
+
+
+}
+
+
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpDetalleMovimientoLogic.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpDetalleMovimientoLogic.java
new file mode 100644
index 0000000..8c282e5
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpDetalleMovimientoLogic.java
@@ -0,0 +1,616 @@
+package org.zathura.cuentas.personales.control;
+
+import org.zathura.cuentas.dataaccess.daoFactory.JPADaoFactory;
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.exceptions.*;
+import org.zathura.cuentas.personales.*;
+import org.zathura.cuentas.personales.dto.CpDetalleMovimientoDTO;
+import org.zathura.cuentas.utilities.Utilities;
+
+import java.math.BigDecimal;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * interface CpDetalleMovimientoLogic
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ *
+ */
+public class CpDetalleMovimientoLogic implements ICpDetalleMovimientoLogic {
+ public List getCpDetalleMovimiento()
+ throws Exception {
+ List list = new ArrayList();
+
+ try {
+ list = JPADaoFactory.getInstance().getCpDetalleMovimientoDAO()
+ .findAll(0);
+ } catch (Exception e) {
+ throw new ZMessManager().new GettingException(ZMessManager.ALL +
+ "CpDetalleMovimiento");
+ } finally {
+ }
+
+ return list;
+ }
+
+ public void saveCpDetalleMovimiento(Long anno, Date fehcaRegistro,
+ Long idDetalleMovimiento, Long mes, String observaciones,
+ String pendiente, Long valorMovimiento, Long valorPago,
+ Long idMovimiento_CpMovimiento) throws Exception {
+ CpDetalleMovimiento entity = null;
+
+ try {
+ if ((anno != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ anno, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("anno");
+ }
+
+ if (idDetalleMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idDetalleMovimiento");
+ }
+
+ if ((idDetalleMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idDetalleMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idDetalleMovimiento");
+ }
+
+ if ((mes != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ mes, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("mes");
+ }
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 100) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ if ((pendiente != null) &&
+ (Utilities.checkWordAndCheckWithlength(pendiente, 1) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "pendiente");
+ }
+
+ if ((valorMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ valorMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "valorMovimiento");
+ }
+
+ if ((valorPago != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ valorPago, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "valorPago");
+ }
+
+ if (idMovimiento_CpMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idMovimiento_CpMovimiento");
+ }
+
+ if ((idMovimiento_CpMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idMovimiento_CpMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idMovimiento_CpMovimiento");
+ }
+
+ ICpMovimientoLogic logicCpMovimiento1 = new CpMovimientoLogic();
+ CpMovimiento cpMovimientoClass = logicCpMovimiento1.getCpMovimiento(idMovimiento_CpMovimiento);
+
+ if (cpMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException("cpMovimiento");
+ }
+
+ entity = getCpDetalleMovimiento(idDetalleMovimiento);
+
+ if (entity != null) {
+ throw new ZMessManager(ZMessManager.ENTITY_WITHSAMEKEY);
+ }
+
+ entity = new CpDetalleMovimiento();
+ entity.setAnno(anno);
+ entity.setFehcaRegistro(fehcaRegistro);
+ entity.setIdDetalleMovimiento(idDetalleMovimiento);
+ entity.setMes(mes);
+ entity.setObservaciones(observaciones);
+ entity.setPendiente(pendiente);
+ entity.setValorMovimiento(valorMovimiento);
+ entity.setValorPago(valorPago);
+ entity.setCpMovimiento(cpMovimientoClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpDetalleMovimientoDAO().save(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void saveCpDetalleMovimientoWithOutId(Long anno, Date fehcaRegistro,
+ Long mes, String observaciones,
+ String pendiente, Long valorMovimiento, Long valorPago,
+ Long idMovimiento_CpMovimiento) throws Exception {
+ CpDetalleMovimiento entity = null;
+
+ try {
+ if ((anno != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ anno, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("anno");
+ }
+
+ if ((mes != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ mes, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("mes");
+ }
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 100) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ if ((pendiente != null) &&
+ (Utilities.checkWordAndCheckWithlength(pendiente, 1) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "pendiente");
+ }
+
+ if ((valorMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ valorMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "valorMovimiento");
+ }
+
+ if ((valorPago != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ valorPago, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "valorPago");
+ }
+
+ if (idMovimiento_CpMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idMovimiento_CpMovimiento");
+ }
+
+ if ((idMovimiento_CpMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idMovimiento_CpMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idMovimiento_CpMovimiento");
+ }
+
+ ICpMovimientoLogic logicCpMovimiento1 = new CpMovimientoLogic();
+ CpMovimiento cpMovimientoClass = logicCpMovimiento1.getCpMovimiento(idMovimiento_CpMovimiento);
+
+ if (cpMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException("cpMovimiento");
+ }
+
+
+
+ if (entity != null) {
+ throw new ZMessManager(ZMessManager.ENTITY_WITHSAMEKEY);
+ }
+
+ entity = new CpDetalleMovimiento();
+ entity.setAnno(anno);
+ entity.setFehcaRegistro(fehcaRegistro);
+ entity.setMes(mes);
+ entity.setObservaciones(observaciones);
+ entity.setPendiente(pendiente);
+ entity.setValorMovimiento(valorMovimiento);
+ entity.setValorPago(valorPago);
+ entity.setCpMovimiento(cpMovimientoClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpDetalleMovimientoDAO().save(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void deleteCpDetalleMovimiento(Long idDetalleMovimiento)
+ throws Exception {
+ CpDetalleMovimiento entity = null;
+
+ if (idDetalleMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idDetalleMovimiento");
+ }
+
+ entity = getCpDetalleMovimiento(idDetalleMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "CpDetalleMovimiento");
+ }
+
+ try {
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpDetalleMovimientoDAO()
+ .delete(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void updateCpDetalleMovimiento(Long anno, Date fehcaRegistro,
+ Long idDetalleMovimiento, Long mes, String observaciones,
+ String pendiente, Long valorMovimiento, Long valorPago,
+ Long idMovimiento_CpMovimiento) throws Exception {
+ CpDetalleMovimiento entity = null;
+
+ try {
+ if ((anno != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ anno, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("anno");
+ }
+
+ if (idDetalleMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idDetalleMovimiento");
+ }
+
+ if ((idDetalleMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idDetalleMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idDetalleMovimiento");
+ }
+
+ if ((mes != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ mes, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("mes");
+ }
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 100) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ if ((pendiente != null) &&
+ (Utilities.checkWordAndCheckWithlength(pendiente, 1) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "pendiente");
+ }
+
+ if ((valorMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ valorMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "valorMovimiento");
+ }
+
+ if ((valorPago != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ valorPago, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "valorPago");
+ }
+
+ if (idMovimiento_CpMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idMovimiento_CpMovimiento");
+ }
+
+ if ((idMovimiento_CpMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idMovimiento_CpMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idMovimiento_CpMovimiento");
+ }
+
+ ICpMovimientoLogic logicCpMovimiento1 = new CpMovimientoLogic();
+ CpMovimiento cpMovimientoClass = logicCpMovimiento1.getCpMovimiento(idMovimiento_CpMovimiento);
+
+ if (cpMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException("cpMovimiento");
+ }
+
+ entity = getCpDetalleMovimiento(idDetalleMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager(ZMessManager.ENTITY_NOENTITYTOUPDATE);
+ }
+
+ entity.setAnno(anno);
+ entity.setFehcaRegistro(fehcaRegistro);
+ entity.setIdDetalleMovimiento(idDetalleMovimiento);
+ entity.setMes(mes);
+ entity.setObservaciones(observaciones);
+ entity.setPendiente(pendiente);
+ entity.setValorMovimiento(valorMovimiento);
+ entity.setValorPago(valorPago);
+ entity.setCpMovimiento(cpMovimientoClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpDetalleMovimientoDAO()
+ .update(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public CpDetalleMovimiento getCpDetalleMovimiento(Long idDetalleMovimiento)
+ throws Exception {
+ CpDetalleMovimiento entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpDetalleMovimientoDAO()
+ .findById(idDetalleMovimiento);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpDetalleMovimiento");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ public List getDataCpDetalleMovimiento()
+ throws Exception {
+ try {
+ List cpDetalleMovimiento = JPADaoFactory.getInstance()
+ .getCpDetalleMovimientoDAO()
+ .findAll(0);
+
+ List cpDetalleMovimientoDTO = new ArrayList();
+
+ for (CpDetalleMovimiento cpDetalleMovimientoTmp : cpDetalleMovimiento) {
+ CpDetalleMovimientoDTO cpDetalleMovimientoDTO2 = new CpDetalleMovimientoDTO();
+
+ cpDetalleMovimientoDTO2.setIdDetalleMovimiento(cpDetalleMovimientoTmp.getIdDetalleMovimiento());
+ cpDetalleMovimientoDTO2.setAnno((cpDetalleMovimientoTmp.getAnno() != null)
+ ? cpDetalleMovimientoTmp.getAnno() : null);
+ cpDetalleMovimientoDTO2.setFehcaRegistro(cpDetalleMovimientoTmp.getFehcaRegistro());
+ cpDetalleMovimientoDTO2.setMes((cpDetalleMovimientoTmp.getMes() != null)
+ ? cpDetalleMovimientoTmp.getMes() : null);
+ cpDetalleMovimientoDTO2.setObservaciones((cpDetalleMovimientoTmp.getObservaciones() != null)
+ ? cpDetalleMovimientoTmp.getObservaciones() : null);
+ cpDetalleMovimientoDTO2.setPendiente((cpDetalleMovimientoTmp.getPendiente() != null)
+ ? cpDetalleMovimientoTmp.getPendiente() : null);
+ cpDetalleMovimientoDTO2.setValorMovimiento((cpDetalleMovimientoTmp.getValorMovimiento() != null)
+ ? cpDetalleMovimientoTmp.getValorMovimiento() : null);
+ cpDetalleMovimientoDTO2.setValorPago((cpDetalleMovimientoTmp.getValorPago() != null)
+ ? cpDetalleMovimientoTmp.getValorPago() : null);
+ cpDetalleMovimientoDTO2.setIdMovimiento_CpMovimiento((cpDetalleMovimientoTmp.getCpMovimiento()
+ .getIdMovimiento() != null)
+ ? cpDetalleMovimientoTmp.getCpMovimiento().getIdMovimiento()
+ : null);
+ cpDetalleMovimientoDTO.add(cpDetalleMovimientoDTO2);
+ }
+
+ return cpDetalleMovimientoDTO;
+ } catch (Exception e) {
+ throw e;
+ }
+ }
+
+ public List findPageCpDetalleMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults) throws Exception {
+ List entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpDetalleMovimientoDAO()
+ .findPageCpDetalleMovimiento(sortColumnName,
+ sortAscending, startRow, maxResults);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpDetalleMovimiento");
+ }
+
+ return entity;
+ }
+
+ public Long findTotalNumberCpDetalleMovimiento() throws Exception {
+ Long entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpDetalleMovimientoDAO()
+ .findTotalNumberCpDetalleMovimiento();
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException(
+ "CpDetalleMovimiento Count");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ /**
+ *
+ * @param varibles
+ * este arreglo debera tener:
+ *
+ * [0] = String variable = (String) varibles[i]; representa como se llama la
+ * variable en el pojo
+ *
+ * [1] = Boolean booVariable = (Boolean) varibles[i + 1]; representa si el
+ * valor necesita o no ''(comillas simples)usado para campos de tipo string
+ *
+ * [2] = Object value = varibles[i + 2]; representa el valor que se va a
+ * buscar en la BD
+ *
+ * [3] = String comparator = (String) varibles[i + 3]; representa que tipo
+ * de busqueda voy a hacer.., ejemplo: where nombre=william o where nombre<>william,
+ * en este campo iria el tipo de comparador que quiero si es = o <>
+ *
+ * Se itera de 4 en 4..., entonces 4 registros del arreglo representan 1
+ * busqueda en un campo, si se ponen mas pues el continuara buscando en lo
+ * que se le ingresen en los otros 4
+ *
+ *
+ * @param variablesBetween
+ *
+ * la diferencia son estas dos posiciones
+ *
+ * [0] = String variable = (String) varibles[j]; la variable ne la BD que va
+ * a ser buscada en un rango
+ *
+ * [1] = Object value = varibles[j + 1]; valor 1 para buscar en un rango
+ *
+ * [2] = Object value2 = varibles[j + 2]; valor 2 para buscar en un rango
+ * ejempolo: a > 1 and a < 5 --> 1 seria value y 5 seria value2
+ *
+ * [3] = String comparator1 = (String) varibles[j + 3]; comparador 1
+ * ejemplo: a comparator1 1 and a < 5
+ *
+ * [4] = String comparator2 = (String) varibles[j + 4]; comparador 2
+ * ejemplo: a comparador1>1 and a comparador2<5 (el original: a > 1 and a <
+ * 5) *
+ * @param variablesBetweenDates(en
+ * este caso solo para mysql)
+ * [0] = String variable = (String) varibles[k]; el nombre de la variable que hace referencia a
+ * una fecha
+ *
+ * [1] = Object object1 = varibles[k + 2]; fecha 1 a comparar(deben ser
+ * dates)
+ *
+ * [2] = Object object2 = varibles[k + 3]; fecha 2 a comparar(deben ser
+ * dates)
+ *
+ * esto hace un between entre las dos fechas.
+ *
+ * @return lista con los objetos que se necesiten
+ * @throws Exception
+ */
+ public List findByCriteria(Object[] variables,
+ Object[] variablesBetween, Object[] variablesBetweenDates)
+ throws Exception {
+ List list = new ArrayList();
+ String where = new String();
+ String tempWhere = new String();
+
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ if ((variables[i] != null) && (variables[i + 1] != null) &&
+ (variables[i + 2] != null) &&
+ (variables[i + 3] != null)) {
+ String variable = (String) variables[i];
+ Boolean booVariable = (Boolean) variables[i + 1];
+ Object value = variables[i + 2];
+ String comparator = (String) variables[i + 3];
+
+ if (booVariable.booleanValue()) {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " \'" +
+ value + "\' )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " \'" + value + "\' )");
+ } else {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " " +
+ value + " )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " " + value + " )");
+ }
+ }
+
+ i = i + 3;
+ }
+ }
+
+ if (variablesBetween != null) {
+ for (int j = 0; j < variablesBetween.length; j++) {
+ if ((variablesBetween[j] != null) &&
+ (variablesBetween[j + 1] != null) &&
+ (variablesBetween[j + 2] != null) &&
+ (variablesBetween[j + 3] != null) &&
+ (variablesBetween[j + 4] != null)) {
+ String variable = (String) variablesBetween[j];
+ Object value = variablesBetween[j + 1];
+ Object value2 = variablesBetween[j + 2];
+ String comparator1 = (String) variablesBetween[j + 3];
+ String comparator2 = (String) variablesBetween[j + 4];
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(" + value + " " + comparator1 + " " + variable +
+ " and " + variable + " " + comparator2 + " " + value2 +
+ " )")
+ : (tempWhere + " AND (" + value + " " + comparator1 +
+ " " + variable + " and " + variable + " " +
+ comparator2 + " " + value2 + " )");
+ }
+
+ j = j + 4;
+ }
+ }
+
+ if (variablesBetweenDates != null) {
+ for (int k = 0; k < variablesBetweenDates.length; k++) {
+ if ((variablesBetweenDates[k] != null) &&
+ (variablesBetweenDates[k + 1] != null) &&
+ (variablesBetweenDates[k + 2] != null)) {
+ String variable = (String) variablesBetweenDates[k];
+ Object object1 = variablesBetweenDates[k + 1];
+ Object object2 = variablesBetweenDates[k + 2];
+ String value = null;
+ String value2 = null;
+
+ try {
+ Date date1 = (Date) object1;
+ Date date2 = (Date) object2;
+ value = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date1);
+ value2 = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date2);
+ } catch (Exception e) {
+ list = null;
+ throw e;
+ }
+
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " between \'" + value +
+ "\' and \'" + value2 + "\')")
+ : (tempWhere + " AND (model." + variable +
+ " between \'" + value + "\' and \'" + value2 + "\')");
+ }
+
+ k = k + 2;
+ }
+ }
+
+ if (tempWhere.length() == 0) {
+ where = null;
+ } else {
+ where = "(" + tempWhere + ")";
+ }
+
+ try {
+ list = JPADaoFactory.getInstance().getCpDetalleMovimientoDAO()
+ .findByCriteria(where);
+ } catch (Exception e) {
+ throw new Exception(e.getMessage());
+ } finally {
+ }
+
+ return list;
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpGrupoMovimientoLogic.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpGrupoMovimientoLogic.java
new file mode 100644
index 0000000..cf63fce
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpGrupoMovimientoLogic.java
@@ -0,0 +1,462 @@
+package org.zathura.cuentas.personales.control;
+
+import org.zathura.cuentas.dataaccess.daoFactory.JPADaoFactory;
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.exceptions.*;
+import org.zathura.cuentas.personales.*;
+import org.zathura.cuentas.personales.dto.CpGrupoMovimientoDTO;
+import org.zathura.cuentas.utilities.Utilities;
+
+import java.math.BigDecimal;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * interface CpGrupoMovimientoLogic
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ *
+ */
+public class CpGrupoMovimientoLogic implements ICpGrupoMovimientoLogic {
+ public List getCpGrupoMovimiento()
+ throws Exception {
+ List list = new ArrayList();
+
+ try {
+ list = JPADaoFactory.getInstance().getCpGrupoMovimientoDAO()
+ .findAll(0);
+ } catch (Exception e) {
+ throw new ZMessManager().new GettingException(ZMessManager.ALL +
+ "CpGrupoMovimiento");
+ } finally {
+ }
+
+ return list;
+ }
+
+ public void saveCpGrupoMovimiento(String descripcion,
+ Long idGrupoMovimiento, String observacion,
+ Long idTipoMovimiento_CpTipoMovimiento) throws Exception {
+ CpGrupoMovimiento entity = null;
+
+ try {
+ if ((descripcion != null) &&
+ (Utilities.checkWordAndCheckWithlength(descripcion, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "descripcion");
+ }
+
+ if (idGrupoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idGrupoMovimiento");
+ }
+
+ if ((idGrupoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idGrupoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idGrupoMovimiento");
+ }
+
+ if ((observacion != null) &&
+ (Utilities.checkWordAndCheckWithlength(observacion, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observacion");
+ }
+
+ if (idTipoMovimiento_CpTipoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idTipoMovimiento_CpTipoMovimiento");
+ }
+
+ if ((idTipoMovimiento_CpTipoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idTipoMovimiento_CpTipoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idTipoMovimiento_CpTipoMovimiento");
+ }
+
+ ICpTipoMovimientoLogic logicCpTipoMovimiento1 = new CpTipoMovimientoLogic();
+ CpTipoMovimiento cpTipoMovimientoClass = logicCpTipoMovimiento1.getCpTipoMovimiento(idTipoMovimiento_CpTipoMovimiento);
+
+ if (cpTipoMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException(
+ "cpTipoMovimiento");
+ }
+
+ entity = getCpGrupoMovimiento(idGrupoMovimiento);
+
+ if (entity != null) {
+ throw new ZMessManager(ZMessManager.ENTITY_WITHSAMEKEY);
+ }
+
+ entity = new CpGrupoMovimiento();
+ entity.setDescripcion(descripcion);
+ entity.setIdGrupoMovimiento(idGrupoMovimiento);
+ entity.setObservacion(observacion);
+ entity.setCpTipoMovimiento(cpTipoMovimientoClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpGrupoMovimientoDAO().save(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void deleteCpGrupoMovimiento(Long idGrupoMovimiento)
+ throws Exception {
+ CpGrupoMovimiento entity = null;
+
+ if (idGrupoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idGrupoMovimiento");
+ }
+
+ List cpMovimientos = null;
+ entity = getCpGrupoMovimiento(idGrupoMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "CpGrupoMovimiento");
+ }
+
+ try {
+ cpMovimientos = JPADaoFactory.getInstance().getCpMovimientoDAO()
+ .findByProperty("cpGrupoMovimiento.idGrupoMovimiento",
+ idGrupoMovimiento, 0);
+
+ if (Utilities.validationsList(cpMovimientos) == true) {
+ throw new ZMessManager().new DeletingException("cpMovimientos");
+ }
+
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpGrupoMovimientoDAO().delete(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void updateCpGrupoMovimiento(String descripcion,
+ Long idGrupoMovimiento, String observacion,
+ Long idTipoMovimiento_CpTipoMovimiento) throws Exception {
+ CpGrupoMovimiento entity = null;
+
+ try {
+ if ((descripcion != null) &&
+ (Utilities.checkWordAndCheckWithlength(descripcion, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "descripcion");
+ }
+
+ if (idGrupoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idGrupoMovimiento");
+ }
+
+ if ((idGrupoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idGrupoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idGrupoMovimiento");
+ }
+
+ if ((observacion != null) &&
+ (Utilities.checkWordAndCheckWithlength(observacion, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observacion");
+ }
+
+ if (idTipoMovimiento_CpTipoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idTipoMovimiento_CpTipoMovimiento");
+ }
+
+ if ((idTipoMovimiento_CpTipoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idTipoMovimiento_CpTipoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idTipoMovimiento_CpTipoMovimiento");
+ }
+
+ ICpTipoMovimientoLogic logicCpTipoMovimiento1 = new CpTipoMovimientoLogic();
+ CpTipoMovimiento cpTipoMovimientoClass = logicCpTipoMovimiento1.getCpTipoMovimiento(idTipoMovimiento_CpTipoMovimiento);
+
+ if (cpTipoMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException(
+ "cpTipoMovimiento");
+ }
+
+ entity = getCpGrupoMovimiento(idGrupoMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager(ZMessManager.ENTITY_NOENTITYTOUPDATE);
+ }
+
+ entity.setDescripcion(descripcion);
+ entity.setIdGrupoMovimiento(idGrupoMovimiento);
+ entity.setObservacion(observacion);
+ entity.setCpTipoMovimiento(cpTipoMovimientoClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpGrupoMovimientoDAO().update(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public CpGrupoMovimiento getCpGrupoMovimiento(Long idGrupoMovimiento)
+ throws Exception {
+ CpGrupoMovimiento entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpGrupoMovimientoDAO()
+ .findById(idGrupoMovimiento);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpGrupoMovimiento");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ public List getDataCpGrupoMovimiento()
+ throws Exception {
+ try {
+ List cpGrupoMovimiento = JPADaoFactory.getInstance()
+ .getCpGrupoMovimientoDAO()
+ .findAll(0);
+
+ List cpGrupoMovimientoDTO = new ArrayList();
+
+ for (CpGrupoMovimiento cpGrupoMovimientoTmp : cpGrupoMovimiento) {
+ CpGrupoMovimientoDTO cpGrupoMovimientoDTO2 = new CpGrupoMovimientoDTO();
+
+ cpGrupoMovimientoDTO2.setIdGrupoMovimiento(cpGrupoMovimientoTmp.getIdGrupoMovimiento());
+ cpGrupoMovimientoDTO2.setDescripcion((cpGrupoMovimientoTmp.getDescripcion() != null)
+ ? cpGrupoMovimientoTmp.getDescripcion() : null);
+ cpGrupoMovimientoDTO2.setObservacion((cpGrupoMovimientoTmp.getObservacion() != null)
+ ? cpGrupoMovimientoTmp.getObservacion() : null);
+ cpGrupoMovimientoDTO2.setIdTipoMovimiento_CpTipoMovimiento((cpGrupoMovimientoTmp.getCpTipoMovimiento()
+ .getIdTipoMovimiento() != null)
+ ? cpGrupoMovimientoTmp.getCpTipoMovimiento()
+ .getIdTipoMovimiento() : null);
+ cpGrupoMovimientoDTO.add(cpGrupoMovimientoDTO2);
+ }
+
+ return cpGrupoMovimientoDTO;
+ } catch (Exception e) {
+ throw e;
+ }
+ }
+
+ public List findPageCpGrupoMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults) throws Exception {
+ List entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpGrupoMovimientoDAO()
+ .findPageCpGrupoMovimiento(sortColumnName,
+ sortAscending, startRow, maxResults);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpGrupoMovimiento");
+ }
+
+ return entity;
+ }
+
+ public Long findTotalNumberCpGrupoMovimiento() throws Exception {
+ Long entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpGrupoMovimientoDAO()
+ .findTotalNumberCpGrupoMovimiento();
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException(
+ "CpGrupoMovimiento Count");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ /**
+ *
+ * @param varibles
+ * este arreglo debera tener:
+ *
+ * [0] = String variable = (String) varibles[i]; representa como se llama la
+ * variable en el pojo
+ *
+ * [1] = Boolean booVariable = (Boolean) varibles[i + 1]; representa si el
+ * valor necesita o no ''(comillas simples)usado para campos de tipo string
+ *
+ * [2] = Object value = varibles[i + 2]; representa el valor que se va a
+ * buscar en la BD
+ *
+ * [3] = String comparator = (String) varibles[i + 3]; representa que tipo
+ * de busqueda voy a hacer.., ejemplo: where nombre=william o where nombre<>william,
+ * en este campo iria el tipo de comparador que quiero si es = o <>
+ *
+ * Se itera de 4 en 4..., entonces 4 registros del arreglo representan 1
+ * busqueda en un campo, si se ponen mas pues el continuara buscando en lo
+ * que se le ingresen en los otros 4
+ *
+ *
+ * @param variablesBetween
+ *
+ * la diferencia son estas dos posiciones
+ *
+ * [0] = String variable = (String) varibles[j]; la variable ne la BD que va
+ * a ser buscada en un rango
+ *
+ * [1] = Object value = varibles[j + 1]; valor 1 para buscar en un rango
+ *
+ * [2] = Object value2 = varibles[j + 2]; valor 2 para buscar en un rango
+ * ejempolo: a > 1 and a < 5 --> 1 seria value y 5 seria value2
+ *
+ * [3] = String comparator1 = (String) varibles[j + 3]; comparador 1
+ * ejemplo: a comparator1 1 and a < 5
+ *
+ * [4] = String comparator2 = (String) varibles[j + 4]; comparador 2
+ * ejemplo: a comparador1>1 and a comparador2<5 (el original: a > 1 and a <
+ * 5) *
+ * @param variablesBetweenDates(en
+ * este caso solo para mysql)
+ * [0] = String variable = (String) varibles[k]; el nombre de la variable que hace referencia a
+ * una fecha
+ *
+ * [1] = Object object1 = varibles[k + 2]; fecha 1 a comparar(deben ser
+ * dates)
+ *
+ * [2] = Object object2 = varibles[k + 3]; fecha 2 a comparar(deben ser
+ * dates)
+ *
+ * esto hace un between entre las dos fechas.
+ *
+ * @return lista con los objetos que se necesiten
+ * @throws Exception
+ */
+ public List findByCriteria(Object[] variables,
+ Object[] variablesBetween, Object[] variablesBetweenDates)
+ throws Exception {
+ List list = new ArrayList();
+ String where = new String();
+ String tempWhere = new String();
+
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ if ((variables[i] != null) && (variables[i + 1] != null) &&
+ (variables[i + 2] != null) &&
+ (variables[i + 3] != null)) {
+ String variable = (String) variables[i];
+ Boolean booVariable = (Boolean) variables[i + 1];
+ Object value = variables[i + 2];
+ String comparator = (String) variables[i + 3];
+
+ if (booVariable.booleanValue()) {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " \'" +
+ value + "\' )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " \'" + value + "\' )");
+ } else {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " " +
+ value + " )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " " + value + " )");
+ }
+ }
+
+ i = i + 3;
+ }
+ }
+
+ if (variablesBetween != null) {
+ for (int j = 0; j < variablesBetween.length; j++) {
+ if ((variablesBetween[j] != null) &&
+ (variablesBetween[j + 1] != null) &&
+ (variablesBetween[j + 2] != null) &&
+ (variablesBetween[j + 3] != null) &&
+ (variablesBetween[j + 4] != null)) {
+ String variable = (String) variablesBetween[j];
+ Object value = variablesBetween[j + 1];
+ Object value2 = variablesBetween[j + 2];
+ String comparator1 = (String) variablesBetween[j + 3];
+ String comparator2 = (String) variablesBetween[j + 4];
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(" + value + " " + comparator1 + " " + variable +
+ " and " + variable + " " + comparator2 + " " + value2 +
+ " )")
+ : (tempWhere + " AND (" + value + " " + comparator1 +
+ " " + variable + " and " + variable + " " +
+ comparator2 + " " + value2 + " )");
+ }
+
+ j = j + 4;
+ }
+ }
+
+ if (variablesBetweenDates != null) {
+ for (int k = 0; k < variablesBetweenDates.length; k++) {
+ if ((variablesBetweenDates[k] != null) &&
+ (variablesBetweenDates[k + 1] != null) &&
+ (variablesBetweenDates[k + 2] != null)) {
+ String variable = (String) variablesBetweenDates[k];
+ Object object1 = variablesBetweenDates[k + 1];
+ Object object2 = variablesBetweenDates[k + 2];
+ String value = null;
+ String value2 = null;
+
+ try {
+ Date date1 = (Date) object1;
+ Date date2 = (Date) object2;
+ value = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date1);
+ value2 = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date2);
+ } catch (Exception e) {
+ list = null;
+ throw e;
+ }
+
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " between \'" + value +
+ "\' and \'" + value2 + "\')")
+ : (tempWhere + " AND (model." + variable +
+ " between \'" + value + "\' and \'" + value2 + "\')");
+ }
+
+ k = k + 2;
+ }
+ }
+
+ if (tempWhere.length() == 0) {
+ where = null;
+ } else {
+ where = "(" + tempWhere + ")";
+ }
+
+ try {
+ list = JPADaoFactory.getInstance().getCpGrupoMovimientoDAO()
+ .findByCriteria(where);
+ } catch (Exception e) {
+ throw new Exception(e.getMessage());
+ } finally {
+ }
+
+ return list;
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpMovimientoLogic.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpMovimientoLogic.java
new file mode 100644
index 0000000..32a53ce
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpMovimientoLogic.java
@@ -0,0 +1,600 @@
+package org.zathura.cuentas.personales.control;
+
+import org.zathura.cuentas.dataaccess.daoFactory.JPADaoFactory;
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.exceptions.*;
+import org.zathura.cuentas.personales.*;
+import org.zathura.cuentas.personales.dto.CpMovimientoDTO;
+import org.zathura.cuentas.utilities.Utilities;
+
+import java.math.BigDecimal;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+import javax.persistence.GeneratedValue;
+
+
+/**
+ * interface CpMovimientoLogic
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ *
+ */
+public class CpMovimientoLogic implements ICpMovimientoLogic {
+ public List getCpMovimiento() throws Exception {
+ List list = new ArrayList();
+
+ try {
+ list = JPADaoFactory.getInstance().getCpMovimientoDAO().findAll(0);
+ } catch (Exception e) {
+ throw new ZMessManager().new GettingException(ZMessManager.ALL +
+ "CpMovimiento");
+ } finally {
+ }
+
+ return list;
+ }
+
+ public void saveCpMovimiento(String descripcionMovimiento,
+ Long idMovimiento, String observaciones,
+ Long idGrupoMovimiento_CpGrupoMovimiento, Long idUsuario_CpUsuarios)
+ throws Exception {
+ CpMovimiento entity = null;
+
+ try {
+ if ((descripcionMovimiento != null) &&
+ (Utilities.checkWordAndCheckWithlength(
+ descripcionMovimiento, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "descripcionMovimiento");
+ }
+
+ if (idMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException("idMovimiento");
+ }
+
+ if ((idMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idMovimiento");
+ }
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ if (idGrupoMovimiento_CpGrupoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idGrupoMovimiento_CpGrupoMovimiento");
+ }
+
+ if ((idGrupoMovimiento_CpGrupoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idGrupoMovimiento_CpGrupoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idGrupoMovimiento_CpGrupoMovimiento");
+ }
+
+ if (idUsuario_CpUsuarios == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idUsuario_CpUsuarios");
+ }
+
+ if ((idUsuario_CpUsuarios != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idUsuario_CpUsuarios, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idUsuario_CpUsuarios");
+ }
+
+ ICpGrupoMovimientoLogic logicCpGrupoMovimiento1 = new CpGrupoMovimientoLogic();
+ ICpUsuariosLogic logicCpUsuarios2 = new CpUsuariosLogic();
+ CpGrupoMovimiento cpGrupoMovimientoClass = logicCpGrupoMovimiento1.getCpGrupoMovimiento(idGrupoMovimiento_CpGrupoMovimiento);
+ CpUsuarios cpUsuariosClass = logicCpUsuarios2.getCpUsuarios(idUsuario_CpUsuarios);
+
+ if (cpGrupoMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException(
+ "cpGrupoMovimiento");
+ }
+
+ if (cpUsuariosClass == null) {
+ throw new ZMessManager().new ForeignException("cpUsuarios");
+ }
+
+ entity = getCpMovimiento(idMovimiento);
+
+ if (entity != null) {
+ throw new ZMessManager(ZMessManager.ENTITY_WITHSAMEKEY);
+ }
+
+ entity = new CpMovimiento();
+ entity.setDescripcionMovimiento(descripcionMovimiento);
+ entity.setIdMovimiento(idMovimiento);
+ entity.setObservaciones(observaciones);
+ entity.setCpGrupoMovimiento(cpGrupoMovimientoClass);
+ entity.setCpUsuarios(cpUsuariosClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpMovimientoDAO().save(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+ /**
+ * Metodo que Ingresa un movimiento y el id se autogenera por medio de una la anotation @GeneratedValue(generator = "movimintoIdSec")
+ * que llama una secuencia de base dedatos (cuando es BD oracle) , no se necesita igresar un id .
+ * @param descripcionMovimiento
+ * @param observaciones
+ * @param idGrupoMovimiento_CpGrupoMovimiento
+ * @param idUsuario_CpUsuarios
+ * @throws Exception
+ */
+ public void saveCpMovimientoWithoutId(String descripcionMovimiento,
+ String observaciones,
+ Long idGrupoMovimiento_CpGrupoMovimiento, Long idUsuario_CpUsuarios)
+ throws Exception {
+ CpMovimiento entity = null;
+
+ try {
+ if ((descripcionMovimiento != null) &&
+ (Utilities.checkWordAndCheckWithlength(
+ descripcionMovimiento, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "descripcionMovimiento");
+ }
+
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ if (idGrupoMovimiento_CpGrupoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idGrupoMovimiento_CpGrupoMovimiento");
+ }
+
+ if ((idGrupoMovimiento_CpGrupoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idGrupoMovimiento_CpGrupoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idGrupoMovimiento_CpGrupoMovimiento");
+ }
+
+ if (idUsuario_CpUsuarios == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idUsuario_CpUsuarios");
+ }
+
+ if ((idUsuario_CpUsuarios != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idUsuario_CpUsuarios, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idUsuario_CpUsuarios");
+ }
+
+ ICpGrupoMovimientoLogic logicCpGrupoMovimiento1 = new CpGrupoMovimientoLogic();
+ ICpUsuariosLogic logicCpUsuarios2 = new CpUsuariosLogic();
+ CpGrupoMovimiento cpGrupoMovimientoClass = logicCpGrupoMovimiento1.getCpGrupoMovimiento(idGrupoMovimiento_CpGrupoMovimiento);
+ CpUsuarios cpUsuariosClass = logicCpUsuarios2.getCpUsuarios(idUsuario_CpUsuarios);
+
+ if (cpGrupoMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException(
+ "cpGrupoMovimiento");
+ }
+
+ if (cpUsuariosClass == null) {
+ throw new ZMessManager().new ForeignException("cpUsuarios");
+ }
+
+ // entity = getCpMovimiento(idMovimiento);
+
+ // if (entity != null) {
+ // throw new ZMessManager(ZMessManager.ENTITY_WITHSAMEKEY);
+ // }
+
+ entity = new CpMovimiento();
+ entity.setDescripcionMovimiento(descripcionMovimiento);
+ entity.setObservaciones(observaciones);
+ entity.setCpGrupoMovimiento(cpGrupoMovimientoClass);
+ entity.setCpUsuarios(cpUsuariosClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpMovimientoDAO().save(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void deleteCpMovimiento(Long idMovimiento) throws Exception {
+ CpMovimiento entity = null;
+
+ if (idMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException("idMovimiento");
+ }
+
+ List cpDetalleMovimientos = null;
+ entity = getCpMovimiento(idMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager().new EmptyFieldException("CpMovimiento");
+ }
+
+ try {
+ cpDetalleMovimientos = JPADaoFactory.getInstance()
+ .getCpDetalleMovimientoDAO()
+ .findByProperty("cpMovimiento.idMovimiento",
+ idMovimiento, 0);
+
+ if (Utilities.validationsList(cpDetalleMovimientos) == true) {
+ throw new ZMessManager().new DeletingException(
+ "cpDetalleMovimientos");
+ }
+
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpMovimientoDAO().delete(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void updateCpMovimiento(String descripcionMovimiento,
+ Long idMovimiento, String observaciones,
+ Long idGrupoMovimiento_CpGrupoMovimiento, Long idUsuario_CpUsuarios)
+ throws Exception {
+ CpMovimiento entity = null;
+
+ try {
+ if ((descripcionMovimiento != null) &&
+ (Utilities.checkWordAndCheckWithlength(
+ descripcionMovimiento, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "descripcionMovimiento");
+ }
+
+ if (idMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException("idMovimiento");
+ }
+
+ if ((idMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idMovimiento");
+ }
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ if (idGrupoMovimiento_CpGrupoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idGrupoMovimiento_CpGrupoMovimiento");
+ }
+
+ if ((idGrupoMovimiento_CpGrupoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idGrupoMovimiento_CpGrupoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idGrupoMovimiento_CpGrupoMovimiento");
+ }
+
+ if (idUsuario_CpUsuarios == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idUsuario_CpUsuarios");
+ }
+
+ if ((idUsuario_CpUsuarios != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idUsuario_CpUsuarios, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idUsuario_CpUsuarios");
+ }
+
+ ICpGrupoMovimientoLogic logicCpGrupoMovimiento1 = new CpGrupoMovimientoLogic();
+
+ ICpUsuariosLogic logicCpUsuarios2 = new CpUsuariosLogic();
+ CpGrupoMovimiento cpGrupoMovimientoClass = logicCpGrupoMovimiento1.getCpGrupoMovimiento(idGrupoMovimiento_CpGrupoMovimiento);
+ CpUsuarios cpUsuariosClass = logicCpUsuarios2.getCpUsuarios(idUsuario_CpUsuarios);
+
+ if (cpGrupoMovimientoClass == null) {
+ throw new ZMessManager().new ForeignException(
+ "cpGrupoMovimiento");
+ }
+
+ if (cpUsuariosClass == null) {
+ throw new ZMessManager().new ForeignException("cpUsuarios");
+ }
+
+ entity = getCpMovimiento(idMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager(ZMessManager.ENTITY_NOENTITYTOUPDATE);
+ }
+
+ entity.setDescripcionMovimiento(descripcionMovimiento);
+ entity.setIdMovimiento(idMovimiento);
+ entity.setObservaciones(observaciones);
+ entity.setCpGrupoMovimiento(cpGrupoMovimientoClass);
+ entity.setCpUsuarios(cpUsuariosClass);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpMovimientoDAO().update(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public CpMovimiento getCpMovimiento(Long idMovimiento)
+ throws Exception {
+ CpMovimiento entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpMovimientoDAO()
+ .findById(idMovimiento);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpMovimiento");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ public List getDataCpMovimiento()
+ throws Exception {
+ try {
+ List cpMovimiento = JPADaoFactory.getInstance()
+ .getCpMovimientoDAO()
+ .findAll(0);
+
+
+ List cpMovimientoDTO = new ArrayList();
+
+ for (CpMovimiento cpMovimientoTmp : cpMovimiento) {
+ CpMovimientoDTO cpMovimientoDTO2 = new CpMovimientoDTO();
+
+ cpMovimientoDTO2.setIdMovimiento(cpMovimientoTmp.getIdMovimiento());
+ cpMovimientoDTO2.setDescripcionMovimiento((cpMovimientoTmp.getDescripcionMovimiento() != null)
+ ? cpMovimientoTmp.getDescripcionMovimiento() : null);
+ cpMovimientoDTO2.setObservaciones((cpMovimientoTmp.getObservaciones() != null)
+ ? cpMovimientoTmp.getObservaciones() : null);
+ cpMovimientoDTO2.setIdGrupoMovimiento_CpGrupoMovimiento((cpMovimientoTmp.getCpGrupoMovimiento()
+ .getIdGrupoMovimiento() != null)
+ ? cpMovimientoTmp.getCpGrupoMovimiento()
+ .getIdGrupoMovimiento() : null);
+ cpMovimientoDTO2.setIdUsuario_CpUsuarios((cpMovimientoTmp.getCpUsuarios()
+ .getIdUsuario() != null)
+ ? cpMovimientoTmp.getCpUsuarios().getIdUsuario() : null);
+ if((cpMovimientoTmp.getCpGrupoMovimiento()
+ .getIdGrupoMovimiento() != null)){
+ CpGrupoMovimiento cpGrupoMovimiento = JPADaoFactory.getInstance().getCpGrupoMovimientoDAO().findById(cpMovimientoTmp.getCpGrupoMovimiento()
+ .getIdGrupoMovimiento());
+ cpMovimientoDTO2.setDescripcionGrupo(cpGrupoMovimiento.getDescripcion());
+ }
+ cpMovimientoDTO.add(cpMovimientoDTO2);
+ }
+
+ return cpMovimientoDTO;
+ } catch (Exception e) {
+ throw e;
+ }
+ }
+
+ public List findPageCpMovimiento(String sortColumnName,
+ boolean sortAscending, int startRow, int maxResults)
+ throws Exception {
+ List entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpMovimientoDAO()
+ .findPageCpMovimiento(sortColumnName,
+ sortAscending, startRow, maxResults);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpMovimiento");
+ }
+
+ return entity;
+ }
+
+ public Long findTotalNumberCpMovimiento() throws Exception {
+ Long entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpMovimientoDAO()
+ .findTotalNumberCpMovimiento();
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpMovimiento Count");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ /**
+ *
+ * @param varibles
+ * este arreglo debera tener:
+ *
+ * [0] = String variable = (String) varibles[i]; representa como se llama la
+ * variable en el pojo
+ *
+ * [1] = Boolean booVariable = (Boolean) varibles[i + 1]; representa si el
+ * valor necesita o no ''(comillas simples)usado para campos de tipo string
+ *
+ * [2] = Object value = varibles[i + 2]; representa el valor que se va a
+ * buscar en la BD
+ *
+ * [3] = String comparator = (String) varibles[i + 3]; representa que tipo
+ * de busqueda voy a hacer.., ejemplo: where nombre=william o where nombre<>william,
+ * en este campo iria el tipo de comparador que quiero si es = o <>
+ *
+ * Se itera de 4 en 4..., entonces 4 registros del arreglo representan 1
+ * busqueda en un campo, si se ponen mas pues el continuara buscando en lo
+ * que se le ingresen en los otros 4
+ *
+ *
+ * @param variablesBetween
+ *
+ * la diferencia son estas dos posiciones
+ *
+ * [0] = String variable = (String) varibles[j]; la variable ne la BD que va
+ * a ser buscada en un rango
+ *
+ * [1] = Object value = varibles[j + 1]; valor 1 para buscar en un rango
+ *
+ * [2] = Object value2 = varibles[j + 2]; valor 2 para buscar en un rango
+ * ejempolo: a > 1 and a < 5 --> 1 seria value y 5 seria value2
+ *
+ * [3] = String comparator1 = (String) varibles[j + 3]; comparador 1
+ * ejemplo: a comparator1 1 and a < 5
+ *
+ * [4] = String comparator2 = (String) varibles[j + 4]; comparador 2
+ * ejemplo: a comparador1>1 and a comparador2<5 (el original: a > 1 and a <
+ * 5) *
+ * @param variablesBetweenDates(en
+ * este caso solo para mysql)
+ * [0] = String variable = (String) varibles[k]; el nombre de la variable que hace referencia a
+ * una fecha
+ *
+ * [1] = Object object1 = varibles[k + 2]; fecha 1 a comparar(deben ser
+ * dates)
+ *
+ * [2] = Object object2 = varibles[k + 3]; fecha 2 a comparar(deben ser
+ * dates)
+ *
+ * esto hace un between entre las dos fechas.
+ *
+ * @return lista con los objetos que se necesiten
+ * @throws Exception
+ */
+ public List findByCriteria(Object[] variables,
+ Object[] variablesBetween, Object[] variablesBetweenDates)
+ throws Exception {
+ List list = new ArrayList();
+ String where = new String();
+ String tempWhere = new String();
+
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ if ((variables[i] != null) && (variables[i + 1] != null) &&
+ (variables[i + 2] != null) &&
+ (variables[i + 3] != null)) {
+ String variable = (String) variables[i];
+ Boolean booVariable = (Boolean) variables[i + 1];
+ Object value = variables[i + 2];
+ String comparator = (String) variables[i + 3];
+
+ if (booVariable.booleanValue()) {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " \'" +
+ value + "\' )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " \'" + value + "\' )");
+ } else {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " " +
+ value + " )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " " + value + " )");
+ }
+ }
+
+ i = i + 3;
+ }
+ }
+
+ if (variablesBetween != null) {
+ for (int j = 0; j < variablesBetween.length; j++) {
+ if ((variablesBetween[j] != null) &&
+ (variablesBetween[j + 1] != null) &&
+ (variablesBetween[j + 2] != null) &&
+ (variablesBetween[j + 3] != null) &&
+ (variablesBetween[j + 4] != null)) {
+ String variable = (String) variablesBetween[j];
+ Object value = variablesBetween[j + 1];
+ Object value2 = variablesBetween[j + 2];
+ String comparator1 = (String) variablesBetween[j + 3];
+ String comparator2 = (String) variablesBetween[j + 4];
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(" + value + " " + comparator1 + " " + variable +
+ " and " + variable + " " + comparator2 + " " + value2 +
+ " )")
+ : (tempWhere + " AND (" + value + " " + comparator1 +
+ " " + variable + " and " + variable + " " +
+ comparator2 + " " + value2 + " )");
+ }
+
+ j = j + 4;
+ }
+ }
+
+ if (variablesBetweenDates != null) {
+ for (int k = 0; k < variablesBetweenDates.length; k++) {
+ if ((variablesBetweenDates[k] != null) &&
+ (variablesBetweenDates[k + 1] != null) &&
+ (variablesBetweenDates[k + 2] != null)) {
+ String variable = (String) variablesBetweenDates[k];
+ Object object1 = variablesBetweenDates[k + 1];
+ Object object2 = variablesBetweenDates[k + 2];
+ String value = null;
+ String value2 = null;
+
+ try {
+ Date date1 = (Date) object1;
+ Date date2 = (Date) object2;
+ value = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date1);
+ value2 = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date2);
+ } catch (Exception e) {
+ list = null;
+ throw e;
+ }
+
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " between \'" + value +
+ "\' and \'" + value2 + "\')")
+ : (tempWhere + " AND (model." + variable +
+ " between \'" + value + "\' and \'" + value2 + "\')");
+ }
+
+ k = k + 2;
+ }
+ }
+
+ if (tempWhere.length() == 0) {
+ where = null;
+ } else {
+ where = "(" + tempWhere + ")";
+ }
+
+ try {
+ list = JPADaoFactory.getInstance().getCpMovimientoDAO()
+ .findByCriteria(where);
+ } catch (Exception e) {
+ throw new Exception(e.getMessage());
+ } finally {
+ }
+
+ return list;
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpTipoMovimientoLogic.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpTipoMovimientoLogic.java
new file mode 100644
index 0000000..13c24e9
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpTipoMovimientoLogic.java
@@ -0,0 +1,414 @@
+package org.zathura.cuentas.personales.control;
+
+import org.zathura.cuentas.dataaccess.daoFactory.JPADaoFactory;
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.exceptions.*;
+import org.zathura.cuentas.personales.*;
+import org.zathura.cuentas.personales.dto.CpTipoMovimientoDTO;
+import org.zathura.cuentas.utilities.Utilities;
+
+import java.math.BigDecimal;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * interface CpTipoMovimientoLogic
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ *
+ */
+public class CpTipoMovimientoLogic implements ICpTipoMovimientoLogic {
+ public List getCpTipoMovimiento()
+ throws Exception {
+ List list = new ArrayList();
+
+ try {
+ list = JPADaoFactory.getInstance().getCpTipoMovimientoDAO()
+ .findAll(0);
+ } catch (Exception e) {
+ throw new ZMessManager().new GettingException(ZMessManager.ALL +
+ "CpTipoMovimiento");
+ } finally {
+ }
+
+ return list;
+ }
+
+ public void saveCpTipoMovimiento(String descripcion, Long idTipoMovimiento,
+ String observacion) throws Exception {
+ CpTipoMovimiento entity = null;
+
+ try {
+ if ((descripcion != null) &&
+ (Utilities.checkWordAndCheckWithlength(descripcion, 30) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "descripcion");
+ }
+
+ if (idTipoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idTipoMovimiento");
+ }
+
+ if ((idTipoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idTipoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idTipoMovimiento");
+ }
+
+ if ((observacion != null) &&
+ (Utilities.checkWordAndCheckWithlength(observacion, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observacion");
+ }
+
+ entity = getCpTipoMovimiento(idTipoMovimiento);
+
+ if (entity != null) {
+ throw new ZMessManager(ZMessManager.ENTITY_WITHSAMEKEY);
+ }
+
+ entity = new CpTipoMovimiento();
+ entity.setDescripcion(descripcion);
+ entity.setIdTipoMovimiento(idTipoMovimiento);
+ entity.setObservacion(observacion);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpTipoMovimientoDAO().save(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void deleteCpTipoMovimiento(Long idTipoMovimiento)
+ throws Exception {
+ CpTipoMovimiento entity = null;
+
+ if (idTipoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException("idTipoMovimiento");
+ }
+
+ List cpGrupoMovimientos = null;
+ entity = getCpTipoMovimiento(idTipoMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager().new EmptyFieldException("CpTipoMovimiento");
+ }
+
+ try {
+ cpGrupoMovimientos = JPADaoFactory.getInstance()
+ .getCpGrupoMovimientoDAO()
+ .findByProperty("cpTipoMovimiento.idTipoMovimiento",
+ idTipoMovimiento, 0);
+
+ if (Utilities.validationsList(cpGrupoMovimientos) == true) {
+ throw new ZMessManager().new DeletingException(
+ "cpGrupoMovimientos");
+ }
+
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpTipoMovimientoDAO().delete(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void updateCpTipoMovimiento(String descripcion,
+ Long idTipoMovimiento, String observacion) throws Exception {
+ CpTipoMovimiento entity = null;
+
+ try {
+ if ((descripcion != null) &&
+ (Utilities.checkWordAndCheckWithlength(descripcion, 30) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "descripcion");
+ }
+
+ if (idTipoMovimiento == null) {
+ throw new ZMessManager().new EmptyFieldException(
+ "idTipoMovimiento");
+ }
+
+ if ((idTipoMovimiento != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idTipoMovimiento, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idTipoMovimiento");
+ }
+
+ if ((observacion != null) &&
+ (Utilities.checkWordAndCheckWithlength(observacion, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observacion");
+ }
+
+ entity = getCpTipoMovimiento(idTipoMovimiento);
+
+ if (entity == null) {
+ throw new ZMessManager(ZMessManager.ENTITY_NOENTITYTOUPDATE);
+ }
+
+ entity.setDescripcion(descripcion);
+ entity.setIdTipoMovimiento(idTipoMovimiento);
+ entity.setObservacion(observacion);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpTipoMovimientoDAO().update(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public CpTipoMovimiento getCpTipoMovimiento(Long idTipoMovimiento)
+ throws Exception {
+ CpTipoMovimiento entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpTipoMovimientoDAO()
+ .findById(idTipoMovimiento);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpTipoMovimiento");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ public List getDataCpTipoMovimiento()
+ throws Exception {
+ try {
+ List cpTipoMovimiento = JPADaoFactory.getInstance()
+ .getCpTipoMovimientoDAO()
+ .findAll(0);
+
+ List cpTipoMovimientoDTO = new ArrayList();
+
+ for (CpTipoMovimiento cpTipoMovimientoTmp : cpTipoMovimiento) {
+ CpTipoMovimientoDTO cpTipoMovimientoDTO2 = new CpTipoMovimientoDTO();
+
+ cpTipoMovimientoDTO2.setIdTipoMovimiento(cpTipoMovimientoTmp.getIdTipoMovimiento());
+ cpTipoMovimientoDTO2.setDescripcion((cpTipoMovimientoTmp.getDescripcion() != null)
+ ? cpTipoMovimientoTmp.getDescripcion() : null);
+ cpTipoMovimientoDTO2.setObservacion((cpTipoMovimientoTmp.getObservacion() != null)
+ ? cpTipoMovimientoTmp.getObservacion() : null);
+ cpTipoMovimientoDTO.add(cpTipoMovimientoDTO2);
+ }
+
+ return cpTipoMovimientoDTO;
+ } catch (Exception e) {
+ throw e;
+ }
+ }
+
+ public List findPageCpTipoMovimiento(
+ String sortColumnName, boolean sortAscending, int startRow,
+ int maxResults) throws Exception {
+ List entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpTipoMovimientoDAO()
+ .findPageCpTipoMovimiento(sortColumnName,
+ sortAscending, startRow, maxResults);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpTipoMovimiento");
+ }
+
+ return entity;
+ }
+
+ public Long findTotalNumberCpTipoMovimiento() throws Exception {
+ Long entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpTipoMovimientoDAO()
+ .findTotalNumberCpTipoMovimiento();
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException(
+ "CpTipoMovimiento Count");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ /**
+ *
+ * @param varibles
+ * este arreglo debera tener:
+ *
+ * [0] = String variable = (String) varibles[i]; representa como se llama la
+ * variable en el pojo
+ *
+ * [1] = Boolean booVariable = (Boolean) varibles[i + 1]; representa si el
+ * valor necesita o no ''(comillas simples)usado para campos de tipo string
+ *
+ * [2] = Object value = varibles[i + 2]; representa el valor que se va a
+ * buscar en la BD
+ *
+ * [3] = String comparator = (String) varibles[i + 3]; representa que tipo
+ * de busqueda voy a hacer.., ejemplo: where nombre=william o where nombre<>william,
+ * en este campo iria el tipo de comparador que quiero si es = o <>
+ *
+ * Se itera de 4 en 4..., entonces 4 registros del arreglo representan 1
+ * busqueda en un campo, si se ponen mas pues el continuara buscando en lo
+ * que se le ingresen en los otros 4
+ *
+ *
+ * @param variablesBetween
+ *
+ * la diferencia son estas dos posiciones
+ *
+ * [0] = String variable = (String) varibles[j]; la variable ne la BD que va
+ * a ser buscada en un rango
+ *
+ * [1] = Object value = varibles[j + 1]; valor 1 para buscar en un rango
+ *
+ * [2] = Object value2 = varibles[j + 2]; valor 2 para buscar en un rango
+ * ejempolo: a > 1 and a < 5 --> 1 seria value y 5 seria value2
+ *
+ * [3] = String comparator1 = (String) varibles[j + 3]; comparador 1
+ * ejemplo: a comparator1 1 and a < 5
+ *
+ * [4] = String comparator2 = (String) varibles[j + 4]; comparador 2
+ * ejemplo: a comparador1>1 and a comparador2<5 (el original: a > 1 and a <
+ * 5) *
+ * @param variablesBetweenDates(en
+ * este caso solo para mysql)
+ * [0] = String variable = (String) varibles[k]; el nombre de la variable que hace referencia a
+ * una fecha
+ *
+ * [1] = Object object1 = varibles[k + 2]; fecha 1 a comparar(deben ser
+ * dates)
+ *
+ * [2] = Object object2 = varibles[k + 3]; fecha 2 a comparar(deben ser
+ * dates)
+ *
+ * esto hace un between entre las dos fechas.
+ *
+ * @return lista con los objetos que se necesiten
+ * @throws Exception
+ */
+ public List findByCriteria(Object[] variables,
+ Object[] variablesBetween, Object[] variablesBetweenDates)
+ throws Exception {
+ List list = new ArrayList();
+ String where = new String();
+ String tempWhere = new String();
+
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ if ((variables[i] != null) && (variables[i + 1] != null) &&
+ (variables[i + 2] != null) &&
+ (variables[i + 3] != null)) {
+ String variable = (String) variables[i];
+ Boolean booVariable = (Boolean) variables[i + 1];
+ Object value = variables[i + 2];
+ String comparator = (String) variables[i + 3];
+
+ if (booVariable.booleanValue()) {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " \'" +
+ value + "\' )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " \'" + value + "\' )");
+ } else {
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " " + comparator + " " +
+ value + " )")
+ : (tempWhere + " AND (model." + variable + " " +
+ comparator + " " + value + " )");
+ }
+ }
+
+ i = i + 3;
+ }
+ }
+
+ if (variablesBetween != null) {
+ for (int j = 0; j < variablesBetween.length; j++) {
+ if ((variablesBetween[j] != null) &&
+ (variablesBetween[j + 1] != null) &&
+ (variablesBetween[j + 2] != null) &&
+ (variablesBetween[j + 3] != null) &&
+ (variablesBetween[j + 4] != null)) {
+ String variable = (String) variablesBetween[j];
+ Object value = variablesBetween[j + 1];
+ Object value2 = variablesBetween[j + 2];
+ String comparator1 = (String) variablesBetween[j + 3];
+ String comparator2 = (String) variablesBetween[j + 4];
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(" + value + " " + comparator1 + " " + variable +
+ " and " + variable + " " + comparator2 + " " + value2 +
+ " )")
+ : (tempWhere + " AND (" + value + " " + comparator1 +
+ " " + variable + " and " + variable + " " +
+ comparator2 + " " + value2 + " )");
+ }
+
+ j = j + 4;
+ }
+ }
+
+ if (variablesBetweenDates != null) {
+ for (int k = 0; k < variablesBetweenDates.length; k++) {
+ if ((variablesBetweenDates[k] != null) &&
+ (variablesBetweenDates[k + 1] != null) &&
+ (variablesBetweenDates[k + 2] != null)) {
+ String variable = (String) variablesBetweenDates[k];
+ Object object1 = variablesBetweenDates[k + 1];
+ Object object2 = variablesBetweenDates[k + 2];
+ String value = null;
+ String value2 = null;
+
+ try {
+ Date date1 = (Date) object1;
+ Date date2 = (Date) object2;
+ value = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date1);
+ value2 = Utilities.formatDateWithoutTimeInAStringForBetweenWhere(date2);
+ } catch (Exception e) {
+ list = null;
+ throw e;
+ }
+
+ tempWhere = (tempWhere.length() == 0)
+ ? ("(model." + variable + " between \'" + value +
+ "\' and \'" + value2 + "\')")
+ : (tempWhere + " AND (model." + variable +
+ " between \'" + value + "\' and \'" + value2 + "\')");
+ }
+
+ k = k + 2;
+ }
+ }
+
+ if (tempWhere.length() == 0) {
+ where = null;
+ } else {
+ where = "(" + tempWhere + ")";
+ }
+
+ try {
+ list = JPADaoFactory.getInstance().getCpTipoMovimientoDAO()
+ .findByCriteria(where);
+ } catch (Exception e) {
+ throw new Exception(e.getMessage());
+ } finally {
+ }
+
+ return list;
+ }
+}
diff --git a/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpUsuariosLogic.java b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpUsuariosLogic.java
new file mode 100644
index 0000000..4b73d27
--- /dev/null
+++ b/CuentasPersonales/generado/org/zathura/cuentas/personales/control/CpUsuariosLogic.java
@@ -0,0 +1,478 @@
+package org.zathura.cuentas.personales.control;
+
+import org.zathura.cuentas.dataaccess.daoFactory.JPADaoFactory;
+import org.zathura.cuentas.dataaccess.entityManager.EntityManagerHelper;
+import org.zathura.cuentas.exceptions.*;
+import org.zathura.cuentas.personales.*;
+import org.zathura.cuentas.personales.dto.CpUsuariosDTO;
+import org.zathura.cuentas.utilities.Utilities;
+
+import java.math.BigDecimal;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * interface CpUsuariosLogic
+ * @author Zathura Code Generator http://code.google.com/p/zathura
+ *
+ */
+public class CpUsuariosLogic implements ICpUsuariosLogic {
+ public List getCpUsuarios() throws Exception {
+ List list = new ArrayList();
+
+ try {
+ list = JPADaoFactory.getInstance().getCpUsuariosDAO().findAll(0);
+ } catch (Exception e) {
+ throw new ZMessManager().new GettingException(ZMessManager.ALL +
+ "CpUsuarios");
+ } finally {
+ }
+
+ return list;
+ }
+
+ public void saveCpUsuarios(String activo, String apellido,
+ String contrasena, String correo, Long idUsuario, Long movil,
+ String nombre, String observaciones) throws Exception {
+ CpUsuarios entity = null;
+
+ try {
+ if ((activo != null) &&
+ (Utilities.checkWordAndCheckWithlength(activo, 1) == false)) {
+ throw new ZMessManager().new NotValidFormatException("activo");
+ }
+
+ if ((apellido != null) &&
+ (Utilities.checkWordAndCheckWithlength(apellido, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException("apellido");
+ }
+
+ if ((contrasena != null) &&
+ (Utilities.checkWordAndCheckWithlength(contrasena, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "contrasena");
+ }
+
+ if ((correo != null) &&
+ (Utilities.checkWordAndCheckWithlength(correo, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException("correo");
+ }
+
+ if (idUsuario == null) {
+ throw new ZMessManager().new EmptyFieldException("idUsuario");
+ }
+
+ if ((idUsuario != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idUsuario, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idUsuario");
+ }
+
+ if ((movil != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ movil, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("movil");
+ }
+
+ if ((nombre != null) &&
+ (Utilities.checkWordAndCheckWithlength(nombre, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException("nombre");
+ }
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ entity = getCpUsuarios(idUsuario);
+
+ if (entity != null) {
+ throw new ZMessManager(ZMessManager.ENTITY_WITHSAMEKEY);
+ }
+
+ entity = new CpUsuarios();
+ entity.setActivo(activo);
+ entity.setApellido(apellido);
+ entity.setContrasena(contrasena);
+ entity.setCorreo(correo);
+ entity.setIdUsuario(idUsuario);
+ entity.setMovil(movil);
+ entity.setNombre(nombre);
+ entity.setObservaciones(observaciones);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpUsuariosDAO().save(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void deleteCpUsuarios(Long idUsuario) throws Exception {
+ CpUsuarios entity = null;
+
+ if (idUsuario == null) {
+ throw new ZMessManager().new EmptyFieldException("idUsuario");
+ }
+
+ List cpMovimientos = null;
+ entity = getCpUsuarios(idUsuario);
+
+ if (entity == null) {
+ throw new ZMessManager().new EmptyFieldException("CpUsuarios");
+ }
+
+ try {
+ cpMovimientos = JPADaoFactory.getInstance().getCpMovimientoDAO()
+ .findByProperty("cpUsuarios.idUsuario",
+ idUsuario, 0);
+
+ if (Utilities.validationsList(cpMovimientos) == true) {
+ throw new ZMessManager().new DeletingException("cpMovimientos");
+ }
+
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpUsuariosDAO().delete(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public void updateCpUsuarios(String activo, String apellido,
+ String contrasena, String correo, Long idUsuario, Long movil,
+ String nombre, String observaciones) throws Exception {
+ CpUsuarios entity = null;
+
+ try {
+ if ((activo != null) &&
+ (Utilities.checkWordAndCheckWithlength(activo, 1) == false)) {
+ throw new ZMessManager().new NotValidFormatException("activo");
+ }
+
+ if ((apellido != null) &&
+ (Utilities.checkWordAndCheckWithlength(apellido, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException("apellido");
+ }
+
+ if ((contrasena != null) &&
+ (Utilities.checkWordAndCheckWithlength(contrasena, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "contrasena");
+ }
+
+ if ((correo != null) &&
+ (Utilities.checkWordAndCheckWithlength(correo, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException("correo");
+ }
+
+ if (idUsuario == null) {
+ throw new ZMessManager().new EmptyFieldException("idUsuario");
+ }
+
+ if ((idUsuario != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ idUsuario, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "idUsuario");
+ }
+
+ if ((movil != null) &&
+ (Utilities.checkNumberAndCheckWithPrecisionAndScale("" +
+ movil, 22, 0) == false)) {
+ throw new ZMessManager().new NotValidFormatException("movil");
+ }
+
+ if ((nombre != null) &&
+ (Utilities.checkWordAndCheckWithlength(nombre, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException("nombre");
+ }
+
+ if ((observaciones != null) &&
+ (Utilities.checkWordAndCheckWithlength(observaciones, 50) == false)) {
+ throw new ZMessManager().new NotValidFormatException(
+ "observaciones");
+ }
+
+ entity = getCpUsuarios(idUsuario);
+
+ if (entity == null) {
+ throw new ZMessManager(ZMessManager.ENTITY_NOENTITYTOUPDATE);
+ }
+
+ entity.setActivo(activo);
+ entity.setApellido(apellido);
+ entity.setContrasena(contrasena);
+ entity.setCorreo(correo);
+ entity.setIdUsuario(idUsuario);
+ entity.setMovil(movil);
+ entity.setNombre(nombre);
+ entity.setObservaciones(observaciones);
+ EntityManagerHelper.beginTransaction();
+ JPADaoFactory.getInstance().getCpUsuariosDAO().update(entity);
+ EntityManagerHelper.commit();
+ } catch (Exception e) {
+ EntityManagerHelper.rollback();
+ throw e;
+ } finally {
+ EntityManagerHelper.closeEntityManager();
+ }
+ }
+
+ public CpUsuarios getCpUsuarios(Long idUsuario) throws Exception {
+ CpUsuarios entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpUsuariosDAO()
+ .findById(idUsuario);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpUsuarios");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ public List getDataCpUsuarios() throws Exception {
+ try {
+ List cpUsuarios = JPADaoFactory.getInstance()
+ .getCpUsuariosDAO()
+ .findAll(0);
+
+ List cpUsuariosDTO = new ArrayList();
+
+ for (CpUsuarios cpUsuariosTmp : cpUsuarios) {
+ CpUsuariosDTO cpUsuariosDTO2 = new CpUsuariosDTO();
+
+ cpUsuariosDTO2.setIdUsuario(cpUsuariosTmp.getIdUsuario());
+ cpUsuariosDTO2.setActivo((cpUsuariosTmp.getActivo() != null)
+ ? cpUsuariosTmp.getActivo() : null);
+ cpUsuariosDTO2.setApellido((cpUsuariosTmp.getApellido() != null)
+ ? cpUsuariosTmp.getApellido() : null);
+ cpUsuariosDTO2.setContrasena((cpUsuariosTmp.getContrasena() != null)
+ ? cpUsuariosTmp.getContrasena() : null);
+ cpUsuariosDTO2.setCorreo((cpUsuariosTmp.getCorreo() != null)
+ ? cpUsuariosTmp.getCorreo() : null);
+ cpUsuariosDTO2.setMovil((cpUsuariosTmp.getMovil() != null)
+ ? cpUsuariosTmp.getMovil() : null);
+ cpUsuariosDTO2.setNombre((cpUsuariosTmp.getNombre() != null)
+ ? cpUsuariosTmp.getNombre() : null);
+ cpUsuariosDTO2.setObservaciones((cpUsuariosTmp.getObservaciones() != null)
+ ? cpUsuariosTmp.getObservaciones() : null);
+ cpUsuariosDTO.add(cpUsuariosDTO2);
+ }
+
+ return cpUsuariosDTO;
+ } catch (Exception e) {
+ throw e;
+ }
+ }
+
+ public List findPageCpUsuarios(String sortColumnName,
+ boolean sortAscending, int startRow, int maxResults)
+ throws Exception {
+ List entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpUsuariosDAO()
+ .findPageCpUsuarios(sortColumnName,
+ sortAscending, startRow, maxResults);
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpUsuarios");
+ }
+
+ return entity;
+ }
+
+ public Long findTotalNumberCpUsuarios() throws Exception {
+ Long entity = null;
+
+ try {
+ entity = JPADaoFactory.getInstance().getCpUsuariosDAO()
+ .findTotalNumberCpUsuarios();
+ } catch (Exception e) {
+ throw new ZMessManager().new FindingException("CpUsuarios Count");
+ } finally {
+ }
+
+ return entity;
+ }
+
+ /**
+ *
+ * @param varibles
+ * este arreglo debera tener:
+ *
+ * [0] = String variable = (String) varibles[i]; representa como se llama la
+ * variable en el pojo
+ *
+ * [1] = Boolean booVariable = (Boolean) varibles[i + 1]; representa si el
+ * valor necesita o no ''(comillas simples)usado para campos de tipo string
+ *
+ * [2] = Object value = varibles[i + 2]; representa el valor que se va a
+ * buscar en la BD
+ *
+ * [3] = String comparator = (String) varibles[i + 3]; representa que tipo
+ * de busqueda voy a hacer.., ejemplo: where nombre=william o where nombre<>william,
+ * en este campo iria el tipo de comparador que quiero si es = o <>
+ *
+ * Se itera de 4 en 4..., entonces 4 registros del arreglo representan 1
+ * busqueda en un campo, si se ponen mas pues el continuara buscando en lo
+ * que se le ingresen en los otros 4
+ *
+ *
+ * @param variablesBetween
+ *
+ * la diferencia son estas dos posiciones
+ *
+ * [0] = String variable = (String) varibles[j]; la variable ne la BD que va
+ * a ser buscada en un rango
+ *
+ * [1] = Object value = varibles[j + 1]; valor 1 para buscar en un rango
+ *
+ * [2] = Object value2 = varibles[j + 2]; valor 2 para buscar en un rango
+ * ejempolo: a > 1 and a < 5 --> 1 seria value y 5 seria value2
+ *
+ * [3] = String comparator1 = (String) varibles[j + 3]; comparador 1
+ * ejemplo: a comparator1 1 and a < 5
+ *
+ * [4] = String comparator2 = (String) varibles[j + 4]; comparador 2
+ * ejemplo: a comparador1>1 and a comparador2<5 (el original: a > 1 and a <
+ * 5) *
+ * @param variablesBetweenDates(en
+ * este caso solo para mysql)
+ * [0] = String variable = (String) varibles[k]; el nombre de la variable que hace referencia a
+ * una fecha
+ *
+ * [1] = Object object1 = varibles[k + 2]; fecha 1 a comparar(deben ser
+ * dates)
+ *
+ * [2] = Object object2 = varibles[k + 3]; fecha 2 a comparar(deben ser
+ * dates)
+ *
+ * esto hace un between entre las dos fechas.
+ *
+ * @return lista con los objetos que se necesiten
+ * @throws Exception
+ */
+ public List