-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsql2java.properties
More file actions
116 lines (99 loc) · 3.85 KB
/
sql2java.properties
File metadata and controls
116 lines (99 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#
# PROPERTIES FILE FOR SQL2JAVA
#
#-------------------------------------------------
# (2/6) CONFIGURE RETRIEVAL OF AUTO GENERATED KEY
#-------------------------------------------------
# For those who do not want to read below, please simply pick up the
# configuration associated with your database.
#
# More explanation:
# When you save a bean whose primary key is numeric and has no value set,
# we assume that you want sql2java to retrieve a key's value generated
# on the database side.
#
# generatedkey.retrieve can take 4 values:
#
# auto - the standard approach when you have a JDBC 3.0 driver.
#
# before - the key's value is retrieved before inserting the record.
#
# after - the key's value is retrieved after inserting the record
#
# none - the key's value is never retrieved, frankly I doubt you
# want this configuration
#
# If you set it to before or after you also need to configure the
# autogeneratedkey.statement properties.
# <TABLE> is replaced at code generation time by the table name.
# You may adjust this properties to fit your own naming convention.
#
# PICK THE CONFIGURATION ASSOCIATED WITH YOUR DATABASE
# (or create one, but in that case let us know so we can add it here... :-)
#
#-- HSQL ------
#generatedkey.retrieve=after
#generatedkey.statement=CALL IDENTITY()
#-- IF YOU USE A JDBC 3.0 DRIVER (works with mysql, ORACLE 9, etc..) ------
generatedkey.retrieve=auto
generatedkey.statement=
#----------------------------------------------
# (3/6) GENERATED SOURCE CODE
#----------------------------------------------
# Package name for the generated source code
mgrwriter.package=com.test
# Property file to use when initializing Velocity
#mgrwriter.velocityprops=somefile
# templates (you can generate java files, jsp, etc...)
mgrwriter.templates.loadingpath=templates/velocity/global, \
templates/velocity/table, \
templates/velocity/includes
mgrwriter.templates.perschema= database.java.vm
mgrwriter.templates.pertable= bean.java.vm, \
manager.java.vm
#-----------------------------------------------
# (4/6) JDBC TYPES Mapping
#-----------------------------------------------
#
# jdbc DATE mapping can be:
# java.sql.Date
# java.util.Date
jdbc2java.date=java.util.Date
# jdbc TIME mapping can be:
# java.sql.Time
# java.util.Date
jdbc2java.time=java.util.Date
# jdbc TIMESTAMP mappning can be:
# java.sql.Timestamp
# java.util.Date
jdbc2java.timestamp=java.util.Date
#-----------------------------------------------
# (5/6) FILTER OUT CERTAIN TABLES
#-----------------------------------------------
#
# COMMA SEPARATED list of table types to be mapped
# Commonly seen types are TABLE, VIEW, SYSTEM TABLE, SYNONYM
jdbc.tabletypes=TABLE
# Table name pattern of tables to be mapped to classes.
# available wildcard: %
# defaults to %
# You can specify several patterns separated by commas.
jdbc.tablenamepattern=%
# SPACE SEPARATED list of tables to include or exclude. If you specify both,
# the include list will take priority. If these fields are left commented out,
# all tables in the specified schema will get mapped to classes
#mgrwriter.include=Testing
#mgrwriter.exclude=
#-----------------------------------------------
# (6/6) CONFIGURE OPTIMISTIC LOCK
#-----------------------------------------------
# optimisticlock.type can take 2 values:
# none - the optimistic lock mechanism is disabled (default).
# timestamp - the optimistic lock column contains the System.currentTimeMillis() value.
#
# optimisticlock.column takes the column name used by optimistic lock mechanism in your database.
# If this column is not present in some table the optimistic lock is not applied there.
# the column mapping can be java.lang.Long or java.lang.String.
# (jdbc type size >= 13 characters)
optimisticlock.type=timestamp
optimisticlock.column=version_time