Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.gen/templates/entities/pk.java.vm')
-rw-r--r--jpa/plugins/org.eclipse.jpt.gen/templates/entities/pk.java.vm66
1 files changed, 0 insertions, 66 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.gen/templates/entities/pk.java.vm b/jpa/plugins/org.eclipse.jpt.gen/templates/entities/pk.java.vm
deleted file mode 100644
index 1831098585..0000000000
--- a/jpa/plugins/org.eclipse.jpt.gen/templates/entities/pk.java.vm
+++ /dev/null
@@ -1,66 +0,0 @@
-#if ($table.package != "")
-package ${table.package};
-#end
-
-import java.io.Serializable;
-import javax.persistence.*;
-
-/**
- * The primary key class for the ${table.name} database table.
- *
- */
-@Embeddable
-public class ${table.compositeKeyClassName} implements Serializable {
- //default serial version id, required for serializable classes.
- private static final long serialVersionUID = 1L;
-#####
-##### fields
-#####
-#foreach ($column in $table.primaryKeyColumns)
-#if ($table.access == "field")
-
-#parse("column.vm")
-#end
- ${column.fieldScope} ${column.propertyType} ${column.propertyName};
-#end
-
- public ${table.compositeKeyClassName}() {
- }
-#####
-##### simple properties getters and setters
-#####
-#foreach ($column in $table.primaryKeyColumns)
-#if ($table.access == "property")
-
-#parse("column.vm")
-#end
- $column.propertyGetScope $column.propertyType $customizer.propertyGetter($column.propertyName)() {
- return this.${column.propertyName};
- }
- $column.propertySetScope void $customizer.propertySetter($column.propertyName)($column.propertyType $column.propertyName) {
- this.${column.propertyName} = ${column.propertyName};
- }
-#end
-##
-## equals/hashCode
-
- public boolean equals(Object other) {
- if (this == other) {
- return true;
- }
- if (!(other instanceof ${table.compositeKeyClassName})) {
- return false;
- }
- ${table.compositeKeyClassName} castOther = (${table.compositeKeyClassName})other;
- return
- ${table.primaryKeyEqualsClause}
-
- }
-
- public int hashCode() {
- final int prime = 31;
- int hash = 17;
- ${table.primaryKeyHashCodeClause}
- return hash;
- }
-} \ No newline at end of file

Back to the top