This commit is contained in:
Daniel Cortés
2019-07-17 16:14:55 -04:00
commit c21919db55
134 changed files with 25294 additions and 0 deletions

68
bank-ejb/build.xml Normal file
View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="bank-ejb" default="default" basedir="." xmlns:ejbjarproject="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
<description>Builds, tests, and runs the project bank-ejb.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying
(Targets beginning with '-' are not intended to be called on their own.)
Example of pluging an obfuscator after the compilation could look like
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
init-macrodef-javac: defines macro for javac compilation
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.
-->
</project>

View File

@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2008, 2016 Oracle and/or its affiliates. All rights reserved.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://www.netbeans.org/cddl-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License. When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
Contributor(s):
-->
<project default="-deploy-ant" basedir=".">
<target name="-init-cl-deployment-env" if="deploy.ant.enabled">
<property file="${deploy.ant.properties.file}" />
<available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
<available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
<available file="${deploy.ant.resource.dir}" property="has.setup"/>
<tempfile prefix="pfv3" property="pfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<echo message="AS_ADMIN_PASSWORD=${pfv3.password}" file="${pfv3.password.file}"/>
</target>
<target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
<tempfile prefix="pfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
<copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
<!-- The doctype triggers resolution which can fail -->
<replace file="${temp.sun.web}">
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
</replace>
<replace file="${temp.sun.web}">
<replacetoken><![CDATA[<sun-web-app]]></replacetoken>
<replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
</replace>
<xmlproperty file="${temp.sun.web}" validate="false">
</xmlproperty>
<delete file="${temp.sun.web}"/>
<condition property="deploy.ant.client.url" value="${pfv3.url}${sun-web-app.context-root}" else="${pfv3.url}/${ant.project.name}">
<isset property="sun-web-app.context-root"/>
</condition>
<condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
<isset property="sun-web-app.context-root"/>
</condition>
</target>
<target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
<tempfile prefix="pfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
<copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
<!-- The doctype triggers resolution which can fail -->
<replace file="${temp.gf.web}">
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
</replace>
<replace file="${temp.gf.web}">
<replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
<replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
</replace>
<xmlproperty file="${temp.gf.web}" validate="false">
</xmlproperty>
<delete file="${temp.gf.web}"/>
<condition property="deploy.ant.client.url" value="${pfv3.url}${glassfish-web-app.context-root}" else="${pfv3.url}/${ant.project.name}">
<isset property="glassfish-web-app.context-root"/>
</condition>
<condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
<isset property="glassfish-web-app.context-root"/>
</condition>
</target>
<target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
<property name="deploy.context.root.argument" value=""/>
</target>
<target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
<tempfile prefix="pfv3" property="pfv3.resources.dir" destdir="${java.io.tmpdir}"/>
<mkdir dir="${pfv3.resources.dir}"/>
<mkdir dir="${pfv3.resources.dir}/META-INF"/>
<copy todir="${pfv3.resources.dir}/META-INF">
<fileset dir="${deploy.ant.resource.dir}"/>
</copy>
<jar destfile="${deploy.ant.archive}" update="true">
<fileset dir="${pfv3.resources.dir}"/>
</jar>
<delete dir="${pfv3.resources.dir}"/>
</target>
<target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
<antcall target="-deploy-without-pw"/>
<antcall target="-deploy-with-pw"/>
</target>
<target name="-deploy-without-pw" unless="pfv3.password">
<echo message="Deploying ${deploy.ant.archive}"/>
<tempfile prefix="pfv3" property="pfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
<get src="${pfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
dest="${pfv3.results.file}"/>
<delete file="${pfv3.results.file}"/>
</target>
<target name="-deploy-with-pw" if="pfv3.password">
<echo message="Deploying ${deploy.ant.archive}"/>
<tempfile prefix="pfv3" property="pfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
<get username="${pfv3.username}" password="${pfv3.password}" src="${pfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
dest="${pfv3.results.file}"/>
<delete file="${pfv3.results.file}"/>
</target>
<target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
<antcall target="-undeploy-without-pw"/>
<antcall target="-undeploy-with-pw"/>
</target>
<target name="-undeploy-without-pw" unless="pfv3.password">
<echo message="Undeploying ${deploy.ant.archive}"/>
<tempfile prefix="pfv3" property="pfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<get src="${pfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
dest="${pfv3.results.file}"/>
<delete file="${pfv3.results.file}"/>
</target>
<target name="-undeploy-with-pw" if="pfv3.password">
<echo message="Undeploying ${deploy.ant.archive}"/>
<tempfile prefix="pfv3" property="pfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<get username="${pfv3.username}" password="${pfv3.password}" src="${pfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
dest="${pfv3.results.file}"/>
<delete file="${pfv3.results.file}"/>
</target>
</project>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
build.xml.data.CRC32=484327a3
build.xml.script.CRC32=94cd987b
build.xml.stylesheet.CRC32=5910fda3@1.56.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=484327a3
nbproject/build-impl.xml.script.CRC32=ef3f7026
nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.56.1

View File

@@ -0,0 +1,76 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=true
annotation.processing.processor.options=-Aeclipselink.canonicalmodel.use_static_factory=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form,**/.nbattrs
build.dir=build
build.ear.classes.dir=${build.dir}/classes
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=${javac.classpath}:${build.classes.dir}
debug.test.classpath=\
${run.test.classpath}
dist.dir=dist
dist.ear.jar=${dist.dir}/${jar.name}
dist.jar=${dist.dir}/${jar.name}
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=\
${libs.javaee-endorsed-api-7.0.classpath}
excludes=
includes=**
j2ee.compile.on.save=true
j2ee.deploy.on.save=true
j2ee.platform=1.7
j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jakarta.xml.bind-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.security.enterprise.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.security.enterprise-api.jar:${j2ee.server.home}/modules/javax.json.bind-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar
j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar
j2ee.platform.wsit.classpath=
j2ee.server.type=pfv3ee6
jar.compress=false
jar.name=bank-ejb.jar
javac.classpath=
javac.debug=true
javac.deprecation=false
javac.processorpath=\
${javac.classpath}:\
${libs.eclipselink.classpath}:\
${libs.eclipselinkmodelgen.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.preview=true
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
meta.inf=${source.root}/conf
meta.inf.excludes=sun-cmp-mappings.xml
platform.active=default_platform
resource.dir=setup
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
# Space-separated list of JVM arguments used when running a class with a main method or a unit test
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
runmain.jvmargs=
source.encoding=UTF-8
source.root=src
src.dir=${source.root}/java
test.src.dir=test

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.j2ee.ejbjarproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
<name>bank-ejb</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<source-roots>
<root id="src.dir" name="Source Packages"/>
</source-roots>
<test-roots>
<root id="test.src.dir" name="Test Packages"/>
</test-roots>
</data>
</configuration>
</project>

View File

@@ -0,0 +1,2 @@
Manifest-Version: 1.0

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="bank-ejbPU" transaction-type="JTA">
<jta-data-source>bank_jndi</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties/>
</persistence-unit>
</persistence>

View File

@@ -0,0 +1,64 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import java.util.List;
import javax.persistence.EntityManager;
/**
*
* @author ryuuji
*/
public abstract class AbstractFacade<T> {
private Class<T> entityClass;
public AbstractFacade(Class<T> entityClass) {
this.entityClass = entityClass;
}
protected abstract EntityManager getEntityManager();
public void create(T entity) {
getEntityManager().persist(entity);
}
public void edit(T entity) {
getEntityManager().merge(entity);
}
public void remove(T entity) {
getEntityManager().remove(getEntityManager().merge(entity));
}
public T find(Object id) {
return getEntityManager().find(entityClass, id);
}
public List<T> findAll() {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(cq).getResultList();
}
public List<T> findRange(int[] range) {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
javax.persistence.Query q = getEntityManager().createQuery(cq);
q.setMaxResults(range[1] - range[0] + 1);
q.setFirstResult(range[0]);
return q.getResultList();
}
public int count() {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
javax.persistence.criteria.Root<T> rt = cq.from(entityClass);
cq.select(getEntityManager().getCriteriaBuilder().count(rt));
javax.persistence.Query q = getEntityManager().createQuery(cq);
return ((Long) q.getSingleResult()).intValue();
}
}

View File

@@ -0,0 +1,47 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.Cliente;
import entities.Usuario;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.NonUniqueResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
/**
*
* @author ryuuji
*/
@Stateless
public class ClienteFacade extends AbstractFacade<Cliente> implements ClienteFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public ClienteFacade() {
super(Cliente.class);
}
@Override
public Cliente findByRut(String rut) {
TypedQuery<Cliente> query = em.createNamedQuery("Cliente.findByRut", Cliente.class);
query.setParameter("rut", rut);
try {
return query.getSingleResult();
} catch (NoResultException | NonUniqueResultException ex) {
return null;
}
}
}

View File

@@ -0,0 +1,35 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.Cliente;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface ClienteFacadeLocal {
void create(Cliente cliente);
void edit(Cliente cliente);
void remove(Cliente cliente);
Cliente find(Object id);
Cliente findByRut(String rut);
List<Cliente> findAll();
List<Cliente> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.CompraTarjetaCredito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class CompraTarjetaCreditoFacade extends AbstractFacade<CompraTarjetaCredito> implements CompraTarjetaCreditoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public CompraTarjetaCreditoFacade() {
super(CompraTarjetaCredito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.CompraTarjetaCredito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface CompraTarjetaCreditoFacadeLocal {
void create(CompraTarjetaCredito compraTarjetaCredito);
void edit(CompraTarjetaCredito compraTarjetaCredito);
void remove(CompraTarjetaCredito compraTarjetaCredito);
CompraTarjetaCredito find(Object id);
List<CompraTarjetaCredito> findAll();
List<CompraTarjetaCredito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.CompraTarjetaDebito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class CompraTarjetaDebitoFacade extends AbstractFacade<CompraTarjetaDebito> implements CompraTarjetaDebitoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public CompraTarjetaDebitoFacade() {
super(CompraTarjetaDebito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.CompraTarjetaDebito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface CompraTarjetaDebitoFacadeLocal {
void create(CompraTarjetaDebito compraTarjetaDebito);
void edit(CompraTarjetaDebito compraTarjetaDebito);
void remove(CompraTarjetaDebito compraTarjetaDebito);
CompraTarjetaDebito find(Object id);
List<CompraTarjetaDebito> findAll();
List<CompraTarjetaDebito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.CuentaCorriente;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class CuentaCorrienteFacade extends AbstractFacade<CuentaCorriente> implements CuentaCorrienteFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public CuentaCorrienteFacade() {
super(CuentaCorriente.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.CuentaCorriente;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface CuentaCorrienteFacadeLocal {
void create(CuentaCorriente cuentaCorriente);
void edit(CuentaCorriente cuentaCorriente);
void remove(CuentaCorriente cuentaCorriente);
CuentaCorriente find(Object id);
List<CuentaCorriente> findAll();
List<CuentaCorriente> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.DepositoCuentaCorriente;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class DepositoCuentaCorrienteFacade extends AbstractFacade<DepositoCuentaCorriente> implements DepositoCuentaCorrienteFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public DepositoCuentaCorrienteFacade() {
super(DepositoCuentaCorriente.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.DepositoCuentaCorriente;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface DepositoCuentaCorrienteFacadeLocal {
void create(DepositoCuentaCorriente depositoCuentaCorriente);
void edit(DepositoCuentaCorriente depositoCuentaCorriente);
void remove(DepositoCuentaCorriente depositoCuentaCorriente);
DepositoCuentaCorriente find(Object id);
List<DepositoCuentaCorriente> findAll();
List<DepositoCuentaCorriente> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.DepositoTarjetaDebito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class DepositoTarjetaDebitoFacade extends AbstractFacade<DepositoTarjetaDebito> implements DepositoTarjetaDebitoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public DepositoTarjetaDebitoFacade() {
super(DepositoTarjetaDebito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.DepositoTarjetaDebito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface DepositoTarjetaDebitoFacadeLocal {
void create(DepositoTarjetaDebito depositoTarjetaDebito);
void edit(DepositoTarjetaDebito depositoTarjetaDebito);
void remove(DepositoTarjetaDebito depositoTarjetaDebito);
DepositoTarjetaDebito find(Object id);
List<DepositoTarjetaDebito> findAll();
List<DepositoTarjetaDebito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.GiroCuentaCorriente;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class GiroCuentaCorrienteFacade extends AbstractFacade<GiroCuentaCorriente> implements GiroCuentaCorrienteFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public GiroCuentaCorrienteFacade() {
super(GiroCuentaCorriente.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.GiroCuentaCorriente;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface GiroCuentaCorrienteFacadeLocal {
void create(GiroCuentaCorriente giroCuentaCorriente);
void edit(GiroCuentaCorriente giroCuentaCorriente);
void remove(GiroCuentaCorriente giroCuentaCorriente);
GiroCuentaCorriente find(Object id);
List<GiroCuentaCorriente> findAll();
List<GiroCuentaCorriente> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.GiroTarjetaDebito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class GiroTarjetaDebitoFacade extends AbstractFacade<GiroTarjetaDebito> implements GiroTarjetaDebitoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public GiroTarjetaDebitoFacade() {
super(GiroTarjetaDebito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.GiroTarjetaDebito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface GiroTarjetaDebitoFacadeLocal {
void create(GiroTarjetaDebito giroTarjetaDebito);
void edit(GiroTarjetaDebito giroTarjetaDebito);
void remove(GiroTarjetaDebito giroTarjetaDebito);
GiroTarjetaDebito find(Object id);
List<GiroTarjetaDebito> findAll();
List<GiroTarjetaDebito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.LineaSobregiro;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class LineaSobregiroFacade extends AbstractFacade<LineaSobregiro> implements LineaSobregiroFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public LineaSobregiroFacade() {
super(LineaSobregiro.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.LineaSobregiro;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface LineaSobregiroFacadeLocal {
void create(LineaSobregiro lineaSobregiro);
void edit(LineaSobregiro lineaSobregiro);
void remove(LineaSobregiro lineaSobregiro);
LineaSobregiro find(Object id);
List<LineaSobregiro> findAll();
List<LineaSobregiro> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.Metodo;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class MetodoFacade extends AbstractFacade<Metodo> implements MetodoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public MetodoFacade() {
super(Metodo.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.Metodo;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface MetodoFacadeLocal {
void create(Metodo metodo);
void edit(Metodo metodo);
void remove(Metodo metodo);
Metodo find(Object id);
List<Metodo> findAll();
List<Metodo> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.PagoTarjetaCredito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class PagoTarjetaCreditoFacade extends AbstractFacade<PagoTarjetaCredito> implements PagoTarjetaCreditoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public PagoTarjetaCreditoFacade() {
super(PagoTarjetaCredito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.PagoTarjetaCredito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface PagoTarjetaCreditoFacadeLocal {
void create(PagoTarjetaCredito pagoTarjetaCredito);
void edit(PagoTarjetaCredito pagoTarjetaCredito);
void remove(PagoTarjetaCredito pagoTarjetaCredito);
PagoTarjetaCredito find(Object id);
List<PagoTarjetaCredito> findAll();
List<PagoTarjetaCredito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TarjetaCredito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class TarjetaCreditoFacade extends AbstractFacade<TarjetaCredito> implements TarjetaCreditoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public TarjetaCreditoFacade() {
super(TarjetaCredito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TarjetaCredito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface TarjetaCreditoFacadeLocal {
void create(TarjetaCredito tarjetaCredito);
void edit(TarjetaCredito tarjetaCredito);
void remove(TarjetaCredito tarjetaCredito);
TarjetaCredito find(Object id);
List<TarjetaCredito> findAll();
List<TarjetaCredito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TarjetaDebito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class TarjetaDebitoFacade extends AbstractFacade<TarjetaDebito> implements TarjetaDebitoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public TarjetaDebitoFacade() {
super(TarjetaDebito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TarjetaDebito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface TarjetaDebitoFacadeLocal {
void create(TarjetaDebito tarjetaDebito);
void edit(TarjetaDebito tarjetaDebito);
void remove(TarjetaDebito tarjetaDebito);
TarjetaDebito find(Object id);
List<TarjetaDebito> findAll();
List<TarjetaDebito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TransferenciaCuentaCorriente;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class TransferenciaCuentaCorrienteFacade extends AbstractFacade<TransferenciaCuentaCorriente> implements TransferenciaCuentaCorrienteFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public TransferenciaCuentaCorrienteFacade() {
super(TransferenciaCuentaCorriente.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TransferenciaCuentaCorriente;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface TransferenciaCuentaCorrienteFacadeLocal {
void create(TransferenciaCuentaCorriente transferenciaCuentaCorriente);
void edit(TransferenciaCuentaCorriente transferenciaCuentaCorriente);
void remove(TransferenciaCuentaCorriente transferenciaCuentaCorriente);
TransferenciaCuentaCorriente find(Object id);
List<TransferenciaCuentaCorriente> findAll();
List<TransferenciaCuentaCorriente> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TransferenciaTarjetaDebito;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author ryuuji
*/
@Stateless
public class TransferenciaTarjetaDebitoFacade extends AbstractFacade<TransferenciaTarjetaDebito> implements TransferenciaTarjetaDebitoFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public TransferenciaTarjetaDebitoFacade() {
super(TransferenciaTarjetaDebito.class);
}
}

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.TransferenciaTarjetaDebito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface TransferenciaTarjetaDebitoFacadeLocal {
void create(TransferenciaTarjetaDebito transferenciaTarjetaDebito);
void edit(TransferenciaTarjetaDebito transferenciaTarjetaDebito);
void remove(TransferenciaTarjetaDebito transferenciaTarjetaDebito);
TransferenciaTarjetaDebito find(Object id);
List<TransferenciaTarjetaDebito> findAll();
List<TransferenciaTarjetaDebito> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,45 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.Usuario;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.NonUniqueResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
/**
*
* @author ryuuji
*/
@Stateless
public class UsuarioFacade extends AbstractFacade<Usuario> implements UsuarioFacadeLocal {
@PersistenceContext(unitName = "bank-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public UsuarioFacade() {
super(Usuario.class);
}
@Override
public Usuario findByNombre(String name) {
TypedQuery<Usuario> query = em.createNamedQuery("Usuario.findByNombre", Usuario.class);
query.setParameter("nombre", name);
try{
return query.getSingleResult();
}catch(NoResultException|NonUniqueResultException ex){
return null;
}
}
}

View File

@@ -0,0 +1,35 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import entities.Usuario;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author ryuuji
*/
@Local
public interface UsuarioFacadeLocal {
void create(Usuario usuario);
void edit(Usuario usuario);
void remove(Usuario usuario);
Usuario find(Object id);
Usuario findByNombre(String name);
List<Usuario> findAll();
List<Usuario> findRange(int[] range);
int count();
}

View File

@@ -0,0 +1,201 @@
package entities;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "cliente")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Cliente.findAll", query = "SELECT c FROM Cliente c")
, @NamedQuery(name = "Cliente.findById", query = "SELECT c FROM Cliente c WHERE c.id = :id")
, @NamedQuery(name = "Cliente.findByRut", query = "SELECT c FROM Cliente c WHERE c.rut = :rut")
, @NamedQuery(name = "Cliente.findByNombre", query = "SELECT c FROM Cliente c WHERE c.nombre = :nombre")
, @NamedQuery(name = "Cliente.findByCiudad", query = "SELECT c FROM Cliente c WHERE c.ciudad = :ciudad")
, @NamedQuery(name = "Cliente.findByInsertedAt", query = "SELECT c FROM Cliente c WHERE c.insertedAt = :insertedAt")})
public class Cliente implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "rut")
private String rut;
@Basic(optional = false)
@Column(name = "nombre")
private String nombre;
@Basic(optional = false)
@Column(name = "ciudad")
private String ciudad;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "cliente")
private List<CuentaCorriente> cuentaCorrienteList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "cliente")
private List<TarjetaDebito> tarjetaDebitoList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "cliente")
private List<TarjetaCredito> tarjetaCreditoList;
@JoinColumn(name = "linea_sobregiro", referencedColumnName = "id")
@OneToOne(optional = true)
private LineaSobregiro lineaSobregiro;
@JoinColumn(name = "usuario", referencedColumnName = "id")
@OneToOne(optional = false)
private Usuario usuario;
public Cliente() {
}
public Cliente(Integer id) {
this.id = id;
}
public Cliente(Integer id, String rut, String nombre, String ciudad, Date insertedAt) {
this.id = id;
this.rut = rut;
this.nombre = nombre;
this.ciudad = ciudad;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getRut() {
return rut;
}
public void setRut(String rut) {
this.rut = rut;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getCiudad() {
return ciudad;
}
public void setCiudad(String ciudad) {
this.ciudad = ciudad;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
@XmlTransient
public List<CuentaCorriente> getCuentaCorrienteList() {
if (cuentaCorrienteList == null)
cuentaCorrienteList = new ArrayList<>();
return cuentaCorrienteList;
}
public void setCuentaCorrienteList(List<CuentaCorriente> cuentaCorrienteList) {
this.cuentaCorrienteList = cuentaCorrienteList;
}
@XmlTransient
public List<TarjetaDebito> getTarjetaDebitoList() {
return tarjetaDebitoList;
}
public void setTarjetaDebitoList(List<TarjetaDebito> tarjetaDebitoList) {
if (tarjetaDebitoList == null)
tarjetaDebitoList = new ArrayList<>();
this.tarjetaDebitoList = tarjetaDebitoList;
}
@XmlTransient
public List<TarjetaCredito> getTarjetaCreditoList() {
return tarjetaCreditoList;
}
public void setTarjetaCreditoList(List<TarjetaCredito> tarjetaCreditoList) {
if (tarjetaCreditoList == null)
tarjetaCreditoList = new ArrayList<>();
this.tarjetaCreditoList = tarjetaCreditoList;
}
public LineaSobregiro getLineaSobregiro() {
return lineaSobregiro;
}
public void setLineaSobregiro(LineaSobregiro lineaSobregiro) {
this.lineaSobregiro = lineaSobregiro;
}
public Usuario getUsuario() {
return usuario;
}
public void setUsuario(Usuario usuario) {
this.usuario = usuario;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Cliente)) {
return false;
}
Cliente other = (Cliente) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.Cliente[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,136 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "compra_tarjeta_credito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "CompraTarjetaCredito.findAll", query = "SELECT c FROM CompraTarjetaCredito c")
, @NamedQuery(name = "CompraTarjetaCredito.findById", query = "SELECT c FROM CompraTarjetaCredito c WHERE c.id = :id")
, @NamedQuery(name = "CompraTarjetaCredito.findByMonto", query = "SELECT c FROM CompraTarjetaCredito c WHERE c.monto = :monto")
, @NamedQuery(name = "CompraTarjetaCredito.findByComentario", query = "SELECT c FROM CompraTarjetaCredito c WHERE c.comentario = :comentario")
, @NamedQuery(name = "CompraTarjetaCredito.findByInsertedAt", query = "SELECT c FROM CompraTarjetaCredito c WHERE c.insertedAt = :insertedAt")})
public class CompraTarjetaCredito implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "tarjeta_credito", referencedColumnName = "id")
@ManyToOne
private TarjetaCredito tarjetaCredito;
public CompraTarjetaCredito() {
}
public CompraTarjetaCredito(Integer id) {
this.id = id;
}
public CompraTarjetaCredito(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public TarjetaCredito getTarjetaCredito() {
return tarjetaCredito;
}
public void setTarjetaCredito(TarjetaCredito tarjetaCredito) {
this.tarjetaCredito = tarjetaCredito;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof CompraTarjetaCredito)) {
return false;
}
CompraTarjetaCredito other = (CompraTarjetaCredito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.CompraTarjetaCredito[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,136 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "compra_tarjeta_debito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "CompraTarjetaDebito.findAll", query = "SELECT c FROM CompraTarjetaDebito c")
, @NamedQuery(name = "CompraTarjetaDebito.findById", query = "SELECT c FROM CompraTarjetaDebito c WHERE c.id = :id")
, @NamedQuery(name = "CompraTarjetaDebito.findByMonto", query = "SELECT c FROM CompraTarjetaDebito c WHERE c.monto = :monto")
, @NamedQuery(name = "CompraTarjetaDebito.findByComentario", query = "SELECT c FROM CompraTarjetaDebito c WHERE c.comentario = :comentario")
, @NamedQuery(name = "CompraTarjetaDebito.findByInsertedAt", query = "SELECT c FROM CompraTarjetaDebito c WHERE c.insertedAt = :insertedAt")})
public class CompraTarjetaDebito implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "tarjeta_debito", referencedColumnName = "id")
@ManyToOne(optional = false)
private TarjetaDebito tarjetaDebito;
public CompraTarjetaDebito() {
}
public CompraTarjetaDebito(Integer id) {
this.id = id;
}
public CompraTarjetaDebito(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public TarjetaDebito getTarjetaDebito() {
return tarjetaDebito;
}
public void setTarjetaDebito(TarjetaDebito tarjetaDebito) {
this.tarjetaDebito = tarjetaDebito;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof CompraTarjetaDebito)) {
return false;
}
CompraTarjetaDebito other = (CompraTarjetaDebito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.CompraTarjetaDebito[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,172 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "cuenta_corriente")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "CuentaCorriente.findAll", query = "SELECT c FROM CuentaCorriente c")
, @NamedQuery(name = "CuentaCorriente.findById", query = "SELECT c FROM CuentaCorriente c WHERE c.id = :id")
, @NamedQuery(name = "CuentaCorriente.findBySaldo", query = "SELECT c FROM CuentaCorriente c WHERE c.saldo = :saldo")
, @NamedQuery(name = "CuentaCorriente.findByInsertedAt", query = "SELECT c FROM CuentaCorriente c WHERE c.insertedAt = :insertedAt")})
public class CuentaCorriente implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "saldo")
private int saldo;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "cliente", referencedColumnName = "id")
@ManyToOne(optional = false)
private Cliente cliente;
@OneToMany(mappedBy = "cuentaCorriente")
private List<DepositoCuentaCorriente> depositoList;
@OneToMany(mappedBy = "cuentaCorrienteFrom")
private List<TransferenciaCuentaCorriente> transferenciaFromList;
@OneToMany(mappedBy = "cuentaCorrienteTo")
private List<TransferenciaCuentaCorriente> transferenciaToList;
@OneToMany(mappedBy = "cuentaCorriente")
private List<GiroCuentaCorriente> giroList;
public CuentaCorriente() {
}
public CuentaCorriente(Integer id) {
this.id = id;
}
public CuentaCorriente(Integer id, int saldo, Date insertedAt) {
this.id = id;
this.saldo = saldo;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getSaldo() {
return saldo;
}
public void setSaldo(int saldo) {
this.saldo = saldo;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
@XmlTransient
public List<DepositoCuentaCorriente> getDepositoList() {
return depositoList;
}
public void setDepositoList(List<DepositoCuentaCorriente> depositoList) {
this.depositoList = depositoList;
}
@XmlTransient
public List<TransferenciaCuentaCorriente> getTransferenciaFromList() {
return transferenciaFromList;
}
public void setTransferenciaFromList(List<TransferenciaCuentaCorriente> transferenciaFromList) {
this.transferenciaFromList = transferenciaFromList;
}
@XmlTransient
public List<TransferenciaCuentaCorriente> getTransferenciaToList() {
return transferenciaToList;
}
public void setTransferenciaToList(List<TransferenciaCuentaCorriente> transferenciaToList) {
this.transferenciaToList = transferenciaToList;
}
@XmlTransient
public List<GiroCuentaCorriente> getGiroList() {
return giroList;
}
public void setGiroList(List<GiroCuentaCorriente> giroList) {
this.giroList = giroList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof CuentaCorriente)) {
return false;
}
CuentaCorriente other = (CuentaCorriente) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.CuentaCorriente[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,147 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "deposito_cuenta_corriente")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "DepositoCuentaCorriente.findAll", query = "SELECT d FROM DepositoCuentaCorriente d")
, @NamedQuery(name = "DepositoCuentaCorriente.findById", query = "SELECT d FROM DepositoCuentaCorriente d WHERE d.id = :id")
, @NamedQuery(name = "DepositoCuentaCorriente.findByMonto", query = "SELECT d FROM DepositoCuentaCorriente d WHERE d.monto = :monto")
, @NamedQuery(name = "DepositoCuentaCorriente.findByComentario", query = "SELECT d FROM DepositoCuentaCorriente d WHERE d.comentario = :comentario")
, @NamedQuery(name = "DepositoCuentaCorriente.findByInsertedAt", query = "SELECT d FROM DepositoCuentaCorriente d WHERE d.insertedAt = :insertedAt")})
public class DepositoCuentaCorriente implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "metodo", referencedColumnName = "id")
@ManyToOne
private Metodo metodo;
@JoinColumn(name = "cuenta_corriente", referencedColumnName = "id")
@ManyToOne
private CuentaCorriente cuentaCorriente;
public DepositoCuentaCorriente() {
}
public DepositoCuentaCorriente(Integer id) {
this.id = id;
}
public DepositoCuentaCorriente(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Metodo getMetodo() {
return metodo;
}
public void setMetodo(Metodo metodo) {
this.metodo = metodo;
}
public CuentaCorriente getCuentaCorriente() {
return cuentaCorriente;
}
public void setCuentaCorriente(CuentaCorriente cuentaCorriente) {
this.cuentaCorriente = cuentaCorriente;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof DepositoCuentaCorriente)) {
return false;
}
DepositoCuentaCorriente other = (DepositoCuentaCorriente) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.DepositoCuentaCorriente[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,147 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "deposito_tarjeta_debito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "DepositoTarjetaDebito.findAll", query = "SELECT d FROM DepositoTarjetaDebito d")
, @NamedQuery(name = "DepositoTarjetaDebito.findById", query = "SELECT d FROM DepositoTarjetaDebito d WHERE d.id = :id")
, @NamedQuery(name = "DepositoTarjetaDebito.findByMonto", query = "SELECT d FROM DepositoTarjetaDebito d WHERE d.monto = :monto")
, @NamedQuery(name = "DepositoTarjetaDebito.findByComentario", query = "SELECT d FROM DepositoTarjetaDebito d WHERE d.comentario = :comentario")
, @NamedQuery(name = "DepositoTarjetaDebito.findByInsertedAt", query = "SELECT d FROM DepositoTarjetaDebito d WHERE d.insertedAt = :insertedAt")})
public class DepositoTarjetaDebito implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "metodo", referencedColumnName = "id")
@ManyToOne
private Metodo metodo;
@JoinColumn(name = "tarjeta_debito", referencedColumnName = "id")
@ManyToOne
private TarjetaDebito tarjetaDebito;
public DepositoTarjetaDebito() {
}
public DepositoTarjetaDebito(Integer id) {
this.id = id;
}
public DepositoTarjetaDebito(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Metodo getMetodo() {
return metodo;
}
public void setMetodo(Metodo metodo) {
this.metodo = metodo;
}
public TarjetaDebito getTarjetaDebito() {
return tarjetaDebito;
}
public void setTarjetaDebito(TarjetaDebito tarjetaDebito) {
this.tarjetaDebito = tarjetaDebito;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof DepositoTarjetaDebito)) {
return false;
}
DepositoTarjetaDebito other = (DepositoTarjetaDebito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.DepositoTarjetaDebito[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,147 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "giro_cuenta_corriente")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "GiroCuentaCorriente.findAll", query = "SELECT g FROM GiroCuentaCorriente g")
, @NamedQuery(name = "GiroCuentaCorriente.findById", query = "SELECT g FROM GiroCuentaCorriente g WHERE g.id = :id")
, @NamedQuery(name = "GiroCuentaCorriente.findByMonto", query = "SELECT g FROM GiroCuentaCorriente g WHERE g.monto = :monto")
, @NamedQuery(name = "GiroCuentaCorriente.findByComentario", query = "SELECT g FROM GiroCuentaCorriente g WHERE g.comentario = :comentario")
, @NamedQuery(name = "GiroCuentaCorriente.findByInsertedAt", query = "SELECT g FROM GiroCuentaCorriente g WHERE g.insertedAt = :insertedAt")})
public class GiroCuentaCorriente implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "metodo", referencedColumnName = "id")
@ManyToOne
private Metodo metodo;
@JoinColumn(name = "cuenta_corriente", referencedColumnName = "id")
@ManyToOne
private CuentaCorriente cuentaCorriente;
public GiroCuentaCorriente() {
}
public GiroCuentaCorriente(Integer id) {
this.id = id;
}
public GiroCuentaCorriente(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Metodo getMetodo() {
return metodo;
}
public void setMetodo(Metodo metodo) {
this.metodo = metodo;
}
public CuentaCorriente getCuentaCorriente() {
return cuentaCorriente;
}
public void setCuentaCorriente(CuentaCorriente cuentaCorriente) {
this.cuentaCorriente = cuentaCorriente;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof GiroCuentaCorriente)) {
return false;
}
GiroCuentaCorriente other = (GiroCuentaCorriente) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.GiroCuentaCorriente[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,147 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "giro_tarjeta_debito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "GiroTarjetaDebito.findAll", query = "SELECT g FROM GiroTarjetaDebito g")
, @NamedQuery(name = "GiroTarjetaDebito.findById", query = "SELECT g FROM GiroTarjetaDebito g WHERE g.id = :id")
, @NamedQuery(name = "GiroTarjetaDebito.findByMonto", query = "SELECT g FROM GiroTarjetaDebito g WHERE g.monto = :monto")
, @NamedQuery(name = "GiroTarjetaDebito.findByComentario", query = "SELECT g FROM GiroTarjetaDebito g WHERE g.comentario = :comentario")
, @NamedQuery(name = "GiroTarjetaDebito.findByInsertedAt", query = "SELECT g FROM GiroTarjetaDebito g WHERE g.insertedAt = :insertedAt")})
public class GiroTarjetaDebito implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "tarjeta_debito", referencedColumnName = "id")
@ManyToOne
private TarjetaDebito tarjetaDebito;
@JoinColumn(name = "metodo", referencedColumnName = "id")
@ManyToOne
private Metodo metodo;
public GiroTarjetaDebito() {
}
public GiroTarjetaDebito(Integer id) {
this.id = id;
}
public GiroTarjetaDebito(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public TarjetaDebito getTarjetaDebito() {
return tarjetaDebito;
}
public void setTarjetaDebito(TarjetaDebito tarjetaDebito) {
this.tarjetaDebito = tarjetaDebito;
}
public Metodo getMetodo() {
return metodo;
}
public void setMetodo(Metodo metodo) {
this.metodo = metodo;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof GiroTarjetaDebito)) {
return false;
}
GiroTarjetaDebito other = (GiroTarjetaDebito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.GiroTarjetaDebito[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,137 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "linea_sobregiro")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "LineaSobregiro.findAll", query = "SELECT l FROM LineaSobregiro l")
, @NamedQuery(name = "LineaSobregiro.findById", query = "SELECT l FROM LineaSobregiro l WHERE l.id = :id")
, @NamedQuery(name = "LineaSobregiro.findBySobregiro", query = "SELECT l FROM LineaSobregiro l WHERE l.sobregiro = :sobregiro")
, @NamedQuery(name = "LineaSobregiro.findByLimite", query = "SELECT l FROM LineaSobregiro l WHERE l.limite = :limite")
, @NamedQuery(name = "LineaSobregiro.findByInsertedAt", query = "SELECT l FROM LineaSobregiro l WHERE l.insertedAt = :insertedAt")})
public class LineaSobregiro implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "sobregiro")
private int sobregiro;
@Basic(optional = false)
@Column(name = "limite")
private int limite;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@OneToOne(cascade = CascadeType.ALL, mappedBy = "lineaSobregiro")
private Cliente cliente;
public LineaSobregiro() {
}
public LineaSobregiro(Integer id) {
this.id = id;
}
public LineaSobregiro(Integer id, int sobregiro, int limite, Date insertedAt) {
this.id = id;
this.sobregiro = sobregiro;
this.limite = limite;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getSobregiro() {
return sobregiro;
}
public void setSobregiro(int sobregiro) {
this.sobregiro = sobregiro;
}
public int getLimite() {
return limite;
}
public void setLimite(int limite) {
this.limite = limite;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof LineaSobregiro)) {
return false;
}
LineaSobregiro other = (LineaSobregiro) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.LineaSobregiro[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,159 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "metodo")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Metodo.findAll", query = "SELECT m FROM Metodo m")
, @NamedQuery(name = "Metodo.findById", query = "SELECT m FROM Metodo m WHERE m.id = :id")
, @NamedQuery(name = "Metodo.findByNombre", query = "SELECT m FROM Metodo m WHERE m.nombre = :nombre")
, @NamedQuery(name = "Metodo.findByInsertedAt", query = "SELECT m FROM Metodo m WHERE m.insertedAt = :insertedAt")})
public class Metodo implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "nombre")
private String nombre;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@OneToMany(mappedBy = "metodo")
private List<DepositoCuentaCorriente> depositoCuentaCorrienteList;
@OneToMany(mappedBy = "metodo")
private List<DepositoTarjetaDebito> depositoTarjetaDebitoList;
@OneToMany(mappedBy = "metodo")
private List<GiroTarjetaDebito> giroTarjetaDebitoList;
@OneToMany(mappedBy = "metodo")
private List<GiroCuentaCorriente> giroCuentaCorrienteList;
public Metodo() {
}
public Metodo(Integer id) {
this.id = id;
}
public Metodo(Integer id, String nombre, Date insertedAt) {
this.id = id;
this.nombre = nombre;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
@XmlTransient
public List<DepositoCuentaCorriente> getDepositoCuentaCorrienteList() {
return depositoCuentaCorrienteList;
}
public void setDepositoCuentaCorrienteList(List<DepositoCuentaCorriente> depositoCuentaCorrienteList) {
this.depositoCuentaCorrienteList = depositoCuentaCorrienteList;
}
@XmlTransient
public List<DepositoTarjetaDebito> getDepositoTarjetaDebitoList() {
return depositoTarjetaDebitoList;
}
public void setDepositoTarjetaDebitoList(List<DepositoTarjetaDebito> depositoTarjetaDebitoList) {
this.depositoTarjetaDebitoList = depositoTarjetaDebitoList;
}
@XmlTransient
public List<GiroTarjetaDebito> getGiroTarjetaDebitoList() {
return giroTarjetaDebitoList;
}
public void setGiroTarjetaDebitoList(List<GiroTarjetaDebito> giroTarjetaDebitoList) {
this.giroTarjetaDebitoList = giroTarjetaDebitoList;
}
@XmlTransient
public List<GiroCuentaCorriente> getGiroCuentaCorrienteList() {
return giroCuentaCorrienteList;
}
public void setGiroCuentaCorrienteList(List<GiroCuentaCorriente> giroCuentaCorrienteList) {
this.giroCuentaCorrienteList = giroCuentaCorrienteList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Metodo)) {
return false;
}
Metodo other = (Metodo) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.Metodo[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,136 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "pago_tarjeta_credito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "PagoTarjetaCredito.findAll", query = "SELECT p FROM PagoTarjetaCredito p")
, @NamedQuery(name = "PagoTarjetaCredito.findById", query = "SELECT p FROM PagoTarjetaCredito p WHERE p.id = :id")
, @NamedQuery(name = "PagoTarjetaCredito.findByMonto", query = "SELECT p FROM PagoTarjetaCredito p WHERE p.monto = :monto")
, @NamedQuery(name = "PagoTarjetaCredito.findByComentario", query = "SELECT p FROM PagoTarjetaCredito p WHERE p.comentario = :comentario")
, @NamedQuery(name = "PagoTarjetaCredito.findByInsertedAt", query = "SELECT p FROM PagoTarjetaCredito p WHERE p.insertedAt = :insertedAt")})
public class PagoTarjetaCredito implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "tarjeta_credito", referencedColumnName = "id")
@ManyToOne
private TarjetaCredito tarjetaCredito;
public PagoTarjetaCredito() {
}
public PagoTarjetaCredito(Integer id) {
this.id = id;
}
public PagoTarjetaCredito(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public TarjetaCredito getTarjetaCredito() {
return tarjetaCredito;
}
public void setTarjetaCredito(TarjetaCredito tarjetaCredito) {
this.tarjetaCredito = tarjetaCredito;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof PagoTarjetaCredito)) {
return false;
}
PagoTarjetaCredito other = (PagoTarjetaCredito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.PagoTarjetaCredito[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,186 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "tarjeta_credito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "TarjetaCredito.findAll", query = "SELECT t FROM TarjetaCredito t")
, @NamedQuery(name = "TarjetaCredito.findById", query = "SELECT t FROM TarjetaCredito t WHERE t.id = :id")
, @NamedQuery(name = "TarjetaCredito.findByLimiteNacional", query = "SELECT t FROM TarjetaCredito t WHERE t.limiteNacional = :limiteNacional")
, @NamedQuery(name = "TarjetaCredito.findByLimiteInternacional", query = "SELECT t FROM TarjetaCredito t WHERE t.limiteInternacional = :limiteInternacional")
, @NamedQuery(name = "TarjetaCredito.findByInsertedAt", query = "SELECT t FROM TarjetaCredito t WHERE t.insertedAt = :insertedAt")})
public class TarjetaCredito implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "limite_nacional")
private int limiteNacional;
@Basic(optional = false)
@Column(name = "limite_internacional")
private int limiteInternacional;
@Basic(optional = false)
@Column(name = "deuda_nacional")
private int deudaNacional;
@Basic(optional = false)
@Column(name = "deuda_internacional")
private int deudaInternacional;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "cliente", referencedColumnName = "id")
@ManyToOne(optional = false)
private Cliente cliente;
@OneToMany(mappedBy = "tarjetaCredito")
private List<PagoTarjetaCredito> pagoList;
@OneToMany(mappedBy = "tarjetaCredito")
private List<CompraTarjetaCredito> compraList;
public TarjetaCredito() {
}
public TarjetaCredito(Integer id) {
this.id = id;
}
public TarjetaCredito(Integer id, int limiteNacional, int limiteInternacional, Date insertedAt) {
this.id = id;
this.limiteNacional = limiteNacional;
this.limiteInternacional = limiteInternacional;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getLimiteNacional() {
return limiteNacional;
}
public void setLimiteNacional(int limiteNacional) {
this.limiteNacional = limiteNacional;
}
public int getLimiteInternacional() {
return limiteInternacional;
}
public void setLimiteInternacional(int limiteInternacional) {
this.limiteInternacional = limiteInternacional;
}
public int getDeudaNacional() {
return deudaNacional;
}
public int getDeudaInternacional() {
return deudaInternacional;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
@XmlTransient
public List<PagoTarjetaCredito> getPagoList() {
return pagoList;
}
public void setPagoList(List<PagoTarjetaCredito> pagoList) {
this.pagoList = pagoList;
}
@XmlTransient
public List<CompraTarjetaCredito> getCompraList() {
return compraList;
}
public void setCompraList(List<CompraTarjetaCredito> compraList) {
this.compraList = compraList;
}
public void setDeudaNacional(int deudaNacional) {
this.deudaNacional = deudaNacional;
}
public void setDeudaInternacional(int deudaInternacional) {
this.deudaInternacional = deudaInternacional;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TarjetaCredito)) {
return false;
}
TarjetaCredito other = (TarjetaCredito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.TarjetaCredito[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,185 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "tarjeta_debito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "TarjetaDebito.findAll", query = "SELECT t FROM TarjetaDebito t")
, @NamedQuery(name = "TarjetaDebito.findById", query = "SELECT t FROM TarjetaDebito t WHERE t.id = :id")
, @NamedQuery(name = "TarjetaDebito.findBySaldo", query = "SELECT t FROM TarjetaDebito t WHERE t.saldo = :saldo")
, @NamedQuery(name = "TarjetaDebito.findByInsertedAt", query = "SELECT t FROM TarjetaDebito t WHERE t.insertedAt = :insertedAt")})
public class TarjetaDebito implements Serializable {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "tarjetaDebito")
private List<CompraTarjetaDebito> compraList;
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "saldo")
private int saldo;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "cliente", referencedColumnName = "id")
@ManyToOne(optional = false)
private Cliente cliente;
@OneToMany(mappedBy = "tarjetaDebitoFrom")
private List<TransferenciaTarjetaDebito> transferenciaFromList;
@OneToMany(mappedBy = "tarjetaDebitoTo")
private List<TransferenciaTarjetaDebito> transferenciaToList;
@OneToMany(mappedBy = "tarjetaDebito")
private List<DepositoTarjetaDebito> depositoList;
@OneToMany(mappedBy = "tarjetaDebito")
private List<GiroTarjetaDebito> giroList;
public TarjetaDebito() {
}
public TarjetaDebito(Integer id) {
this.id = id;
}
public TarjetaDebito(Integer id, int saldo, Date insertedAt) {
this.id = id;
this.saldo = saldo;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getSaldo() {
return saldo;
}
public void setSaldo(int saldo) {
this.saldo = saldo;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
@XmlTransient
public List<TransferenciaTarjetaDebito> getTransferenciaFromList() {
return transferenciaFromList;
}
public void setTransferenciaFromList(List<TransferenciaTarjetaDebito> transferenciaFromList) {
this.transferenciaFromList = transferenciaFromList;
}
@XmlTransient
public List<TransferenciaTarjetaDebito> getTransferenciaToList() {
return transferenciaToList;
}
public void setTransferenciaToList(List<TransferenciaTarjetaDebito> transferenciaToList) {
this.transferenciaToList = transferenciaToList;
}
@XmlTransient
public List<DepositoTarjetaDebito> getDepositoList() {
return depositoList;
}
public void setDepositoList(List<DepositoTarjetaDebito> depositoList) {
this.depositoList = depositoList;
}
@XmlTransient
public List<GiroTarjetaDebito> getGiroList() {
return giroList;
}
public void setGiroList(List<GiroTarjetaDebito> giroList) {
this.giroList = giroList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TarjetaDebito)) {
return false;
}
TarjetaDebito other = (TarjetaDebito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.TarjetaDebito[ id=" + id + " ]";
}
@XmlTransient
public List<CompraTarjetaDebito> getCompraList() {
return compraList;
}
public void setCompraList(List<CompraTarjetaDebito> compraList) {
this.compraList = compraList;
}
}

View File

@@ -0,0 +1,147 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "transferencia_cuenta_corriente")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "TransferenciaCuentaCorriente.findAll", query = "SELECT t FROM TransferenciaCuentaCorriente t")
, @NamedQuery(name = "TransferenciaCuentaCorriente.findById", query = "SELECT t FROM TransferenciaCuentaCorriente t WHERE t.id = :id")
, @NamedQuery(name = "TransferenciaCuentaCorriente.findByMonto", query = "SELECT t FROM TransferenciaCuentaCorriente t WHERE t.monto = :monto")
, @NamedQuery(name = "TransferenciaCuentaCorriente.findByComentario", query = "SELECT t FROM TransferenciaCuentaCorriente t WHERE t.comentario = :comentario")
, @NamedQuery(name = "TransferenciaCuentaCorriente.findByInsertedAt", query = "SELECT t FROM TransferenciaCuentaCorriente t WHERE t.insertedAt = :insertedAt")})
public class TransferenciaCuentaCorriente implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "cuenta_corriente_from", referencedColumnName = "id")
@ManyToOne
private CuentaCorriente cuentaCorrienteFrom;
@JoinColumn(name = "cuenta_corriente_to", referencedColumnName = "id")
@ManyToOne
private CuentaCorriente cuentaCorrienteTo;
public TransferenciaCuentaCorriente() {
}
public TransferenciaCuentaCorriente(Integer id) {
this.id = id;
}
public TransferenciaCuentaCorriente(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public CuentaCorriente getCuentaCorrienteFrom() {
return cuentaCorrienteFrom;
}
public void setCuentaCorrienteFrom(CuentaCorriente cuentaCorrienteFrom) {
this.cuentaCorrienteFrom = cuentaCorrienteFrom;
}
public CuentaCorriente getCuentaCorrienteTo() {
return cuentaCorrienteTo;
}
public void setCuentaCorrienteTo(CuentaCorriente cuentaCorrienteTo) {
this.cuentaCorrienteTo = cuentaCorrienteTo;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TransferenciaCuentaCorriente)) {
return false;
}
TransferenciaCuentaCorriente other = (TransferenciaCuentaCorriente) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.TransferenciaCuentaCorriente[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,147 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "transferencia_tarjeta_debito")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "TransferenciaTarjetaDebito.findAll", query = "SELECT t FROM TransferenciaTarjetaDebito t")
, @NamedQuery(name = "TransferenciaTarjetaDebito.findById", query = "SELECT t FROM TransferenciaTarjetaDebito t WHERE t.id = :id")
, @NamedQuery(name = "TransferenciaTarjetaDebito.findByMonto", query = "SELECT t FROM TransferenciaTarjetaDebito t WHERE t.monto = :monto")
, @NamedQuery(name = "TransferenciaTarjetaDebito.findByComentario", query = "SELECT t FROM TransferenciaTarjetaDebito t WHERE t.comentario = :comentario")
, @NamedQuery(name = "TransferenciaTarjetaDebito.findByInsertedAt", query = "SELECT t FROM TransferenciaTarjetaDebito t WHERE t.insertedAt = :insertedAt")})
public class TransferenciaTarjetaDebito implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "monto")
private int monto;
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@JoinColumn(name = "tarjeta_debito_from", referencedColumnName = "id")
@ManyToOne
private TarjetaDebito tarjetaDebitoFrom;
@JoinColumn(name = "tarjeta_debito_to", referencedColumnName = "id")
@ManyToOne
private TarjetaDebito tarjetaDebitoTo;
public TransferenciaTarjetaDebito() {
}
public TransferenciaTarjetaDebito(Integer id) {
this.id = id;
}
public TransferenciaTarjetaDebito(Integer id, int monto, Date insertedAt) {
this.id = id;
this.monto = monto;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getMonto() {
return monto;
}
public void setMonto(int monto) {
this.monto = monto;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public TarjetaDebito getTarjetaDebitoFrom() {
return tarjetaDebitoFrom;
}
public void setTarjetaDebitoFrom(TarjetaDebito tarjetaDebitoFrom) {
this.tarjetaDebitoFrom = tarjetaDebitoFrom;
}
public TarjetaDebito getTarjetaDebitoTo() {
return tarjetaDebitoTo;
}
public void setTarjetaDebitoTo(TarjetaDebito tarjetaDebitoTo) {
this.tarjetaDebitoTo = tarjetaDebitoTo;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TransferenciaTarjetaDebito)) {
return false;
}
TransferenciaTarjetaDebito other = (TransferenciaTarjetaDebito) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.TransferenciaTarjetaDebito[ id=" + id + " ]";
}
}

