1 |
/*
|
1 |
/*
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3 |
*
|
3 |
*
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
5 |
*
|
5 |
*
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
9 |
* language governing permissions and limitations under the License.
|
9 |
* language governing permissions and limitations under the License.
|
10 |
*
|
10 |
*
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
12 |
*/
|
12 |
*/
|
13 |
|
13 |
|
14 |
package org.openconcerto.erp.core.sales.quote.element;
|
14 |
package org.openconcerto.erp.core.sales.quote.element;
|
15 |
|
15 |
|
16 |
import org.openconcerto.erp.config.ComptaPropsConfiguration;
|
16 |
import org.openconcerto.erp.config.ComptaPropsConfiguration;
|
17 |
import org.openconcerto.erp.core.common.element.SocieteJoinSQLElement;
|
17 |
import org.openconcerto.erp.core.common.element.SocieteJoinSQLElement;
|
18 |
import org.openconcerto.sql.element.JoinSQLElement;
|
18 |
import org.openconcerto.sql.element.JoinSQLElement;
|
19 |
import org.openconcerto.sql.model.DBRoot;
|
19 |
import org.openconcerto.sql.model.DBRoot;
|
20 |
import org.openconcerto.sql.model.SQLTable;
|
20 |
import org.openconcerto.sql.model.SQLTable;
|
21 |
import org.openconcerto.sql.utils.SQLCreateTable;
|
21 |
import org.openconcerto.sql.utils.SQLCreateTable;
|
22 |
|
22 |
|
23 |
public class DevisLogMailSQLElement extends SocieteJoinSQLElement {
|
23 |
public class DevisLogMailSQLElement extends SocieteJoinSQLElement {
|
24 |
|
24 |
|
25 |
public static final String TABLENAME = "DEVIS_MAIL_LOG";
|
25 |
public static final String TABLENAME = "DEVIS_MAIL_LOG";
|
26 |
private static final String TO_OWNER_FIELDNAME = "ID_DEVIS";
|
26 |
private static final String TO_OWNER_FIELDNAME = "ID_DEVIS";
|
27 |
|
27 |
|
28 |
private static final SQLCreateTable getCreateTable(final SQLTable devisT, final SQLTable logT) {
|
28 |
private static final SQLCreateTable getCreateTable(final SQLTable devisT, final SQLTable logT) {
|
29 |
return JoinSQLElement.createBuilder(devisT, logT).setTableName(TABLENAME).setOwnerFK(TO_OWNER_FIELDNAME).getCreateTable();
|
29 |
return JoinSQLElement.createBuilder(devisT, logT).setTableName(TABLENAME).setOwnerFK(TO_OWNER_FIELDNAME).getCreateTable();
|
30 |
}
|
30 |
}
|
31 |
|
31 |
|
32 |
public DevisLogMailSQLElement() {
|
32 |
public DevisLogMailSQLElement() {
|
33 |
this(ComptaPropsConfiguration.getInstanceCompta().getRootSociete());
|
33 |
this(ComptaPropsConfiguration.getInstanceCompta().getRootSociete());
|
34 |
}
|
34 |
}
|
35 |
|
35 |
|
36 |
public DevisLogMailSQLElement(final DBRoot root) {
|
36 |
public DevisLogMailSQLElement(final DBRoot root) {
|
37 |
super((SQLTable) root.getCheckedChild(TABLENAME).getJDBC(), TO_OWNER_FIELDNAME);
|
37 |
super((SQLTable) root.getCheckedChild(TABLENAME).getJDBC(), TO_OWNER_FIELDNAME);
|
38 |
}
|
38 |
}
|
- |
|
39 |
|
- |
|
40 |
@Override
|
- |
|
41 |
protected String createCode() {
|
- |
|
42 |
return createCodeFromPackage() + ".log";
|
- |
|
43 |
}
|
39 |
}
|
44 |
}
|