Portal en postgres
This commit is contained in:
commit
d4db89fdf7
|
|
@ -0,0 +1,71 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
ejb
|
||||||
|
dir
|
||||||
|
|
||||||
|
ear
|
||||||
|
dir
|
||||||
|
|
||||||
|
pom.xml
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:37.714079Z
|
||||||
|
3a25df4f23bb0e667a9ff2f1a740b53d
|
||||||
|
2014-08-25T13:45:42.279378Z
|
||||||
|
348
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
6781
|
||||||
|
|
||||||
|
web
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,153 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
JBoss, Home of Professional Open Source
|
||||||
|
Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
|
||||||
|
contributors by the @authors tag. See the copyright.txt in the
|
||||||
|
distribution for a full listing of individual contributors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<name>portal</name>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<artifactId>portal</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<url>http://jboss.org/jbossas</url>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<modules>
|
||||||
|
<module>ejb</module>
|
||||||
|
<module>web</module>
|
||||||
|
<module>ear</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<!-- Explicitly declaring the source encoding eliminates the following
|
||||||
|
message: -->
|
||||||
|
<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
|
||||||
|
resources, i.e. build is platform dependent! -->
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
|
<!-- JBoss dependency versions -->
|
||||||
|
|
||||||
|
<version.jboss.maven.plugin>7.4.Final</version.jboss.maven.plugin>
|
||||||
|
|
||||||
|
<!-- Define the version of the JBoss BOMs we want to import to specify tested stacks. -->
|
||||||
|
<version.jboss.bom>1.0.7.Final</version.jboss.bom>
|
||||||
|
<!-- Alternatively, comment out the above line, and un-comment the line
|
||||||
|
below to use version 1.0.4.Final-redhat-4 which is a release certified to
|
||||||
|
work with JBoss EAP 6. It requires you have access to the JBoss EAP 6
|
||||||
|
maven repository. -->
|
||||||
|
<!-- <version.jboss.bom>1.0.4.Final-redhat-4</version.jboss.bom>> -->
|
||||||
|
|
||||||
|
<version.jboss.as>7.2.0.Final</version.jboss.as>
|
||||||
|
<!-- Alternatively, comment out the above line, and un-comment the
|
||||||
|
line below to use version 7.2.0.Final-redhat-8 which is a release certified
|
||||||
|
to work with JBoss EAP 6. It requires you have access to the JBoss EAP 6
|
||||||
|
maven repository. -->
|
||||||
|
<!-- <version.jboss.as>7.2.0.Final-redhat-8</version.jboss.as> -->
|
||||||
|
|
||||||
|
<!-- other plugin versions -->
|
||||||
|
<version.ear.plugin>2.6</version.ear.plugin>
|
||||||
|
<version.ejb.plugin>2.3</version.ejb.plugin>
|
||||||
|
<version.surefire.plugin>2.10</version.surefire.plugin>
|
||||||
|
<version.war.plugin>2.1.1</version.war.plugin>
|
||||||
|
|
||||||
|
<!-- maven-compiler-plugin -->
|
||||||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- Define the version of the EJB jar so that we don't need
|
||||||
|
to repeat ourselves in every module -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<artifactId>portal-ejb</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>ejb</type>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Define the version of the WAR so that we don't need to repeat
|
||||||
|
ourselves in every module -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<artifactId>portal-web</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>war</type>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JBoss distributes a complete set of Java EE 6 APIs including
|
||||||
|
a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
|
||||||
|
a collection) of artifacts. We use this here so that we always get the correct
|
||||||
|
versions of artifacts. Here we use the jboss-javaee-6.0-with-tools stack
|
||||||
|
(you can read this as the JBoss stack of the Java EE 6 APIs, with some extras
|
||||||
|
tools for your project, such as Arquillian for testing) and the jboss-javaee-6.0-with-hibernate
|
||||||
|
stack you can read this as the JBoss stack of the Java EE 6 APIs, with extras
|
||||||
|
from the Hibernate family of projects) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.bom</groupId>
|
||||||
|
<artifactId>jboss-javaee-6.0-with-tools</artifactId>
|
||||||
|
<version>${version.jboss.bom}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.bom</groupId>
|
||||||
|
<artifactId>jboss-javaee-6.0-with-hibernate</artifactId>
|
||||||
|
<version>${version.jboss.bom}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.mail</groupId>
|
||||||
|
<artifactId>mail</artifactId>
|
||||||
|
<version>1.4.7</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<!-- The JBoss AS plugin deploys your ear to a local JBoss
|
||||||
|
AS container -->
|
||||||
|
<!-- Due to Maven's lack of intelligence with EARs we need
|
||||||
|
to configure the jboss-as maven plugin to skip deployment for all modules.
|
||||||
|
We then enable it specifically in the ear module. -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.as.plugins</groupId>
|
||||||
|
<artifactId>jboss-as-maven-plugin</artifactId>
|
||||||
|
<version>${version.jboss.maven.plugin}</version>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ear
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2014-08-15T13:56:33.844127Z
|
||||||
|
203
|
||||||
|
dcruz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
src
|
||||||
|
dir
|
||||||
|
|
||||||
|
pom.xml
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:36.082072Z
|
||||||
|
392bcf8ba500ae1cbe5e05c6f97a56f5
|
||||||
|
2014-08-15T13:56:33.844127Z
|
||||||
|
203
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4700
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
JBoss, Home of Professional Open Source
|
||||||
|
Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
|
||||||
|
contributors by the @authors tag. See the copyright.txt in the
|
||||||
|
distribution for a full listing of individual contributors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>portal</artifactId>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>portal-ear</artifactId>
|
||||||
|
<packaging>ear</packaging>
|
||||||
|
|
||||||
|
<name>portal - ear</name>
|
||||||
|
|
||||||
|
<url>http://jboss.org/jbossas</url>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- Depend on the ejb module and war so that we can package them -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<artifactId>portal-web</artifactId>
|
||||||
|
<type>war</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<artifactId>portal-ejb</artifactId>
|
||||||
|
<type>ejb</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-ear-plugin</artifactId>
|
||||||
|
<version>${version.ear.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- Tell Maven we are using Java EE 6 -->
|
||||||
|
<version>6</version>
|
||||||
|
<!-- Use Java EE ear libraries as needed. Java EE ear libraries
|
||||||
|
are in easy way to package any libraries needed in the ear, and automatically
|
||||||
|
have any modules (EJB-JARs and WARs) use them -->
|
||||||
|
<defaultLibBundleDir>lib</defaultLibBundleDir>
|
||||||
|
<modules></modules>
|
||||||
|
<fileNameMapping>no-version</fileNameMapping>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!-- The JBoss AS plugin deploys your ear to a local JBoss AS container -->
|
||||||
|
<!-- Due to Maven's lack of intelligence with EARs we need to configure
|
||||||
|
the jboss-as maven plugin to skip deployment for all modules. We then enable
|
||||||
|
it specifically in the ear module. -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.as.plugins</groupId>
|
||||||
|
<artifactId>jboss-as-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<filename>${project.artifactId}.ear</filename>
|
||||||
|
<skip>false</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. -->
|
||||||
|
<!-- Use this profile for any OpenShift specific customization your app will need. -->
|
||||||
|
<!-- By default that is to put the resulting archive into the 'deployments' folder. -->
|
||||||
|
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
|
||||||
|
<id>openshift</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-ear-plugin</artifactId>
|
||||||
|
<version>${version.ear.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>deployments</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
JBoss, Home of Professional Open Source
|
||||||
|
Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
|
||||||
|
contributors by the @authors tag. See the copyright.txt in the
|
||||||
|
distribution for a full listing of individual contributors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>portal</artifactId>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>portal-ear</artifactId>
|
||||||
|
<packaging>ear</packaging>
|
||||||
|
|
||||||
|
<name>portal - ear</name>
|
||||||
|
|
||||||
|
<url>http://jboss.org/jbossas</url>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- Depend on the ejb module and war so that we can package them -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<artifactId>portal-web</artifactId>
|
||||||
|
<type>war</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<artifactId>portal-ejb</artifactId>
|
||||||
|
<type>ejb</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-ear-plugin</artifactId>
|
||||||
|
<version>${version.ear.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- Tell Maven we are using Java EE 6 -->
|
||||||
|
<version>6</version>
|
||||||
|
<!-- Use Java EE ear libraries as needed. Java EE ear libraries
|
||||||
|
are in easy way to package any libraries needed in the ear, and automatically
|
||||||
|
have any modules (EJB-JARs and WARs) use them -->
|
||||||
|
<defaultLibBundleDir>lib</defaultLibBundleDir>
|
||||||
|
<modules></modules>
|
||||||
|
<fileNameMapping>no-version</fileNameMapping>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!-- The JBoss AS plugin deploys your ear to a local JBoss AS container -->
|
||||||
|
<!-- Due to Maven's lack of intelligence with EARs we need to configure
|
||||||
|
the jboss-as maven plugin to skip deployment for all modules. We then enable
|
||||||
|
it specifically in the ear module. -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.as.plugins</groupId>
|
||||||
|
<artifactId>jboss-as-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<filename>${project.artifactId}.ear</filename>
|
||||||
|
<skip>false</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. -->
|
||||||
|
<!-- Use this profile for any OpenShift specific customization your app will need. -->
|
||||||
|
<!-- By default that is to put the resulting archive into the 'deployments' folder. -->
|
||||||
|
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
|
||||||
|
<id>openshift</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-ear-plugin</artifactId>
|
||||||
|
<version>${version.ear.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>deployments</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ear/src
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2014-08-15T13:56:33.844127Z
|
||||||
|
203
|
||||||
|
dcruz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
main
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ear/src/main
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2014-08-15T13:56:33.844127Z
|
||||||
|
203
|
||||||
|
dcruz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
application
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ear/src/main/application
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2014-08-15T13:56:33.844127Z
|
||||||
|
203
|
||||||
|
dcruz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
META-INF
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ear/src/main/application/META-INF
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2014-08-15T13:56:33.844127Z
|
||||||
|
203
|
||||||
|
dcruz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
|
||||||
|
<display-name>portal-ear</display-name>
|
||||||
|
<module>
|
||||||
|
<web>
|
||||||
|
<web-uri>portal-web.war</web-uri>
|
||||||
|
<context-root>/portal-web</context-root>
|
||||||
|
</web>
|
||||||
|
</module>
|
||||||
|
<module>
|
||||||
|
<ejb>portal-ejb.jar</ejb>
|
||||||
|
</module>
|
||||||
|
<library-directory>lib</library-directory>
|
||||||
|
</application>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#Generated by Maven
|
||||||
|
#Fri Nov 11 13:12:55 ECT 2022
|
||||||
|
version=2.1
|
||||||
|
groupId=com.fp.armas
|
||||||
|
artifactId=portal-ear
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
|
||||||
|
<display-name>portal-ear</display-name>
|
||||||
|
<module>
|
||||||
|
<web>
|
||||||
|
<web-uri>portal-web.war</web-uri>
|
||||||
|
<context-root>/portal-web</context-root>
|
||||||
|
</web>
|
||||||
|
</module>
|
||||||
|
<module>
|
||||||
|
<ejb>portal-ejb.jar</ejb>
|
||||||
|
</module>
|
||||||
|
<library-directory>lib</library-directory>
|
||||||
|
</application>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,65 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
src
|
||||||
|
dir
|
||||||
|
|
||||||
|
pom.xml
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.912071Z
|
||||||
|
4d7f42408b4a105801ff38e267ff25c7
|
||||||
|
2014-08-25T13:45:42.279378Z
|
||||||
|
348
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
7458
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,195 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
JBoss, Home of Professional Open Source
|
||||||
|
Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
|
||||||
|
contributors by the @authors tag. See the copyright.txt in the
|
||||||
|
distribution for a full listing of individual contributors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>portal</artifactId>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>portal-ejb</artifactId>
|
||||||
|
<packaging>ejb</packaging>
|
||||||
|
|
||||||
|
<name>portal - ejb</name>
|
||||||
|
|
||||||
|
<url>http://jboss.org/jbossas</url>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- Declare the APIs we depend on and need for compilation. All of
|
||||||
|
them are provided by JBoss AS 7 -->
|
||||||
|
|
||||||
|
<!-- Import the EJB API, we use provided scope as the API is included in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.spec.javax.ejb</groupId>
|
||||||
|
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Import the CDI API, we use provided scope as the API is included in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.enterprise</groupId>
|
||||||
|
<artifactId>cdi-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Import the JPA API, we use provided scope as the API is included in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.javax.persistence</groupId>
|
||||||
|
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JSR-303 (Bean Validation) Implementation -->
|
||||||
|
<!-- Provides portable constraints such as @Email -->
|
||||||
|
<!-- Hibernate Validator is shipped in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Test scope dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Optional, but highly recommended -->
|
||||||
|
<!-- Arquillian allows you to test enterprise code such as EJBs and
|
||||||
|
Transactional(JTA) JPA from JUnit/TestNG -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.protocol</groupId>
|
||||||
|
<artifactId>arquillian-protocol-servlet</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.general</groupId>
|
||||||
|
<artifactId>general-mail</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-codec</groupId>
|
||||||
|
<artifactId>commons-codec</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-lang</groupId>
|
||||||
|
<artifactId>commons-lang</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-ejb-plugin</artifactId>
|
||||||
|
<version>${version.ejb.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- Tell Maven we are using EJB 3.1 -->
|
||||||
|
<ejbVersion>3.1</ejbVersion>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<!-- The default profile skips all tests, though you can tune it
|
||||||
|
to run just unit tests based on a custom pattern -->
|
||||||
|
<!-- Seperate profiles are provided for running all tests, including
|
||||||
|
Arquillian tests that execute in the specified container -->
|
||||||
|
<id>default</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${version.surefire.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<!-- An optional Arquillian testing profile that executes tests
|
||||||
|
in your JBoss AS instance -->
|
||||||
|
<!-- This profile will start a new JBoss AS instance, and execute
|
||||||
|
the test, shutting it down when done -->
|
||||||
|
<!-- Run with: mvn clean test -Parq-jbossas-managed -->
|
||||||
|
<id>arq-jbossas-managed</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.as</groupId>
|
||||||
|
<artifactId>jboss-as-arquillian-container-managed</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<!-- An optional Arquillian testing profile that executes tests
|
||||||
|
in a remote JBoss AS instance -->
|
||||||
|
<!-- Run with: mvn clean test -Parq-jbossas-remote -->
|
||||||
|
<id>arq-jbossas-remote</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.as</groupId>
|
||||||
|
<artifactId>jboss-as-arquillian-container-remote</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,180 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>portal</artifactId>
|
||||||
|
<groupId>com.fp.armas</groupId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>portal-ejb</artifactId>
|
||||||
|
<packaging>ejb</packaging>
|
||||||
|
|
||||||
|
<name>portal - ejb</name>
|
||||||
|
|
||||||
|
<url>http://jboss.org/jbossas</url>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- Declare the APIs we depend on and need for compilation. All of
|
||||||
|
them are provided by JBoss AS 7 -->
|
||||||
|
|
||||||
|
<!-- Import the EJB API, we use provided scope as the API is included in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.spec.javax.ejb</groupId>
|
||||||
|
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Import the CDI API, we use provided scope as the API is included in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.enterprise</groupId>
|
||||||
|
<artifactId>cdi-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Import the JPA API, we use provided scope as the API is included in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.javax.persistence</groupId>
|
||||||
|
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JSR-303 (Bean Validation) Implementation -->
|
||||||
|
<!-- Provides portable constraints such as @Email -->
|
||||||
|
<!-- Hibernate Validator is shipped in JBoss AS 7 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Test scope dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Optional, but highly recommended -->
|
||||||
|
<!-- Arquillian allows you to test enterprise code such as EJBs and
|
||||||
|
Transactional(JTA) JPA from JUnit/TestNG -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.protocol</groupId>
|
||||||
|
<artifactId>arquillian-protocol-servlet</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fp.general</groupId>
|
||||||
|
<artifactId>general-mail</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-codec</groupId>
|
||||||
|
<artifactId>commons-codec</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-lang</groupId>
|
||||||
|
<artifactId>commons-lang</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-ejb-plugin</artifactId>
|
||||||
|
<version>${version.ejb.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- Tell Maven we are using EJB 3.1 -->
|
||||||
|
<ejbVersion>3.1</ejbVersion>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<!-- The default profile skips all tests, though you can tune it
|
||||||
|
to run just unit tests based on a custom pattern -->
|
||||||
|
<!-- Seperate profiles are provided for running all tests, including
|
||||||
|
Arquillian tests that execute in the specified container -->
|
||||||
|
<id>default</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${version.surefire.plugin}</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<!-- An optional Arquillian testing profile that executes tests
|
||||||
|
in your JBoss AS instance -->
|
||||||
|
<!-- This profile will start a new JBoss AS instance, and execute
|
||||||
|
the test, shutting it down when done -->
|
||||||
|
<!-- Run with: mvn clean test -Parq-jbossas-managed -->
|
||||||
|
<id>arq-jbossas-managed</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.as</groupId>
|
||||||
|
<artifactId>jboss-as-arquillian-container-managed</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<!-- An optional Arquillian testing profile that executes tests
|
||||||
|
in a remote JBoss AS instance -->
|
||||||
|
<!-- Run with: mvn clean test -Parq-jbossas-remote -->
|
||||||
|
<id>arq-jbossas-remote</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.as</groupId>
|
||||||
|
<artifactId>jboss-as-arquillian-container-remote</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
test
|
||||||
|
dir
|
||||||
|
|
||||||
|
main
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
java
|
||||||
|
dir
|
||||||
|
|
||||||
|
resources
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
ec
|
||||||
|
dir
|
||||||
|
|
||||||
|
com
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
fp
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com/fp
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
armas
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com/fp/armas
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
portal
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com/fp/armas/portal
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2016-03-18T19:28:02.833033Z
|
||||||
|
4511
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
model
|
||||||
|
dir
|
||||||
|
|
||||||
|
service
|
||||||
|
dir
|
||||||
|
|
||||||
|
dao
|
||||||
|
dir
|
||||||
|
|
||||||
|
facade
|
||||||
|
dir
|
||||||
|
|
||||||
|
util
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com/fp/armas/portal/dao
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2015-08-18T09:55:02.931391Z
|
||||||
|
4270
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
exceptions
|
||||||
|
dir
|
||||||
|
|
||||||
|
general
|
||||||
|
dir
|
||||||
|
|
||||||
|
registro
|
||||||
|
dir
|
||||||
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com/fp/armas/portal/dao/exceptions
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2014-11-13T10:15:26.527370Z
|
||||||
|
2726
|
||||||
|
dcruz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
DaoException.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.084067Z
|
||||||
|
8a92a0037dc88eaf56c16b58a1f21cd4
|
||||||
|
2014-11-13T10:15:26.527370Z
|
||||||
|
2726
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
866
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.fp.armas.portal.dao.exceptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Excepción que maneja los errores a nivel del DAO
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DaoException extends RuntimeException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public DaoException() {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(String message) {
|
||||||
|
super(message);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(String message, Throwable cause,
|
||||||
|
boolean enableSuppression, boolean writableStackTrace) {
|
||||||
|
super(message, cause, enableSuppression, writableStackTrace);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.fp.armas.portal.dao.exceptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Excepción que maneja los errores a nivel del DAO
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DaoException extends RuntimeException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public DaoException() {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(String message) {
|
||||||
|
super(message);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public DaoException(String message, Throwable cause,
|
||||||
|
boolean enableSuppression, boolean writableStackTrace) {
|
||||||
|
super(message, cause, enableSuppression, writableStackTrace);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com/fp/armas/portal/dao/general
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2015-01-23T09:49:13.248110Z
|
||||||
|
3796
|
||||||
|
dcruz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
GenericDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.117068Z
|
||||||
|
5e895dc58b9f36a1ec5027a7e29fa0ce
|
||||||
|
2015-01-23T09:49:13.248110Z
|
||||||
|
3796
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1186
|
||||||
|
|
||||||
|
GenericDaoImpl.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.118068Z
|
||||||
|
42bd3d5bc84f75fd99ece740ea05f585
|
||||||
|
2015-01-23T09:49:13.248110Z
|
||||||
|
3796
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
5049
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.fp.armas.portal.dao.general;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dao general que contienen metodos generales de acceso a datos
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
* @param <T> entidad de la cual se generará el DAO
|
||||||
|
*/
|
||||||
|
public interface GenericDao<T extends Serializable> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Persiste una entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void create(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actualiza una entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void update(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Elimina una entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void delete(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pasa a estado detached la entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void detach(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtiene la entidad actual de la base
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void refresh(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca una entidad por id
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
T buscarPorId(Serializable id) throws RegistroException;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,151 @@
|
||||||
|
package com.fp.armas.portal.dao.general;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
|
||||||
|
import javax.persistence.EntityExistsException;
|
||||||
|
import javax.persistence.EntityManager;
|
||||||
|
import javax.persistence.EntityNotFoundException;
|
||||||
|
import javax.persistence.LockTimeoutException;
|
||||||
|
import javax.persistence.NoResultException;
|
||||||
|
import javax.persistence.NonUniqueResultException;
|
||||||
|
import javax.persistence.OptimisticLockException;
|
||||||
|
import javax.persistence.PersistenceContext;
|
||||||
|
import javax.persistence.PersistenceException;
|
||||||
|
import javax.persistence.PessimisticLockException;
|
||||||
|
import javax.persistence.QueryTimeoutException;
|
||||||
|
import javax.persistence.RollbackException;
|
||||||
|
import javax.persistence.TransactionRequiredException;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.exceptions.DaoException;
|
||||||
|
import com.fp.armas.portal.util.PortalMessages;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
import com.fp.armas.portal.util.qualifier.DefaultDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementación del DAO genérico
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
*/
|
||||||
|
@DefaultDao
|
||||||
|
public class GenericDaoImpl<T extends Serializable> implements GenericDao<T>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contexto de persistencia asociado a la base
|
||||||
|
*/
|
||||||
|
@PersistenceContext(unitName="portalPU")
|
||||||
|
private EntityManager entityManager;
|
||||||
|
|
||||||
|
private Class<T> idClass;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public GenericDaoImpl(Class idClass) {
|
||||||
|
this.idClass = idClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(T entity) throws DaoException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
try{
|
||||||
|
this.getEntityManager().clear();
|
||||||
|
this.getEntityManager().persist(entity);
|
||||||
|
this.getEntityManager().flush();
|
||||||
|
} catch(PersistenceException e){
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(T entity) throws DaoException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
try {
|
||||||
|
this.getEntityManager().clear();
|
||||||
|
this.getEntityManager().merge(entity);
|
||||||
|
this.getEntityManager().flush();
|
||||||
|
} catch(PersistenceException e){
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(T entity) throws DaoException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
try{
|
||||||
|
this.getEntityManager().clear();
|
||||||
|
this.getEntityManager().remove(this.getEntityManager().contains(entity) ? entity : this.getEntityManager().merge(entity));
|
||||||
|
this.getEntityManager().flush();
|
||||||
|
} catch(PersistenceException e){
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T buscarPorId(Serializable id) throws RegistroException {
|
||||||
|
try {
|
||||||
|
return this.getEntityManager().find(idClass, id);
|
||||||
|
} catch (PersistenceException e) {
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void detach(T entity) throws RegistroException {
|
||||||
|
try {
|
||||||
|
this.getEntityManager().detach(entity);
|
||||||
|
} catch (PersistenceException e) {
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void refresh(T entity) throws RegistroException {
|
||||||
|
try {
|
||||||
|
this.getEntityManager().refresh(entity);
|
||||||
|
} catch (PersistenceException e) {
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityManager getEntityManager() {
|
||||||
|
return entityManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DaoException transformDaoException(PersistenceException e){
|
||||||
|
if(e instanceof EntityExistsException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.exists"), e);
|
||||||
|
}else if(e instanceof EntityNotFoundException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.notfound"), e);
|
||||||
|
}else if(e instanceof LockTimeoutException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.lock.timeout"), e);
|
||||||
|
}else if(e instanceof NonUniqueResultException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.nonuniqueresult"), e);
|
||||||
|
}else if(e instanceof NoResultException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.noresult"), e);
|
||||||
|
}else if(e instanceof OptimisticLockException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.lock.optimisticlock"), e);
|
||||||
|
}else if(e instanceof PessimisticLockException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.lock.optimisticlock"), e);
|
||||||
|
}else if(e instanceof QueryTimeoutException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.querytimeout"), e);
|
||||||
|
}else if(e instanceof RollbackException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.transaction.rollback"), e);
|
||||||
|
}else if(e instanceof TransactionRequiredException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.transaction.requiredtransaction"), e);
|
||||||
|
}
|
||||||
|
return new DaoException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.fp.armas.portal.dao.general;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dao general que contienen metodos generales de acceso a datos
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
* @param <T> entidad de la cual se generará el DAO
|
||||||
|
*/
|
||||||
|
public interface GenericDao<T extends Serializable> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Persiste una entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void create(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actualiza una entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void update(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Elimina una entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void delete(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pasa a estado detached la entidad
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void detach(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtiene la entidad actual de la base
|
||||||
|
* @param entity
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
void refresh(T entity) throws RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca una entidad por id
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
T buscarPorId(Serializable id) throws RegistroException;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,151 @@
|
||||||
|
package com.fp.armas.portal.dao.general;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
|
||||||
|
import javax.persistence.EntityExistsException;
|
||||||
|
import javax.persistence.EntityManager;
|
||||||
|
import javax.persistence.EntityNotFoundException;
|
||||||
|
import javax.persistence.LockTimeoutException;
|
||||||
|
import javax.persistence.NoResultException;
|
||||||
|
import javax.persistence.NonUniqueResultException;
|
||||||
|
import javax.persistence.OptimisticLockException;
|
||||||
|
import javax.persistence.PersistenceContext;
|
||||||
|
import javax.persistence.PersistenceException;
|
||||||
|
import javax.persistence.PessimisticLockException;
|
||||||
|
import javax.persistence.QueryTimeoutException;
|
||||||
|
import javax.persistence.RollbackException;
|
||||||
|
import javax.persistence.TransactionRequiredException;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.exceptions.DaoException;
|
||||||
|
import com.fp.armas.portal.util.PortalMessages;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
import com.fp.armas.portal.util.qualifier.DefaultDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementación del DAO genérico
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
*/
|
||||||
|
@DefaultDao
|
||||||
|
public class GenericDaoImpl<T extends Serializable> implements GenericDao<T>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contexto de persistencia asociado a la base
|
||||||
|
*/
|
||||||
|
@PersistenceContext(unitName="portalPU")
|
||||||
|
private EntityManager entityManager;
|
||||||
|
|
||||||
|
private Class<T> idClass;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public GenericDaoImpl(Class idClass) {
|
||||||
|
this.idClass = idClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(T entity) throws DaoException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
try{
|
||||||
|
this.getEntityManager().clear();
|
||||||
|
this.getEntityManager().persist(entity);
|
||||||
|
this.getEntityManager().flush();
|
||||||
|
} catch(PersistenceException e){
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(T entity) throws DaoException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
try {
|
||||||
|
this.getEntityManager().clear();
|
||||||
|
this.getEntityManager().merge(entity);
|
||||||
|
this.getEntityManager().flush();
|
||||||
|
} catch(PersistenceException e){
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(T entity) throws DaoException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
try{
|
||||||
|
this.getEntityManager().clear();
|
||||||
|
this.getEntityManager().remove(this.getEntityManager().contains(entity) ? entity : this.getEntityManager().merge(entity));
|
||||||
|
this.getEntityManager().flush();
|
||||||
|
} catch(PersistenceException e){
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T buscarPorId(Serializable id) throws RegistroException {
|
||||||
|
try {
|
||||||
|
return this.getEntityManager().find(idClass, id);
|
||||||
|
} catch (PersistenceException e) {
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void detach(T entity) throws RegistroException {
|
||||||
|
try {
|
||||||
|
this.getEntityManager().detach(entity);
|
||||||
|
} catch (PersistenceException e) {
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void refresh(T entity) throws RegistroException {
|
||||||
|
try {
|
||||||
|
this.getEntityManager().refresh(entity);
|
||||||
|
} catch (PersistenceException e) {
|
||||||
|
throw transformDaoException(e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new DaoException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityManager getEntityManager() {
|
||||||
|
return entityManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DaoException transformDaoException(PersistenceException e){
|
||||||
|
if(e instanceof EntityExistsException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.exists"), e);
|
||||||
|
}else if(e instanceof EntityNotFoundException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.notfound"), e);
|
||||||
|
}else if(e instanceof LockTimeoutException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.lock.timeout"), e);
|
||||||
|
}else if(e instanceof NonUniqueResultException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.nonuniqueresult"), e);
|
||||||
|
}else if(e instanceof NoResultException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.noresult"), e);
|
||||||
|
}else if(e instanceof OptimisticLockException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.lock.optimisticlock"), e);
|
||||||
|
}else if(e instanceof PessimisticLockException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.lock.optimisticlock"), e);
|
||||||
|
}else if(e instanceof QueryTimeoutException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.entity.querytimeout"), e);
|
||||||
|
}else if(e instanceof RollbackException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.transaction.rollback"), e);
|
||||||
|
}else if(e instanceof TransactionRequiredException){
|
||||||
|
return new DaoException(PortalMessages.getInstancia().getString("error.jpa.transaction.requiredtransaction"), e);
|
||||||
|
}
|
||||||
|
return new DaoException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,708 @@
|
||||||
|
10
|
||||||
|
|
||||||
|
dir
|
||||||
|
4669
|
||||||
|
svn://172.17.26.185/COMACO/registro/portal/ejb/src/main/java/com/fp/armas/portal/dao/registro
|
||||||
|
svn://172.17.26.185/COMACO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2015-08-18T09:55:02.931391Z
|
||||||
|
4270
|
||||||
|
fpazmino
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a11ad980-3ca8-45f0-88f7-f0e618c262b7
|
||||||
|
|
||||||
|
CantonDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.214068Z
|
||||||
|
ece9f34a155cacb8208d5049523db427
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1366
|
||||||
|
|
||||||
|
UsuarioDetalleDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.214068Z
|
||||||
|
45287cf73169747b9a4b2de6ba41df4a
|
||||||
|
2015-08-18T09:55:02.931391Z
|
||||||
|
4270
|
||||||
|
fpazmino
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1311
|
||||||
|
|
||||||
|
ArchivoDetalleDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.215068Z
|
||||||
|
0896a2d50d007001d3ff0b81191a35c9
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
387
|
||||||
|
|
||||||
|
DireccionPersonaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.216068Z
|
||||||
|
75fffe7a96139248671b3ad4e7b827d9
|
||||||
|
2015-08-18T09:55:02.931391Z
|
||||||
|
4270
|
||||||
|
fpazmino
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3490
|
||||||
|
|
||||||
|
CompaniaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.216068Z
|
||||||
|
5d19eeeffb5c13f21b3b153deec30368
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
401
|
||||||
|
|
||||||
|
UsuarioDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.215068Z
|
||||||
|
718a4d445a7976fd7f4d9bc43d90b187
|
||||||
|
2015-08-18T09:55:02.931391Z
|
||||||
|
4270
|
||||||
|
fpazmino
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1081
|
||||||
|
|
||||||
|
CiudadDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.217068Z
|
||||||
|
8589dcfa20e2ece22012750d2ab97a76
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1443
|
||||||
|
|
||||||
|
CatalogoDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.217068Z
|
||||||
|
b434b4868ea901e2a978f446fcbc7c6a
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1973
|
||||||
|
|
||||||
|
UsuarioPerfilDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.216068Z
|
||||||
|
97068c545268b1532df26531930d75da
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
385
|
||||||
|
|
||||||
|
ProvinciaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.217068Z
|
||||||
|
81fbe1c56502c7ba2affdf0292473f21
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1273
|
||||||
|
|
||||||
|
ArchivoDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.218068Z
|
||||||
|
4f2d33d90395c5a53ada0ff796cf0ca3
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
345
|
||||||
|
|
||||||
|
PaisDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.218068Z
|
||||||
|
ea61c733b0f8196ea479dfa8992063b2
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1075
|
||||||
|
|
||||||
|
PersonaNaturalDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.219068Z
|
||||||
|
94b43d08d4a2f548cdd53a0b010aacae
|
||||||
|
2015-08-18T09:55:02.931391Z
|
||||||
|
4270
|
||||||
|
fpazmino
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1354
|
||||||
|
|
||||||
|
UsuarioDetalle.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.218068Z
|
||||||
|
eb100fef2219a0a03842093d8740b7c6
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
377
|
||||||
|
|
||||||
|
SecuenciaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.219068Z
|
||||||
|
2513a3fc877ebcf382193d9b7bc3a76e
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
755
|
||||||
|
|
||||||
|
PersonaDetalleDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.220068Z
|
||||||
|
1419e9b713da3ef2ee1eb9982655e36c
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1489
|
||||||
|
|
||||||
|
TelefonoPersonaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.220068Z
|
||||||
|
36171823bf16f0a8645c2177ad45eba3
|
||||||
|
2015-08-18T09:55:02.931391Z
|
||||||
|
4270
|
||||||
|
fpazmino
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3078
|
||||||
|
|
||||||
|
ParroquiaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.220068Z
|
||||||
|
08ebd816052a5bcea176e735bc2f73dd
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1376
|
||||||
|
|
||||||
|
ActividadEconomicaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.221068Z
|
||||||
|
429f499febe103d26b4450b35d9ca153
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1180
|
||||||
|
|
||||||
|
PersonaDao.java
|
||||||
|
file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2022-07-28T03:45:35.221068Z
|
||||||
|
5ebb2caab621af87c9c6ea1a23368fad
|
||||||
|
2015-01-23T09:48:58.662084Z
|
||||||
|
3795
|
||||||
|
dcruz
|
||||||
|
has-props
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
353
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
K 13
|
||||||
|
svn:mime-type
|
||||||
|
V 10
|
||||||
|
text/plain
|
||||||
|
END
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgeneactivity;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgeneactivity}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ActividadEconomicaDao extends GenericDaoImpl<Tgeneactivity> {
|
||||||
|
|
||||||
|
public ActividadEconomicaDao() {
|
||||||
|
super(Tgeneactivity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna todas las actividades economicas existentes
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
public Collection<Tgeneactivity> buscarActividadEconomicas() throws RegistroException{
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgeneactivity> query = cb.createQuery(Tgeneactivity.class);
|
||||||
|
Root<Tgeneactivity> tactivityRoot = query.from(Tgeneactivity.class);
|
||||||
|
query.orderBy(cb.asc(tactivityRoot.get("activitycode")));
|
||||||
|
query.select(tactivityRoot);
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenefile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenefile}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ArchivoDao extends GenericDaoImpl<Tgenefile> {
|
||||||
|
|
||||||
|
public ArchivoDao() {
|
||||||
|
super(Tgenefile.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenefilesdetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenefilesdetail}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ArchivoDetalleDao extends GenericDaoImpl<Tgenefilesdetail> {
|
||||||
|
|
||||||
|
public ArchivoDetalleDao() {
|
||||||
|
super(Tgenefilesdetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecanton;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecanton}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CantonDao extends GenericDaoImpl<Tgenecanton> {
|
||||||
|
|
||||||
|
public CantonDao() {
|
||||||
|
super(Tgenecanton.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca los cantones en base a los criterios ingresados
|
||||||
|
* @param countryCode
|
||||||
|
* @param provinceCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgenecanton> buscarCantonesxPaisyProvincia(String countryCode, String provinceCode) {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecanton> query = cb.createQuery(Tgenecanton.class);
|
||||||
|
Root<Tgenecanton> tcantonRoot = query.from(Tgenecanton.class);
|
||||||
|
query.where(cb.equal(tcantonRoot.get("id").get("countrycode"), countryCode), cb.equal(tcantonRoot.get("id").get("provincecode"), provinceCode));
|
||||||
|
query.orderBy(cb.asc(tcantonRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecatalogdetail;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecatalogdetail}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CatalogoDao extends GenericDaoImpl<Tgenecatalogdetail> {
|
||||||
|
|
||||||
|
public CatalogoDao(){
|
||||||
|
super(Tgenecatalogdetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca los detalles del catálogo en base el catalogcode
|
||||||
|
* @param codigoTipo
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
public Collection<Tgenecatalogdetail> buscarCatalogo(String codigoTipo) throws RegistroException{
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecatalogdetail> query = cb.createQuery(Tgenecatalogdetail.class);
|
||||||
|
Root<Tgenecatalogdetail> rootTgenecatalog = query.from(Tgenecatalogdetail.class);
|
||||||
|
query.select(rootTgenecatalog).where(cb.equal(rootTgenecatalog.get("id").get("catalogcode"), codigoTipo)).orderBy(cb.asc(rootTgenecatalog.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<Tgenecatalogdetail> buscarCatalogo(String codigoTipo, String legalCode) throws RegistroException{
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecatalogdetail> query = cb.createQuery(Tgenecatalogdetail.class);
|
||||||
|
Root<Tgenecatalogdetail> rootTgenecatalog = query.from(Tgenecatalogdetail.class);
|
||||||
|
query.select(rootTgenecatalog).where(cb.and(cb.equal(rootTgenecatalog.get("id").get("catalogcode"), codigoTipo), cb.equal(rootTgenecatalog.get("legalcode"), legalCode))).orderBy(cb.asc(rootTgenecatalog.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecity;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecity}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CiudadDao extends GenericDaoImpl<Tgenecity> {
|
||||||
|
|
||||||
|
public CiudadDao() {
|
||||||
|
super(Tgenecity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca la ciudad en base a los criterios de busqueda ingresado
|
||||||
|
* @param countryCode
|
||||||
|
* @param provinceCode
|
||||||
|
* @param cantonCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgenecity> buscarCiudad(String countryCode, String provinceCode, String cantonCode) {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecity> query = cb.createQuery(Tgenecity.class);
|
||||||
|
Root<Tgenecity> tciudadRoot = query.from(Tgenecity.class);
|
||||||
|
query.where(cb.equal(tciudadRoot.get("id").get("countrycode"), countryCode), cb.equal(tciudadRoot.get("id").get("provincecode"), provinceCode), cb.equal(tciudadRoot.get("id").get("cantoncode"), cantonCode));
|
||||||
|
query.orderBy(cb.asc(tciudadRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustcompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustcompany}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CompaniaDao extends GenericDaoImpl<Tcustcompany> {
|
||||||
|
|
||||||
|
public CompaniaDao() {
|
||||||
|
super(Tcustcompany.class);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Query;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersonaddress;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.PortalMessages;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustpersonaddress}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DireccionPersonaDao extends GenericDaoImpl<Tcustpersonaddress> {
|
||||||
|
|
||||||
|
public DireccionPersonaDao() {
|
||||||
|
super(Tcustpersonaddress.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public Tcustpersonaddress buscaDireccionPrincipal(Integer personcode) throws RegistroException{
|
||||||
|
Tcustpersonaddress direccioPrincipal = null;
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonaddress o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.principal=:principal");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("principal", PortalMessages.getInstancia().getString("valor.general.si"));
|
||||||
|
List<Tcustpersonaddress> listaddress = query.getResultList();
|
||||||
|
if(listaddress != null && !listaddress.isEmpty()){
|
||||||
|
direccioPrincipal = listaddress.iterator().next();
|
||||||
|
}
|
||||||
|
return direccioPrincipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna la primera dirección encontrada
|
||||||
|
* @param personcode
|
||||||
|
* @param tipodireccion
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public Tcustpersonaddress buscaDireccionPorTipo(Integer personcode, String tipodireccion) throws RegistroException{
|
||||||
|
Tcustpersonaddress direccioPrincipal = null;
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonaddress o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.addresstypecatalog=:tipodireccion AND o.addresstypecatalogcode=:tipodireccioncodigo");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("tipodireccion", tipodireccion);
|
||||||
|
query.setParameter("tipodireccioncodigo", PortalMessages.getInstancia().getString("catalogo.codigo.tipo.direccion"));
|
||||||
|
List<Tcustpersonaddress> listaddress = query.getResultList();
|
||||||
|
if(listaddress != null && !listaddress.isEmpty()){
|
||||||
|
direccioPrincipal = listaddress.iterator().next();
|
||||||
|
}
|
||||||
|
return direccioPrincipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna todas las direcciones encontradas
|
||||||
|
* @param personcode
|
||||||
|
* @param tipodireccion
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Tcustpersonaddress> buscaDireccionesPorTipo(Long personcode, String tipodireccion) throws RegistroException{
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonaddress o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.addresstypecatalog=:tipodireccion AND o.addresstypecatalogcode=:tipodireccioncodigo");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("tipodireccion", tipodireccion);
|
||||||
|
query.setParameter("tipodireccioncodigo", PortalMessages.getInstancia().getString("catalogo.codigo.tipo.direccion"));
|
||||||
|
List<Tcustpersonaddress> listaddress = query.getResultList();
|
||||||
|
if(listaddress != null && !listaddress.isEmpty()){
|
||||||
|
return listaddress;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecountry;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecountry}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PaisDao extends GenericDaoImpl<Tgenecountry> {
|
||||||
|
|
||||||
|
public PaisDao() {
|
||||||
|
super(Tgenecountry.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<Tgenecountry> buscarPaises() {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecountry> query = cb.createQuery(Tgenecountry.class);
|
||||||
|
Root<Tgenecountry> tgeneCountryRoot = query.from(Tgenecountry.class);
|
||||||
|
query.select(tgeneCountryRoot).orderBy(cb.asc(tgeneCountryRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgeneparroquia;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgeneparroquia}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ParroquiaDao extends GenericDaoImpl<Tgeneparroquia> {
|
||||||
|
|
||||||
|
public ParroquiaDao() {
|
||||||
|
super(Tgeneparroquia.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna las parroquias de un canton específico
|
||||||
|
* @param countryCode
|
||||||
|
* @param provinceCode
|
||||||
|
* @param cantonCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgeneparroquia> buscarParroquias(String countryCode, String provinceCode, String cantonCode) {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgeneparroquia> query = cb.createQuery(Tgeneparroquia.class);
|
||||||
|
Root<Tgeneparroquia> tparroquiaRoot = query.from(Tgeneparroquia.class);
|
||||||
|
query.where(cb.equal(tparroquiaRoot.get("id").get("countrycode"), countryCode), cb.equal(tparroquiaRoot.get("id").get("provincecode"), provinceCode), cb.equal(tparroquiaRoot.get("id").get("cantoncode"), cantonCode));
|
||||||
|
query.orderBy(cb.asc(tparroquiaRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustperson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustperson}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PersonaDao extends GenericDaoImpl<Tcustperson> {
|
||||||
|
|
||||||
|
public PersonaDao() {
|
||||||
|
super(Tcustperson.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersondetail;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustpersondetail}
|
||||||
|
*/
|
||||||
|
public class PersonaDetalleDao extends GenericDaoImpl<Tcustpersondetail> {
|
||||||
|
|
||||||
|
|
||||||
|
public PersonaDetalleDao() {
|
||||||
|
super(Tcustpersondetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Tcustpersondetail buscarPorIdentificacion(String codigoIdentificacion) throws RegistroException {
|
||||||
|
try {
|
||||||
|
Tcustpersondetail detallePersona = null;
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tcustpersondetail> query = cb.createQuery(Tcustpersondetail.class);
|
||||||
|
Root<Tcustpersondetail> personDetailRoot = query.from(Tcustpersondetail.class);
|
||||||
|
query.where(cb.equal(personDetailRoot.get("identification"), codigoIdentificacion),cb.equal(personDetailRoot.get("id").get("dateto"), FechaUtil.obtenerFecha(2999, 11, 31)));
|
||||||
|
List<Tcustpersondetail> detallesPersona = this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
if(!detallesPersona.isEmpty()){
|
||||||
|
detallePersona = detallesPersona.get(0);
|
||||||
|
}
|
||||||
|
return detallePersona;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Query;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustcompany;
|
||||||
|
import com.fp.armas.portal.model.Tcustpeople;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersonaddress;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.PortalMessages;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustcompany}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PersonaNaturalDao extends GenericDaoImpl<Tcustpeople> {
|
||||||
|
|
||||||
|
public PersonaNaturalDao() {
|
||||||
|
super(Tcustpeople.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna todas las personas naturales vigentes encontradas
|
||||||
|
* @param personcode
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Tcustpeople> buscaPersonaNatural(Long personcode) throws RegistroException{
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpeople o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
List<Tcustpeople> listpeople = query.getResultList();
|
||||||
|
if(listpeople != null && !listpeople.isEmpty()){
|
||||||
|
return listpeople;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgeneprovince;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgeneprovince}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ProvinciaDao extends GenericDaoImpl<Tgeneprovince> {
|
||||||
|
|
||||||
|
public ProvinciaDao() {
|
||||||
|
super(Tgeneprovince.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Consulta todas las provincias de un pa&iiacute;s
|
||||||
|
* @param countryCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgeneprovince> buscarProvinciasxPais(String countryCode) {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgeneprovince> query = cb.createQuery(Tgeneprovince.class);
|
||||||
|
Root<Tgeneprovince> tgeneprovinceRoot = query.from(Tgeneprovince.class);
|
||||||
|
query.where(cb.equal(tgeneprovinceRoot.get("id").get("countrycode"), countryCode)).orderBy(cb.asc(tgeneprovinceRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenesequence;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenesequence}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class SecuenciaDao extends GenericDaoImpl<Tgenesequence> {
|
||||||
|
|
||||||
|
public SecuenciaDao() {
|
||||||
|
super(Tgenesequence.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna la secuencia por coódigo ingresado
|
||||||
|
* @param nombreSecuencia
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
public Tgenesequence obtenerSecuencia(String nombreSecuencia) throws RegistroException{
|
||||||
|
Tgenesequence sequence = this.getEntityManager().find(Tgenesequence.class, nombreSecuencia);
|
||||||
|
return sequence;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Query;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersonphone;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.PortalMessages;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustpersonphone}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class TelefonoPersonaDao extends GenericDaoImpl<Tcustpersonphone> {
|
||||||
|
|
||||||
|
public TelefonoPersonaDao() {
|
||||||
|
super(Tcustpersonphone.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna el primer teléfono encontrado del tipo enviado
|
||||||
|
* @param personcode
|
||||||
|
* @param tipotelefono
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public Tcustpersonphone obtenerTelefonoTipo(Integer personcode, String tipotelefono) {
|
||||||
|
Tcustpersonphone telefono = null;
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonphone o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.phonetypecatalog=:valortelefono AND o.phonetypecatalogcode=:tipocodigotelefono");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("valortelefono", tipotelefono);
|
||||||
|
query.setParameter("tipocodigotelefono", PortalMessages.getInstancia().getString("catalogo.codigo.tipo.telefono"));
|
||||||
|
List<Tcustpersonphone> listphones = query.getResultList();
|
||||||
|
if(listphones != null && !listphones.isEmpty()){
|
||||||
|
telefono = listphones.iterator().next();
|
||||||
|
}
|
||||||
|
return telefono;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna el primer teléfono encontrado del tipo enviado
|
||||||
|
* @param personcode
|
||||||
|
* @param tipotelefono
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Tcustpersonphone> obtenerTelefonosPorTipo(Long personcode, String tipotelefono) {
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonphone o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.phonetypecatalog=:valortelefono AND o.phonetypecatalogcode=:tipocodigotelefono");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("valortelefono", tipotelefono);
|
||||||
|
query.setParameter("tipocodigotelefono", PortalMessages.getInstancia().getString("catalogo.codigo.tipo.telefono"));
|
||||||
|
List<Tcustpersonphone> listphones = query.getResultList();
|
||||||
|
if(listphones != null && !listphones.isEmpty()){
|
||||||
|
return listphones;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna la primera dirección encontrada
|
||||||
|
* @param personcode
|
||||||
|
* @param tipodireccion
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
public Long maxSecuencia(long personcode) throws RegistroException{
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT max(o.id.phonesequence) FROM Tcustpersonphone o WHERE o.id.personcode=:personcode");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
//query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
return (Long)query.getSingleResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Query;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tsafeuser;
|
||||||
|
import com.fp.armas.portal.model.Tsafeuserdetail;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tsafeuser}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class UsuarioDao extends GenericDaoImpl<Tsafeuser> {
|
||||||
|
|
||||||
|
public UsuarioDao() {
|
||||||
|
super(Tsafeuser.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna todos los usuarios encontrados
|
||||||
|
* @param personcode
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Tsafeuser> buscaUsers(String usercode) throws RegistroException{
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tsafeuser o WHERE o.usercode=:usercode");
|
||||||
|
query.setParameter("usercode", usercode);
|
||||||
|
List<Tsafeuser> listUser = query.getResultList();
|
||||||
|
if(listUser != null && !listUser.isEmpty()){
|
||||||
|
return listUser;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tsafeuserdetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tsafeuserdetail}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class UsuarioDetalle extends GenericDaoImpl<Tsafeuserdetail> {
|
||||||
|
|
||||||
|
public UsuarioDetalle() {
|
||||||
|
super(Tsafeuserdetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Query;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustpeople;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersonaddress;
|
||||||
|
import com.fp.armas.portal.model.Tsafeuserdetail;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tsafeuserdetail}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class UsuarioDetalleDao extends GenericDaoImpl<Tsafeuserdetail> {
|
||||||
|
|
||||||
|
public UsuarioDetalleDao() {
|
||||||
|
super(Tsafeuserdetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna todos los usuarios encontrados
|
||||||
|
* @param personcode
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Tsafeuserdetail> buscaUserDetail(Long personcode) throws RegistroException{
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tsafeuserdetail o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
List<Tsafeuserdetail> listpeople = query.getResultList();
|
||||||
|
if(listpeople != null && !listpeople.isEmpty()){
|
||||||
|
return listpeople;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tsafeuserprofile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tsafeuserprofile}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class UsuarioPerfilDao extends GenericDaoImpl<Tsafeuserprofile> {
|
||||||
|
|
||||||
|
public UsuarioPerfilDao() {
|
||||||
|
super(Tsafeuserprofile.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgeneactivity;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgeneactivity}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ActividadEconomicaDao extends GenericDaoImpl<Tgeneactivity> {
|
||||||
|
|
||||||
|
public ActividadEconomicaDao() {
|
||||||
|
super(Tgeneactivity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna todas las actividades economicas existentes
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
public Collection<Tgeneactivity> buscarActividadEconomicas() throws RegistroException{
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgeneactivity> query = cb.createQuery(Tgeneactivity.class);
|
||||||
|
Root<Tgeneactivity> tactivityRoot = query.from(Tgeneactivity.class);
|
||||||
|
query.orderBy(cb.asc(tactivityRoot.get("activitycode")));
|
||||||
|
query.select(tactivityRoot);
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenefile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenefile}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ArchivoDao extends GenericDaoImpl<Tgenefile> {
|
||||||
|
|
||||||
|
public ArchivoDao() {
|
||||||
|
super(Tgenefile.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenefilesdetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenefilesdetail}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ArchivoDetalleDao extends GenericDaoImpl<Tgenefilesdetail> {
|
||||||
|
|
||||||
|
public ArchivoDetalleDao() {
|
||||||
|
super(Tgenefilesdetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecanton;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecanton}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CantonDao extends GenericDaoImpl<Tgenecanton> {
|
||||||
|
|
||||||
|
public CantonDao() {
|
||||||
|
super(Tgenecanton.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca los cantones en base a los criterios ingresados
|
||||||
|
* @param countryCode
|
||||||
|
* @param provinceCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgenecanton> buscarCantonesxPaisyProvincia(String countryCode, String provinceCode) {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecanton> query = cb.createQuery(Tgenecanton.class);
|
||||||
|
Root<Tgenecanton> tcantonRoot = query.from(Tgenecanton.class);
|
||||||
|
query.where(cb.equal(tcantonRoot.get("id").get("countrycode"), countryCode), cb.equal(tcantonRoot.get("id").get("provincecode"), provinceCode));
|
||||||
|
query.orderBy(cb.asc(tcantonRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecatalogdetail;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecatalogdetail}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CatalogoDao extends GenericDaoImpl<Tgenecatalogdetail> {
|
||||||
|
|
||||||
|
public CatalogoDao(){
|
||||||
|
super(Tgenecatalogdetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca los detalles del catálogo en base el catalogcode
|
||||||
|
* @param codigoTipo
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
public Collection<Tgenecatalogdetail> buscarCatalogo(String codigoTipo) throws RegistroException{
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecatalogdetail> query = cb.createQuery(Tgenecatalogdetail.class);
|
||||||
|
Root<Tgenecatalogdetail> rootTgenecatalog = query.from(Tgenecatalogdetail.class);
|
||||||
|
query.select(rootTgenecatalog).where(cb.equal(rootTgenecatalog.get("id").get("catalogcode"),
|
||||||
|
codigoTipo)).orderBy(cb.asc(rootTgenecatalog.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<Tgenecatalogdetail> buscarCatalogo(String codigoTipo, String legalCode) throws RegistroException{
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecatalogdetail> query = cb.createQuery(Tgenecatalogdetail.class);
|
||||||
|
Root<Tgenecatalogdetail> rootTgenecatalog = query.from(Tgenecatalogdetail.class);
|
||||||
|
query.select(rootTgenecatalog).where(cb.and(cb.equal(rootTgenecatalog.get("id").get("catalogcode"), codigoTipo),
|
||||||
|
cb.equal(rootTgenecatalog.get("legalcode"), legalCode))).orderBy(cb.asc(rootTgenecatalog.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecity;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecity}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CiudadDao extends GenericDaoImpl<Tgenecity> {
|
||||||
|
|
||||||
|
public CiudadDao() {
|
||||||
|
super(Tgenecity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca la ciudad en base a los criterios de busqueda ingresado
|
||||||
|
* @param countryCode
|
||||||
|
* @param provinceCode
|
||||||
|
* @param cantonCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgenecity> buscarCiudad(String countryCode, String provinceCode, String cantonCode) {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecity> query = cb.createQuery(Tgenecity.class);
|
||||||
|
Root<Tgenecity> tciudadRoot = query.from(Tgenecity.class);
|
||||||
|
query.where(cb.equal(tciudadRoot.get("id").get("countrycode"), countryCode), cb.equal(tciudadRoot.get("id").get("provincecode"), provinceCode), cb.equal(tciudadRoot.get("id").get("cantoncode"), cantonCode));
|
||||||
|
query.orderBy(cb.asc(tciudadRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustcompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustcompany}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CompaniaDao extends GenericDaoImpl<Tcustcompany> {
|
||||||
|
|
||||||
|
public CompaniaDao() {
|
||||||
|
super(Tcustcompany.class);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Query;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersonaddress;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.PortalMessages;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustpersonaddress}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DireccionPersonaDao extends GenericDaoImpl<Tcustpersonaddress> {
|
||||||
|
|
||||||
|
public DireccionPersonaDao() {
|
||||||
|
super(Tcustpersonaddress.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public Tcustpersonaddress buscaDireccionPrincipal(Integer personcode) throws RegistroException{
|
||||||
|
Tcustpersonaddress direccioPrincipal = null;
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonaddress o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.principal=:principal");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("principal", PortalMessages.getInstancia().getString("valor.general.si"));
|
||||||
|
List<Tcustpersonaddress> listaddress = query.getResultList();
|
||||||
|
if(listaddress != null && !listaddress.isEmpty()){
|
||||||
|
direccioPrincipal = listaddress.iterator().next();
|
||||||
|
}
|
||||||
|
return direccioPrincipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna la primera dirección encontrada
|
||||||
|
* @param personcode
|
||||||
|
* @param tipodireccion
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public Tcustpersonaddress buscaDireccionPorTipo(Integer personcode, String tipodireccion) throws RegistroException{
|
||||||
|
Tcustpersonaddress direccioPrincipal = null;
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonaddress o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.addresstypecatalog=:tipodireccion AND o.addresstypecatalogcode=:tipodireccioncodigo");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("tipodireccion", tipodireccion);
|
||||||
|
query.setParameter("tipodireccioncodigo", PortalMessages.getInstancia().getString("catalogo.codigo.tipo.direccion"));
|
||||||
|
List<Tcustpersonaddress> listaddress = query.getResultList();
|
||||||
|
if(listaddress != null && !listaddress.isEmpty()){
|
||||||
|
direccioPrincipal = listaddress.iterator().next();
|
||||||
|
}
|
||||||
|
return direccioPrincipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna todas las direcciones encontradas
|
||||||
|
* @param personcode
|
||||||
|
* @param tipodireccion
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Tcustpersonaddress> buscaDireccionesPorTipo(Long personcode, String tipodireccion) throws RegistroException{
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpersonaddress o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto AND o.addresstypecatalog=:tipodireccion AND o.addresstypecatalogcode=:tipodireccioncodigo");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
query.setParameter("tipodireccion", tipodireccion);
|
||||||
|
query.setParameter("tipodireccioncodigo", PortalMessages.getInstancia().getString("catalogo.codigo.tipo.direccion"));
|
||||||
|
List<Tcustpersonaddress> listaddress = query.getResultList();
|
||||||
|
if(listaddress != null && !listaddress.isEmpty()){
|
||||||
|
return listaddress;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenecountry;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenecountry}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PaisDao extends GenericDaoImpl<Tgenecountry> {
|
||||||
|
|
||||||
|
public PaisDao() {
|
||||||
|
super(Tgenecountry.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<Tgenecountry> buscarPaises() {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgenecountry> query = cb.createQuery(Tgenecountry.class);
|
||||||
|
Root<Tgenecountry> tgeneCountryRoot = query.from(Tgenecountry.class);
|
||||||
|
query.select(tgeneCountryRoot).orderBy(cb.asc(tgeneCountryRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgeneparroquia;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgeneparroquia}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ParroquiaDao extends GenericDaoImpl<Tgeneparroquia> {
|
||||||
|
|
||||||
|
public ParroquiaDao() {
|
||||||
|
super(Tgeneparroquia.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna las parroquias de un canton específico
|
||||||
|
* @param countryCode
|
||||||
|
* @param provinceCode
|
||||||
|
* @param cantonCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgeneparroquia> buscarParroquias(String countryCode, String provinceCode, String cantonCode) {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgeneparroquia> query = cb.createQuery(Tgeneparroquia.class);
|
||||||
|
Root<Tgeneparroquia> tparroquiaRoot = query.from(Tgeneparroquia.class);
|
||||||
|
query.where(cb.equal(tparroquiaRoot.get("id").get("countrycode"), countryCode), cb.equal(tparroquiaRoot.get("id").get("provincecode"), provinceCode), cb.equal(tparroquiaRoot.get("id").get("cantoncode"), cantonCode));
|
||||||
|
query.orderBy(cb.asc(tparroquiaRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustperson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustperson}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PersonaDao extends GenericDaoImpl<Tcustperson> {
|
||||||
|
|
||||||
|
public PersonaDao() {
|
||||||
|
super(Tcustperson.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersondetail;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustpersondetail}
|
||||||
|
*/
|
||||||
|
public class PersonaDetalleDao extends GenericDaoImpl<Tcustpersondetail> {
|
||||||
|
|
||||||
|
|
||||||
|
public PersonaDetalleDao() {
|
||||||
|
super(Tcustpersondetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Tcustpersondetail buscarPorIdentificacion(String codigoIdentificacion) throws RegistroException {
|
||||||
|
try {
|
||||||
|
Tcustpersondetail detallePersona = null;
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tcustpersondetail> query = cb.createQuery(Tcustpersondetail.class);
|
||||||
|
Root<Tcustpersondetail> personDetailRoot = query.from(Tcustpersondetail.class);
|
||||||
|
query.where(cb.equal(personDetailRoot.get("identification"), codigoIdentificacion),cb.equal(personDetailRoot.get("id").get("dateto"), FechaUtil.obtenerFecha(2999, 11, 31)));
|
||||||
|
List<Tcustpersondetail> detallesPersona = this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
if(!detallesPersona.isEmpty()){
|
||||||
|
detallePersona = detallesPersona.get(0);
|
||||||
|
}
|
||||||
|
return detallePersona;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Query;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tcustcompany;
|
||||||
|
import com.fp.armas.portal.model.Tcustpeople;
|
||||||
|
import com.fp.armas.portal.model.Tcustpersonaddress;
|
||||||
|
import com.fp.armas.portal.util.FechaUtil;
|
||||||
|
import com.fp.armas.portal.util.PortalMessages;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tcustcompany}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PersonaNaturalDao extends GenericDaoImpl<Tcustpeople> {
|
||||||
|
|
||||||
|
public PersonaNaturalDao() {
|
||||||
|
super(Tcustpeople.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busca y retorna todas las personas naturales vigentes encontradas
|
||||||
|
* @param personcode
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Tcustpeople> buscaPersonaNatural(Long personcode) throws RegistroException{
|
||||||
|
Query query = this.getEntityManager().createQuery("SELECT o FROM Tcustpeople o WHERE o.id.personcode=:personcode AND o.id.dateto=:dateto");
|
||||||
|
query.setParameter("personcode", (long)personcode);
|
||||||
|
query.setParameter("dateto", FechaUtil.obtenerFecha(2999, 11, 31));
|
||||||
|
List<Tcustpeople> listpeople = query.getResultList();
|
||||||
|
if(listpeople != null && !listpeople.isEmpty()){
|
||||||
|
return listpeople;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgeneprovince;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgeneprovince}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ProvinciaDao extends GenericDaoImpl<Tgeneprovince> {
|
||||||
|
|
||||||
|
public ProvinciaDao() {
|
||||||
|
super(Tgeneprovince.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Consulta todas las provincias de un pa&iiacute;s
|
||||||
|
* @param countryCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<Tgeneprovince> buscarProvinciasxPais(String countryCode) {
|
||||||
|
try {
|
||||||
|
CriteriaBuilder cb = this.getEntityManager().getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Tgeneprovince> query = cb.createQuery(Tgeneprovince.class);
|
||||||
|
Root<Tgeneprovince> tgeneprovinceRoot = query.from(Tgeneprovince.class);
|
||||||
|
query.where(cb.equal(tgeneprovinceRoot.get("id").get("countrycode"), countryCode)).orderBy(cb.asc(tgeneprovinceRoot.get("description")));
|
||||||
|
return this.getEntityManager().createQuery(query).getResultList();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
throw new RegistroException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.fp.armas.portal.dao.registro;
|
||||||
|
|
||||||
|
import com.fp.armas.portal.dao.general.GenericDaoImpl;
|
||||||
|
import com.fp.armas.portal.model.Tgenesequence;
|
||||||
|
import com.fp.armas.portal.util.RegistroException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Objeto de acceso a datos de la tabla {@link Tgenesequence}
|
||||||
|
* @author dcruz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class SecuenciaDao extends GenericDaoImpl<Tgenesequence> {
|
||||||
|
|
||||||
|
public SecuenciaDao() {
|
||||||
|
super(Tgenesequence.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retorna la secuencia por coódigo ingresado
|
||||||
|
* @param nombreSecuencia
|
||||||
|
* @return
|
||||||
|
* @throws RegistroException
|
||||||
|
*/
|
||||||
|
public Tgenesequence obtenerSecuencia(String nombreSecuencia) throws RegistroException{
|
||||||
|
Tgenesequence sequence = this.getEntityManager().find(Tgenesequence.class, nombreSecuencia);
|
||||||
|
return sequence;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue