Skip to main content
summaryrefslogtreecommitdiffstats
blob: 5d1f13c98dc1c53663d5bd7d4d61fa410ef670d0 (plain) (blame)
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
##included template. Generates the @Column annotation.
##Assumes that the context has a "column" and a "table" object
##generate annotation only the parameters for the column NOT default
##and the generateDLLAnnotation property is not set on the table
###------------------------------------------------
#macro( append $members $parameters )
#if( $members == "")
#set( $members = $parameters )
#else
#set( $members = "$members, $parameters" ) 
#end	
#end
###------------------------------------------------
#if ( $column.dataTypeLOB)
    @Lob()
#end
#if ( $column.needMapTemporalType)
    @Temporal( TemporalType.$column.temporalType)
#end
#set ($members = "")
#if ( !$column.default || $customizer.generateDDLAnnotations )
#if ( !${column.defaultname} )
#append($members "name=$customizer.quote($column.name)" )
#end
#if (!$column.insertable)
#append(${members} "insertable=false")
#end
#if (!$column.updateable)
#append(${members} "updatable=false")
#end
#end
#if( $customizer.generateDDLAnnotations )
#if ($column.unique)
#append($members  "unique=true")
#end
#if (!$column.nullable)
#append($members  "nullable=false")
#end
#if ($column.size > 0)
#if ($column.numeric)
#append($members "precision=$column.size")
#if ($column.decimalDigits != 0 && $column.decimalDigits != -1)
#append($members "scale=$column.decimalDigits")
#end
#else
#if ( !$column.dataTypeLOB)
#append($members "length=$column.size")
#end
#end
#end
#end
#if( $members !="" )
	@Column($members)
#end

Back to the top