initial commit

This commit is contained in:
devapp
2021-11-29 11:56:30 +01:00
parent 016e45a01c
commit 5b67068faa
4285 changed files with 927085 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
/*
* Axelor Business Solutions
*
* Copyright (C) 2019 Axelor (<http://axelor.com>).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.axelor.exception;
import com.axelor.auth.AuthModule;
import com.axelor.db.JpaModule;
import com.google.inject.AbstractModule;
public class TestModule extends AbstractModule {
@Override
protected void configure() {
install(new JpaModule("testUnit", true, true));
install(new AuthModule());
}
}

View File

@@ -0,0 +1,35 @@
/*
* Axelor Business Solutions
*
* Copyright (C) 2019 Axelor (<http://axelor.com>).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.axelor.exception.db;
import org.junit.Test;
public class TraceBackTest {
@Test
public void testPersist() {
System.out.println("Test");
String str = "test.test1.test2";
String tab[] = str.split("\\.");
System.out.println(tab.length);
System.out.println(tab[0]);
System.out.println(tab[1]);
System.out.println(tab[2]);
}
}

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="testUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/axelor-test" />
<property name="javax.persistence.jdbc.user" value="axelor" />
<property name="javax.persistence.jdbc.password" value="" />
<!--
value="create" to build a new database on each run;
value="update" to modify an existing database;
value="create-drop" means the same as "create" but also drops tables when Hibernate closes;
value="validate" makes no changes to the database
-->
<property name="hibernate.hbm2ddl.auto" value="update" />
<!--
<property name="hibernate.show_sql" value="true"/>
-->
</properties>
</persistence-unit>
</persistence>