View File

@@ -0,0 +1,177 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ryuuji
*/
@Entity
@Table(name = "usuario")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Usuario.findAll", query = "SELECT u FROM Usuario u")
, @NamedQuery(name = "Usuario.findById", query = "SELECT u FROM Usuario u WHERE u.id = :id")
, @NamedQuery(name = "Usuario.findByNombre", query = "SELECT u FROM Usuario u WHERE u.nombre = :nombre")
, @NamedQuery(name = "Usuario.findByRole", query = "SELECT u FROM Usuario u WHERE u.role = :role")
, @NamedQuery(name = "Usuario.findByInsertedAt", query = "SELECT u FROM Usuario u WHERE u.insertedAt = :insertedAt")})
public class Usuario implements Serializable {
@Basic(optional = false)
@Lob
@Column(name = "password")
private byte[] password;
@Basic(optional = false)
@Lob
@Column(name = "salt")
private byte[] salt;
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Basic(optional = false)
@Column(name = "nombre")
private String nombre;
@Basic(optional = false)
@Column(name = "role")
private String role;
@Basic(optional = false)
@Column(name = "inserted_at")
@Temporal(TemporalType.TIMESTAMP)
private Date insertedAt;
@OneToOne(cascade = CascadeType.ALL, mappedBy = "usuario")
private Cliente cliente;
@Transient
private String transientPassword;
public Usuario() {
}
public Usuario(Integer id) {
this.id = id;
}
public Usuario(Integer id, String nombre, byte[] password, byte[] salt, String role, Date insertedAt) {
this.id = id;
this.nombre = nombre;
this.password = password;
this.salt = salt;
this.role = role;
this.insertedAt = insertedAt;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public Date getInsertedAt() {
return insertedAt;
}
public void setInsertedAt(Date insertedAt) {
this.insertedAt = insertedAt;
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
public String getTransientPassword() {
return transientPassword;
}
public void setTransientPassword(String transientPassword) {
this.transientPassword = transientPassword;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Usuario)) {
return false;
}
Usuario other = (Usuario) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
return false;
return true;
}
@Override
public String toString() {
return "entities.Usuario[ id=" + id + " ]";
}
public byte[] getPassword() {
return password;
}
public void setPassword(byte[] password) {
this.password = password;
}
public byte[] getSalt() {
return salt;
}
public void setSalt(byte[] salt) {
this.salt = salt;
}
}