package se.kits.gakusei.content.model;

import javax.annotation.Generated;
import javax.persistence.*;

@Entity
@Table(name = "inflections", schema = "contentschema")
public class Inflection {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne
    @JoinColumn(name = "lesson_ref")
    private Lesson lesson;

    private String inflectionMethod;

    public Inflection() { }

    public void setLesson(Lesson lesson) {
        this.lesson = lesson;
    }

    public Lesson getLesson() {
        return lesson;
    }

    public void setInflectionMethod(String inflectionMethod) {
        this.inflectionMethod = inflectionMethod;
    }

    public String getInflectionMethod() {
        return inflectionMethod;
    }
}

@@ -33,16 +33,63 @@
 model;%0A%0A
+import se.sandboge.japanese.conjugation.Verb;%0A%0A
 import j
@@ -142,16 +142,166 @@
 tence.*;
+%0Aimport java.lang.reflect.Method;%0Aimport java.lang.reflect.Modifier;%0Aimport java.lang.reflect.Type;%0Aimport java.util.ArrayList;%0Aimport java.util.List;
 %0A%0A@Entit
@@ -613,24 +613,76 @@
 tion() %7B %7D%0A%0A
+    public Long getId() %7B%0A        return id;%0A    %7D%0A%0A
     public v
@@ -1011,11 +1011,555 @@
 d;%0A    %7D
+%0A%0A    public static List%3CString%3E getAllInflectionMethods() %7B%0A        List%3CString%3E inflectionMethods = new ArrayList%3C%3E();%0A        Method%5B%5D allMethods = Verb.class.getDeclaredMethods();%0A%0A        for(Method method : allMethods)%7B%0A            if(Modifier.isPublic(method.getModifiers())%0A                    && !Modifier.isStatic(method.getModifiers())%0A                    && method.getGenericReturnType().equals(String.class))%7B%0A                inflectionMethods.add(method.getName());%0A            %7D%0A        %7D%0A%0A        return inflectionMethods;%0A    %7D
 %0A%7D%0A

Extend functionality of Inflection