diff --git a/.metadata/.lock b/.metadata/.lock
new file mode 100644
index 0000000..e69de29
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
new file mode 100644
index 0000000..25cb955
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
new file mode 100644
index 0000000..ed9b514
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
new file mode 100644
index 0000000..6b2aaa7
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree
new file mode 100644
index 0000000..8a1fc9e
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree differ
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
new file mode 100644
index 0000000..653d183
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ
diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
new file mode 100644
index 0000000..e8b9206
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
@@ -0,0 +1,3022 @@
+
+
+
+ activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration
+
+
+
+
+
+
+
+ topLevel
+ shellMaximized
+
+
+
+
+ persp.actionSet:org.eclipse.mylyn.doc.actionSet
+ persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation
+ persp.actionSet:org.eclipse.ui.cheatsheets.actionSet
+ persp.actionSet:org.eclipse.search.searchActionSet
+ persp.actionSet:org.eclipse.text.quicksearch.actionSet
+ persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation
+ persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation
+ persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo
+ persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet
+ persp.actionSet:org.eclipse.ui.actionSet.keyBindings
+ persp.actionSet:org.eclipse.ui.actionSet.openFiles
+ persp.actionSet:org.springsource.ide.eclipse.commons.launch.actionSet
+ persp.actionSet:org.eclipse.jst.j2ee.J2eeMainActionSet
+ persp.actionSet:org.eclipse.jdt.ui.JavaActionSet
+ persp.actionSet:org.eclipse.debug.ui.launchActionSet
+ persp.actionSet:org.eclipse.debug.ui.debugActionSet
+ persp.actionSet:org.eclipse.ui.NavigateActionSet
+ persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer
+ persp.viewSC:org.eclipse.wst.server.ui.ServersView
+ persp.viewSC:org.eclipse.datatools.connectivity.DataSourceExplorerNavigator
+ persp.viewSC:org.eclipse.ui.views.BookmarkView
+ persp.viewSC:org.eclipse.ui.views.ContentOutline
+ persp.viewSC:org.eclipse.ui.views.PropertySheet
+ persp.viewSC:org.eclipse.ui.views.ResourceNavigator
+ persp.viewSC:org.eclipse.wst.common.snippets.internal.ui.SnippetsView
+ persp.viewSC:org.eclipse.ui.views.AllMarkersView
+ persp.viewSC:org.eclipse.mylyn.tasks.ui.views.tasks
+ persp.viewSC:org.eclipse.search.ui.views.SearchView
+ persp.viewSC:org.eclipse.ui.console.ConsoleView
+ persp.showIn:org.eclipse.ui.navigator.ProjectExplorer
+ persp.actionSet:org.eclipse.wst.ws.explorer.explorer
+ persp.newWizSC:org.eclipse.m2e.core.wizards.Maven2ProjectWizard
+ persp.newWizSC:org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard
+ persp.newWizSC:org.springsource.ide.eclipse.commons.gettingstarted.wizard.boot.NewSpringBootWizard
+ persp.newWizSC:org.springsource.ide.eclipse.gettingstarted.wizards.import.generic.newalias
+ persp.newWizSC:org.eclipse.wst.jsdt.ui.NewJSWizard
+ persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView
+ persp.perspSC:org.eclipse.debug.ui.DebugPerspective
+ persp.perspSC:org.eclipse.jdt.ui.JavaPerspective
+ persp.perspSC:org.eclipse.ui.resourcePerspective
+ persp.perspSC:org.eclipse.wst.web.ui.webDevPerspective
+ persp.newWizSC:org.eclipse.jst.j2ee.ui.project.facet.EarProjectWizard
+ persp.newWizSC:org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard
+ persp.newWizSC:org.eclipse.jst.ejb.ui.project.facet.EjbProjectWizard
+ persp.newWizSC:org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorProjectWizard
+ persp.newWizSC:org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientProjectWizard
+ persp.newWizSC:org.eclipse.wst.web.ui.internal.wizards.SimpleWebProjectWizard
+ persp.newWizSC:org.eclipse.jpt.ui.wizard.newJpaProject
+ persp.newWizSC:org.eclipse.jst.servlet.ui.internal.wizard.AddServletWizard
+ persp.newWizSC:org.eclipse.jst.ejb.ui.internal.wizard.AddSessionBeanWizard
+ persp.newWizSC:org.eclipse.jst.ejb.ui.internal.wizard.AddMessageDrivenBeanWizard
+ persp.newWizSC:org.eclipse.jpt.ui.wizard.newEntity
+ persp.newWizSC:org.eclipse.jst.ws.creation.ui.wizard.serverwizard
+ persp.newWizSC:org.eclipse.ui.wizards.new.folder
+ persp.newWizSC:org.eclipse.ui.wizards.new.file
+ persp.actionSet:org.eclipse.wst.server.ui.internal.webbrowser.actionSet
+ persp.actionSet:org.eclipse.debug.ui.breakpointActionSet
+ persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet
+ persp.showIn:org.eclipse.eclemma.ui.CoverageView
+ persp.newWizSC:org.eclipse.jst.jsp.ui.internal.wizard.NewJSPWizard
+ persp.newWizSC:org.eclipse.jpt.jpa.ui.wizard.newJpaProject
+ persp.perspSC:org.eclipse.jpt.ui.jpaPerspective
+
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:Java
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:Mylyn
+
+
+ View
+ categoryTag:General
+
+
+
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:Server
+
+
+ View
+ categoryTag:Data Management
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+
+
+
+
+
+ active
+
+ View
+ categoryTag:Help
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:Help
+
+
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+
+
+ View
+ categoryTag:General
+ active
+ activeOnClose
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+ org.eclipse.e4.primaryDataStack
+ EditorStack
+
+
+
+
+
+
+ View
+ categoryTag:General
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+
+ View
+ categoryTag:General
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Server
+
+
+
+
+ View
+ categoryTag:Data Management
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+
+ View
+ categoryTag:General
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+
+ View
+ categoryTag:Mylyn
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+ Draggable
+
+
+ Draggable
+
+
+ Draggable
+
+
+ Draggable
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+
+ toolbarSeparator
+
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+ stretch
+ SHOW_RESTORE_MENU
+
+
+ Draggable
+ HIDEABLE
+ SHOW_RESTORE_MENU
+
+
+
+
+ stretch
+
+
+ Draggable
+
+
+ Draggable
+
+
+
+
+ TrimStack
+ Draggable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ platform:win32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ platform:win32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor
+ removeOnHide
+
+
+
+
+ View
+ categoryTag:Ant
+
+
+
+
+ View
+ categoryTag:Gradle
+
+
+
+
+ View
+ categoryTag:Gradle
+
+
+
+
+ View
+ categoryTag:Data Management
+
+
+
+
+ View
+ categoryTag:Data Management
+
+
+
+
+ View
+ categoryTag:Data Management
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Git
+ NoRestore
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:JPA
+
+
+
+
+ View
+ categoryTag:JPA
+
+
+
+
+ View
+ categoryTag:JavaServer Faces
+
+
+
+
+ View
+ categoryTag:JavaServer Faces
+
+
+
+
+ View
+ categoryTag:Web Services
+
+
+
+
+ View
+ categoryTag:Maven
+
+
+
+
+ View
+ categoryTag:Maven
+
+
+
+
+ View
+ categoryTag:Mylyn
+
+
+
+
+ View
+ categoryTag:Mylyn
+
+
+
+
+ View
+ categoryTag:Mylyn
+
+
+
+
+ View
+ categoryTag:Oomph
+
+
+
+
+ View
+ categoryTag:API Tools
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Team
+
+
+
+
+ View
+ categoryTag:Team
+
+
+ View
+ categoryTag:Help
+
+
+
+
+ View
+ categoryTag:Terminal
+
+
+
+
+ View
+ categoryTag:Other
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Other
+
+
+
+
+ View
+ categoryTag:Other
+
+
+
+
+ View
+ categoryTag:Other
+
+
+
+
+ View
+ categoryTag:Server
+
+
+
+
+ View
+ categoryTag:XML
+
+
+
+
+ View
+ categoryTag:XML
+
+
+
+
+ View
+ categoryTag:XML
+
+
+
+
+ View
+ categoryTag:XML
+
+
+
+
+ View
+ categoryTag:XML
+
+
+
+
+ View
+ categoryTag:Other
+
+
+
+
+ View
+ categoryTag:Other
+
+
+
+ glue
+ move_after:PerspectiveSpacer
+ SHOW_RESTORE_MENU
+
+
+ move_after:Spacer Glue
+ HIDEABLE
+ SHOW_RESTORE_MENU
+
+
+ glue
+ move_after:SearchField
+ SHOW_RESTORE_MENU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache
new file mode 100644
index 0000000..593f470
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache
new file mode 100644
index 0000000..593f470
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
new file mode 100644
index 0000000..593f470
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
new file mode 100644
index 0000000..3de398e
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
new file mode 100644
index 0000000..a4ee3cb
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
new file mode 100644
index 0000000..9e390f5
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.0.20200318-1040.xml b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.0.20200318-1040.xml
new file mode 100644
index 0000000..e33758c
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.0.20200318-1040.xml
@@ -0,0 +1,43 @@
+
+
+
+ %date [%thread] %-5level %logger{35} - %msg%n
+
+
+ OFF
+
+
+
+
+ ${org.eclipse.m2e.log.dir}/0.log
+
+ ${org.eclipse.m2e.log.dir}/%i.log
+ 1
+ 10
+
+
+ 100MB
+
+
+ %date [%thread] %-5level %logger{35} - %msg%n
+
+
+
+
+
+ WARN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup b/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup
new file mode 100644
index 0000000..1f73e14
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup
@@ -0,0 +1,6 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml
new file mode 100644
index 0000000..5ca0b77
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml
@@ -0,0 +1,3 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.tm.terminal.view.ui/.executables/data.properties b/.metadata/.plugins/org.eclipse.tm.terminal.view.ui/.executables/data.properties
new file mode 100644
index 0000000..24c513c
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.tm.terminal.view.ui/.executables/data.properties
@@ -0,0 +1,6 @@
+#Wed Mar 10 11:21:31 ICT 2021
+0.Icon=C\:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico
+0.Path=C\:\\Program Files\\Git\\bin\\sh.exe
+0.Translate=true
+0.Args=--login -i
+0.Name=Git Bash
diff --git a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
new file mode 100644
index 0000000..d6c6974
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
@@ -0,0 +1,11 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.ui.intro/introstate b/.metadata/.plugins/org.eclipse.ui.intro/introstate
new file mode 100644
index 0000000..02f134f
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.ui.intro/introstate
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
new file mode 100644
index 0000000..8a43e7e
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.metadata/version.ini b/.metadata/version.ini
new file mode 100644
index 0000000..302db5f
--- /dev/null
+++ b/.metadata/version.ini
@@ -0,0 +1,3 @@
+#Wed Mar 10 11:21:28 ICT 2021
+org.eclipse.core.runtime=2
+org.eclipse.platform=4.17.0.v20200902-1800
diff --git a/build.gradle b/build.gradle
index 3e57db2..1ce1222 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,6 +14,9 @@ repositories {
}
dependencies {
+ // https://mvnrepository.com/artifact/javax.validation/validation-api
+ implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
+ compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.18'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-validation'
diff --git a/src/main/java/com/aa/awesomecareer/controller/UsersController.java b/src/main/java/com/aa/awesomecareer/controller/UsersController.java
index 628c70f..e799d32 100644
--- a/src/main/java/com/aa/awesomecareer/controller/UsersController.java
+++ b/src/main/java/com/aa/awesomecareer/controller/UsersController.java
@@ -13,10 +13,15 @@
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.aa.awesomecareer.model.UserModel;
import com.aa.awesomecareer.service.UserService;
@@ -48,5 +53,23 @@ public String show(@PathVariable String email, Model model) {
return "users/show";
}
+
+ @GetMapping(value = { "/users/add", "/signup" })
+ public String add(Locale locale, Model model) {
+ model.addAttribute("user", new UserModel());
+ return "users/add";
+ }
+
+ @PostMapping(value = "/users")
+ public String create(@ModelAttribute("user") @Validated UserModel userModel, BindingResult bindingResult,
+ Model model, final RedirectAttributes redirectAttributes, HttpServletRequest request) throws Exception {
+ if (bindingResult.hasErrors()) {
+ logger.info("Returning register.jsp page, validate failed");
+ return "users/add";
+ }
+ userService.addUser(userModel);
+ // Add message to flash scope
+ return "redirect: " + request.getContextPath() + "/home";
+ }
}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Application.java b/src/main/java/com/aa/awesomecareer/entity/Application.java
new file mode 100644
index 0000000..1f39641
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Application.java
@@ -0,0 +1,32 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "application")
+public class Application {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+ @Column(name = "userId")
+ private Integer userId;
+ @Column(name = "jobId")
+ private Integer jobId;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Job job;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Bookmark.java b/src/main/java/com/aa/awesomecareer/entity/Bookmark.java
new file mode 100644
index 0000000..339354c
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Bookmark.java
@@ -0,0 +1,34 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "bookmark")
+public class Bookmark {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "userId")
+ private Integer userId;
+ @Column(name = "jobId")
+ private Integer jobId;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Job job;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Certificate.java b/src/main/java/com/aa/awesomecareer/entity/Certificate.java
new file mode 100644
index 0000000..f093824
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Certificate.java
@@ -0,0 +1,35 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "certificate")
+public class Certificate {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+ @Column(name = "userId",length = 256)
+ private Integer userId;
+ @Column(name = "title",length = 256)
+ private String title;
+ @Column(name = "issuedTime")
+ @Temporal(value = TemporalType.TIMESTAMP)
+ private Date issuedTime;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Company.java b/src/main/java/com/aa/awesomecareer/entity/Company.java
new file mode 100644
index 0000000..5e15dc2
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Company.java
@@ -0,0 +1,44 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name="company")
+public class Company {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name="name", length=256)
+ private String name;
+ @Column(name="address", length=256)
+ private String address;
+ @Column(name="website", length=256)
+ private String website;
+ @Column(name="foundedTime")
+ @Temporal(value=TemporalType.TIMESTAMP)
+ private Date foundedTime;
+ @Column(name="foundedBy", length=256)
+ private String foundedBy;
+ @Column(name="memberTotal")
+ private Integer memberTotal;
+ @Column(name="image", length=256)
+ private String image;
+
+ @OneToMany(mappedBy = "follow")
+ private List follows;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Education.java b/src/main/java/com/aa/awesomecareer/entity/Education.java
new file mode 100644
index 0000000..c8c5be9
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Education.java
@@ -0,0 +1,38 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "education")
+public class Education {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "school", length = 256)
+ private String school;
+ @Column(name = "major", length = 256)
+ private String major;
+ @Column(name = "description", length = 3000)
+ private String description;
+ @Column(name = "graduation")
+ @Temporal(value = TemporalType.TIMESTAMP)
+ private Date graduation;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Experience.java b/src/main/java/com/aa/awesomecareer/entity/Experience.java
new file mode 100644
index 0000000..b4b0024
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Experience.java
@@ -0,0 +1,32 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "experience")
+public class Experience {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "companyName", length = 256)
+ private String companyName;
+ @Column(name = "jobTitle", length = 256)
+ private String jobTitle;
+ @Column(name = "startTime")
+ @Temporal(value = TemporalType.TIMESTAMP)
+ private String startTime;
+ @Column(name = "endTime")
+ @Temporal(value = TemporalType.TIMESTAMP)
+ private String endTime;
+ @Column(name = "description", length = 3000)
+ private String description;
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Favorite.java b/src/main/java/com/aa/awesomecareer/entity/Favorite.java
new file mode 100644
index 0000000..0c0c1e5
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Favorite.java
@@ -0,0 +1,34 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "favorite")
+public class Favorite {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "userId")
+ private Integer userId;
+ @Column(name = "storyId")
+ private Integer storyId;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Story story;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Field.java b/src/main/java/com/aa/awesomecareer/entity/Field.java
new file mode 100644
index 0000000..9f0a30b
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Field.java
@@ -0,0 +1,28 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "field")
+public class Field {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "name",length = 256)
+ private String name;
+
+ @OneToMany(mappedBy = "jobfield")
+ private List jobfields;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Follow.java b/src/main/java/com/aa/awesomecareer/entity/Follow.java
new file mode 100644
index 0000000..dfe4073
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Follow.java
@@ -0,0 +1,33 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "follow")
+public class Follow {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "userId")
+ private Integer userId;
+ @Column(name = "companyId")
+ private Integer companyId;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Company company;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Hashtag.java b/src/main/java/com/aa/awesomecareer/entity/Hashtag.java
new file mode 100644
index 0000000..b7cd82d
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Hashtag.java
@@ -0,0 +1,28 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "hashtag")
+public class Hashtag {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "name",length = 256)
+ private String name;
+
+ @OneToMany(mappedBy = "storyhastag")
+ private List storyHashtags;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Interest.java b/src/main/java/com/aa/awesomecareer/entity/Interest.java
new file mode 100644
index 0000000..5da0702
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Interest.java
@@ -0,0 +1,29 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "interest")
+public class Interest {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "userId")
+ private Integer userId;
+ @Column(name = "name",length=256)
+ private String name;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Job.java b/src/main/java/com/aa/awesomecareer/entity/Job.java
new file mode 100644
index 0000000..ed20dc2
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Job.java
@@ -0,0 +1,50 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "job")
+public class Job {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+ @Column(name = "companyId")
+ private Integer companyId;
+
+ @Column(name = "jobTitle", length = 256)
+ private String jobTitle;
+ @Column(name = "jobTitle", length = 3000)
+ private String discription;
+ @Column(name = "endTime")
+ @Temporal(value = TemporalType.TIMESTAMP)
+ private String endTime;
+ @Column(name = "author", length = 256)
+ private String author;
+
+ @OneToMany(mappedBy = "application")
+ private List applications;
+
+ @OneToMany(mappedBy = "bookmark")
+ private List bookmarks;
+
+ @OneToMany(mappedBy = "voting")
+ private List votings;
+
+ @OneToMany(mappedBy = "jobfield")
+ private List jobfields;
+
+ @OneToMany(mappedBy = "jobtype")
+ private List jobtypes;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/JobField.java b/src/main/java/com/aa/awesomecareer/entity/JobField.java
new file mode 100644
index 0000000..a2f1fb5
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/JobField.java
@@ -0,0 +1,33 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "jobfield")
+public class JobField {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "jobId")
+ private Integer jobId;
+ @Column(name = "fieldId")
+ private Integer fieldId;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Job job;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Field field;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/JobType.java b/src/main/java/com/aa/awesomecareer/entity/JobType.java
new file mode 100644
index 0000000..273769f
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/JobType.java
@@ -0,0 +1,31 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "jobtype")
+public class JobType {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "name")
+ private String name;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Job job;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Type type;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Language.java b/src/main/java/com/aa/awesomecareer/entity/Language.java
new file mode 100644
index 0000000..c76663c
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Language.java
@@ -0,0 +1,32 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "language")
+public class Language {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "language",length = 256)
+ private String language;
+ @Column(name = "proficiency",length = 256)
+ private String proficiency;
+ @Column(name = "userId")
+ private Integer userId;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Member.java b/src/main/java/com/aa/awesomecareer/entity/Member.java
new file mode 100644
index 0000000..5de99b1
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Member.java
@@ -0,0 +1,23 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "member")
+public class Member {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "companyId")
+ private Integer companyId;
+ @Column(name = "userId")
+ private Integer userId;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/ProfileInfo.java b/src/main/java/com/aa/awesomecareer/entity/ProfileInfo.java
new file mode 100644
index 0000000..7c587c6
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/ProfileInfo.java
@@ -0,0 +1,31 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "profileinfo")
+public class ProfileInfo {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "currentOccupation",length = 256)
+ private String currentOccupation;
+ @Column(name = "location",length = 256)
+ private String location;
+ @Column(name = "tagName",length = 256)
+ private String tagName;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Project.java b/src/main/java/com/aa/awesomecareer/entity/Project.java
new file mode 100644
index 0000000..1f34140
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Project.java
@@ -0,0 +1,41 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "project")
+public class Project {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "name",length = 256)
+ private String title;
+ @Column(name = "name",length = 256)
+ private String link;
+ @Column(name = "startDate")
+ @Temporal(value = TemporalType.TIMESTAMP)
+ private Date startDate;
+ @Column(name = "endDate")
+ @Temporal(value = TemporalType.TIMESTAMP)
+ private Date endDate;
+ @Column(name = "name",length = 3000)
+ private String description;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private User user;
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Story.java b/src/main/java/com/aa/awesomecareer/entity/Story.java
new file mode 100644
index 0000000..a4dff4f
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Story.java
@@ -0,0 +1,35 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "story")
+public class Story {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "userId")
+ private Integer userId;
+ @Column(name = "content",length = 256)
+ private String content;
+ @Column(name = "image",length = 256)
+ private String image;
+
+ @OneToMany(mappedBy = "favorite")
+ private List favorites;
+
+ @OneToMany(mappedBy = "storyhastag")
+ private List storyHashtags;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/StoryHashtag.java b/src/main/java/com/aa/awesomecareer/entity/StoryHashtag.java
new file mode 100644
index 0000000..dbb230c
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/StoryHashtag.java
@@ -0,0 +1,34 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "storyhashtag")
+public class StoryHashtag {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "storyId")
+ private Integer storyId;
+ @Column(name = "hashtagId")
+ private Integer hashtagId;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Story story;
+
+ @ManyToOne
+ @JoinColumn(name = "id")
+ private Hashtag hashtag;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Type.java b/src/main/java/com/aa/awesomecareer/entity/Type.java
new file mode 100644
index 0000000..1be23cf
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Type.java
@@ -0,0 +1,27 @@
+package com.aa.awesomecareer.entity;
+
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "type")
+public class Type {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "jobTypeId")
+ private Integer jobTypeId;
+
+ @OneToMany(mappedBy = "jobtype")
+ private List jobtypes;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/entity/User.java b/src/main/java/com/aa/awesomecareer/entity/User.java
index 5967810..71f6792 100644
--- a/src/main/java/com/aa/awesomecareer/entity/User.java
+++ b/src/main/java/com/aa/awesomecareer/entity/User.java
@@ -1,212 +1,122 @@
package com.aa.awesomecareer.entity;
-import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
@SuppressWarnings("serial")
@Entity
@Table(name = "user")
-public class User extends BaseEntity implements Serializable {
-
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class User {
@Id
- @GeneratedValue
- @Column(name = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
- @Column(name = "name", length = 256)
- private String name;
- @Column(name = "email", unique = true, length = 256)
+
+ @Column(name = "fullName",length = 256)
+ private String fullName;
+
+ @Column(name = "email",unique=true, length = 256)
private String email;
- @Column(name = "password", length = 256)
+
+ @Column(name = "password",length = 256)
private String password;
- @Column(name = "series", length = 256)
- private String series;
- @Column(name = "token", length = 256)
- private String token;
- @Column(name = "last_used")
- @Temporal(value = TemporalType.TIMESTAMP)
- private Date lastUsed;
- @Column(name = "role")
- private Integer role;
- @Column(name = "activation_digest", length = 256)
- private String activationDigest;
- @Column(name = "activated")
- private Integer activated;
- @Column(name = "activated_at")
+
+ @Column(name = "company",length = 256)
+ private String company;
+
+ @Column(name = "occupationInterest",length = 256)
+ private String occupationInterest;
+
+ @Column(name = "country",length = 256)
+ private String country;
+
+
+ @Column(name = "userName",length = 256)
+ private String userName;
+
+ @Column(name = "seftIntroduction",length = 3000)
+ private String seftIntroduction;
+
+ @Column(name = "ambition",length = 3000)
+ private String ambition;
+
+ @Column(name = "links",length = 256)
+ private String links;
+
+ @Column(name = "goodAt",length = 3000)
+ private String goodAt;
+
+ @Column(name = "resume",length = 3000)
+ private String resume;
+
+ @Column(name = "interest",length = 3000)
+ private String interest;
+
+ @Column(name = "gender",length = 256)
+ private String gender;
+
+ @Column(name = "birthday")
@Temporal(value = TemporalType.TIMESTAMP)
- private Date activatedAt;
- @Column(name = "provider")
- @Enumerated(EnumType.STRING)
- private AuthProvider provider;
- @Column(name = "provider_id", length = 256)
- private String providerId;
- @Column(name = "reset_digest", length = 256)
- private String resetDigest;
- @Column(name = "reset_sent_at")
- @Temporal(value = TemporalType.TIMESTAMP)
- private Date resetSentAt;
-
- public User() {
-
- }
-
- public User(Integer id) {
- this.id = id;
- }
-
- public User(String email, String password) {
- this.email = email;
- this.password = password;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getSeries() {
- return series;
- }
-
- public void setSeries(String series) {
- this.series = series;
- }
-
- public String getToken() {
- return token;
- }
-
- public void setToken(String token) {
- this.token = token;
- }
-
- public Date getLastUsed() {
- return lastUsed;
- }
-
- public void setLastUsed(Date lastUsed) {
- this.lastUsed = lastUsed;
- }
-
- public Integer getRole() {
- return role;
- }
-
- public List getRoles() {
- return Role.toList(role);
- }
-
- public void setRole(Integer role) {
- this.role = role;
- }
-
- public void setRoles(List roles) {
- this.role = Role.toValue(roles);
- }
-
- public String getActivationDigest() {
- return activationDigest;
- }
-
- public void setActivationDigest(String activationDigest) {
- this.activationDigest = activationDigest;
- }
-
- public Integer getActivated() {
- return activated;
- }
-
- public boolean activated() {
- return activated == Activation.ACTIVATED.value;
- }
-
- public void setActivated(Integer activated) {
- this.activated = activated;
- }
-
- public void activate() {
- this.activated = Activation.ACTIVATED.value;
- }
-
- public void unactivate() {
- this.activated = Activation.UNACTIVATED.value;
- }
-
- public Date getActivatedAt() {
- return activatedAt;
- }
-
- public void setActivatedAt(Date activatedAt) {
- this.activatedAt = activatedAt;
- }
-
- public String getResetDigest() {
- return resetDigest;
- }
-
- public void setResetDigest(String resetDigest) {
- this.resetDigest = resetDigest;
- }
-
- public Date getResetSentAt() {
- return resetSentAt;
- }
-
- public void setResetSentAt(Date resetSentAt) {
- this.resetSentAt = resetSentAt;
- }
-
- public AuthProvider getProvider() {
- return provider;
- }
-
- public void setProvider(AuthProvider provider) {
- this.provider = provider;
- }
-
- public String getProviderId() {
- return providerId;
- }
-
- public void setProviderId(String providerId) {
- this.providerId = providerId;
- }
+ private Date birthday;
+
+ @Column(name = "relationshipStatus",length = 256)
+ private String relationshipStatus;
+
+ @Column(name = "amAParent")
+ private boolean amAParent;
+
+ @Column(name = "image")
+ private String image;
+
+ @OneToMany(mappedBy = "application")
+ private List applications;
+
+ @OneToMany(mappedBy = "bookmark")
+ private List bookmarks;
+
+ @OneToMany(mappedBy = "favorite")
+ private List favorites;
+
+ @OneToMany(mappedBy = "voting")
+ private List votings;
+
+ @OneToMany(mappedBy = "follow")
+ private List follows;
+
+ @OneToMany(mappedBy = "interest")
+ private List interests;
+
+ @OneToMany(mappedBy = "language")
+ private List languages;
+
+ @OneToMany(mappedBy = "certificate")
+ private List certificates;
+
+ @OneToMany(mappedBy = "education")
+ private List educations;
+
+ @OneToMany(mappedBy = "project")
+ private List projects;
+
+ @OneToMany(mappedBy = "projectinfo")
+ private List profileInfos;
}
diff --git a/src/main/java/com/aa/awesomecareer/entity/Voting.java b/src/main/java/com/aa/awesomecareer/entity/Voting.java
new file mode 100644
index 0000000..bcc1791
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/entity/Voting.java
@@ -0,0 +1,27 @@
+package com.aa.awesomecareer.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@SuppressWarnings("serial")
+@Entity
+@Table(name = "voting")
+public class Voting {
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Integer id;
+
+ @Column(name = "userId")
+ private Integer userId;
+ @Column(name = "jobId")
+ private Integer jobId;
+ @Column(name = "score")
+ private Integer score;
+
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/ApplicationModel.java b/src/main/java/com/aa/awesomecareer/model/ApplicationModel.java
new file mode 100644
index 0000000..414c334
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/ApplicationModel.java
@@ -0,0 +1,18 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class ApplicationModel {
+
+ private Integer id;
+ private Integer userId;
+ private Integer jobId;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/BookmarkModel.java b/src/main/java/com/aa/awesomecareer/model/BookmarkModel.java
new file mode 100644
index 0000000..fe45233
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/BookmarkModel.java
@@ -0,0 +1,18 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class BookmarkModel {
+
+ private Integer id;
+ private Integer userId;
+ private Integer jobId;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/CertificateModel.java b/src/main/java/com/aa/awesomecareer/model/CertificateModel.java
new file mode 100644
index 0000000..02ace82
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/CertificateModel.java
@@ -0,0 +1,22 @@
+package com.aa.awesomecareer.model;
+
+import java.util.Date;
+
+import com.aa.awesomecareer.entity.User;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class CertificateModel {
+ private Integer id;
+ private Integer userId;
+ private String title;
+ private Date issuedTime;
+ private User user;
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/CompanyModel.java b/src/main/java/com/aa/awesomecareer/model/CompanyModel.java
new file mode 100644
index 0000000..8d4e0e8
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/CompanyModel.java
@@ -0,0 +1,27 @@
+package com.aa.awesomecareer.model;
+
+import java.util.List;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class CompanyModel {
+ private Integer id;
+ private String name;
+ private String address;
+ private String website;
+ private String foundedTime;
+ private String foundedBy;
+ private Integer memberTotal;
+ private String image;
+ List jobModels;
+ List followModels;
+ List memberModels;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/EducationModel.java b/src/main/java/com/aa/awesomecareer/model/EducationModel.java
new file mode 100644
index 0000000..b27e266
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/EducationModel.java
@@ -0,0 +1,22 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class EducationModel {
+
+ private Integer id;
+ private Integer userId;
+ private String school;
+ private String major;
+ private String description;
+ private String graduation;
+ private UserModel userModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/ExperienceModel.java b/src/main/java/com/aa/awesomecareer/model/ExperienceModel.java
new file mode 100644
index 0000000..2cdf45e
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/ExperienceModel.java
@@ -0,0 +1,21 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class ExperienceModel {
+ private Integer id;
+ private String companyName;
+ private String jobTitle;
+ private String startName;
+ private String endTime;
+ private String description;
+ private UserModel userModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/FavoriteModel.java b/src/main/java/com/aa/awesomecareer/model/FavoriteModel.java
new file mode 100644
index 0000000..993e1d3
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/FavoriteModel.java
@@ -0,0 +1,19 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class FavoriteModel {
+ private Integer id;
+ private Integer userId;
+ private Integer storyId;
+ private UserModel userModel;
+ private StoryModel storyModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/FieldModel.java b/src/main/java/com/aa/awesomecareer/model/FieldModel.java
new file mode 100644
index 0000000..52d1c9d
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/FieldModel.java
@@ -0,0 +1,20 @@
+package com.aa.awesomecareer.model;
+
+import java.util.List;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class FieldModel {
+
+ private Integer id;
+ private String name;
+ List jobFieldModels;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/FollowModel.java b/src/main/java/com/aa/awesomecareer/model/FollowModel.java
new file mode 100644
index 0000000..4f6f595
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/FollowModel.java
@@ -0,0 +1,21 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class FollowModel {
+
+ private Integer id;
+ private Integer userId;
+ private Integer companyId;
+
+ private UserModel userModel;
+ private CompanyModel companyModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/HashtagModel.java b/src/main/java/com/aa/awesomecareer/model/HashtagModel.java
new file mode 100644
index 0000000..4f99b18
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/HashtagModel.java
@@ -0,0 +1,20 @@
+package com.aa.awesomecareer.model;
+
+import java.util.List;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class HashtagModel {
+
+ private Integer id;
+ private String name;
+
+ List storyHashtagModels;
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/InterestModel.java b/src/main/java/com/aa/awesomecareer/model/InterestModel.java
new file mode 100644
index 0000000..a1bdded
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/InterestModel.java
@@ -0,0 +1,20 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class InterestModel {
+
+ private Integer id;
+ private Integer userId;
+ private String name;
+
+ private UserModel userModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/JobFieldModel.java b/src/main/java/com/aa/awesomecareer/model/JobFieldModel.java
new file mode 100644
index 0000000..2ac75ac
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/JobFieldModel.java
@@ -0,0 +1,20 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class JobFieldModel {
+ private Integer id;
+ private Integer jobId;
+ private Integer fieldId;
+
+ private JobModel jobModel;
+ private FieldModel fieldModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/JobModel.java b/src/main/java/com/aa/awesomecareer/model/JobModel.java
new file mode 100644
index 0000000..5a712f3
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/JobModel.java
@@ -0,0 +1,31 @@
+package com.aa.awesomecareer.model;
+
+import java.util.List;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class JobModel {
+
+ private Integer id;
+ private Integer companyId;
+ private String jobTitle;
+ private String discription;
+ private String endTime;
+ private String author;
+
+ private CompanyModel companyModel;
+ private List applicationModels;
+ private List bookmarkModels;
+ private List votingModels;
+ private List typeModels;
+ private List jobTypeModels;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/JobTypeModel.java b/src/main/java/com/aa/awesomecareer/model/JobTypeModel.java
new file mode 100644
index 0000000..00cea5a
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/JobTypeModel.java
@@ -0,0 +1,20 @@
+package com.aa.awesomecareer.model;
+
+import java.util.List;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class JobTypeModel {
+
+ private Integer id;
+ private String name;
+
+ List typeModels;
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/LanguageModel.java b/src/main/java/com/aa/awesomecareer/model/LanguageModel.java
new file mode 100644
index 0000000..a18d372
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/LanguageModel.java
@@ -0,0 +1,21 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class LanguageModel {
+
+ private Integer id;
+ private String language;
+ private String proficiency;
+ private Integer userId;
+
+ private UserModel userModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/MemberModel.java b/src/main/java/com/aa/awesomecareer/model/MemberModel.java
new file mode 100644
index 0000000..bf37115
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/MemberModel.java
@@ -0,0 +1,22 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class MemberModel {
+
+ private Integer id;
+ private Integer companyId;
+ private Integer userId;
+
+ private UserModel userModel;
+ private CompanyModel companyModel;
+
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/ProfileInfoModel.java b/src/main/java/com/aa/awesomecareer/model/ProfileInfoModel.java
new file mode 100644
index 0000000..01a0353
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/ProfileInfoModel.java
@@ -0,0 +1,21 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class ProfileInfoModel {
+
+ private Integer id;
+ private String currentOccupation;
+ private String location;
+ private String tagName;
+
+ private UserModel userModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/ProjectModel.java b/src/main/java/com/aa/awesomecareer/model/ProjectModel.java
new file mode 100644
index 0000000..00fdd78
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/ProjectModel.java
@@ -0,0 +1,23 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class ProjectModel {
+
+ private Integer id;
+ private String title;
+ private String link;
+ private String startDate;
+ private String endDate;
+ private String description;
+
+ private UserModel useModelr;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/StoryHashtagModel.java b/src/main/java/com/aa/awesomecareer/model/StoryHashtagModel.java
new file mode 100644
index 0000000..f9f1817
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/StoryHashtagModel.java
@@ -0,0 +1,21 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class StoryHashtagModel {
+
+ private Integer id;
+ private Integer storyId;
+ private Integer hashtagId;
+
+ private StoryModel storyModel;
+ private HashtagModel hashtagModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/StoryModel.java b/src/main/java/com/aa/awesomecareer/model/StoryModel.java
new file mode 100644
index 0000000..cfd137a
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/StoryModel.java
@@ -0,0 +1,23 @@
+package com.aa.awesomecareer.model;
+
+import java.util.List;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class StoryModel {
+ private Integer id;
+ private Integer userId;
+ private String content;
+ private String image;
+
+ private UserModel userModel;
+ List favoriteModels;
+ List storyHashtagModels;
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/TypeModel.java b/src/main/java/com/aa/awesomecareer/model/TypeModel.java
new file mode 100644
index 0000000..797dbad
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/TypeModel.java
@@ -0,0 +1,21 @@
+package com.aa.awesomecareer.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class TypeModel {
+
+ private Integer id;
+ private Integer jobId;
+ private Integer jobTypeId;
+
+ private JobModel jobModel;
+ private JobTypeModel jobTypeModel;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/model/UserModel.java b/src/main/java/com/aa/awesomecareer/model/UserModel.java
index 932e808..46ee6e2 100644
--- a/src/main/java/com/aa/awesomecareer/model/UserModel.java
+++ b/src/main/java/com/aa/awesomecareer/model/UserModel.java
@@ -2,222 +2,93 @@
import java.util.Calendar;
import java.util.Date;
-
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.aa.awesomecareer.entity.Activation;
+import com.aa.awesomecareer.entity.Application;
import com.aa.awesomecareer.entity.AuthProvider;
+import com.aa.awesomecareer.entity.Bookmark;
+import com.aa.awesomecareer.entity.Certificate;
+import com.aa.awesomecareer.entity.Education;
+import com.aa.awesomecareer.entity.Favorite;
+import com.aa.awesomecareer.entity.Follow;
+import com.aa.awesomecareer.entity.Interest;
+import com.aa.awesomecareer.entity.Language;
+import com.aa.awesomecareer.entity.ProfileInfo;
+import com.aa.awesomecareer.entity.Project;
+import com.aa.awesomecareer.entity.Voting;
import com.aa.awesomecareer.util.validator.FieldMatch;
import com.aa.awesomecareer.util.validator.NullOrNotBlank;
import com.aa.awesomecareer.util.validator.UniqueEmail;
-@SuppressWarnings("serial")
-@FieldMatch.List({
- @FieldMatch(first = "password", second = "confirmation", message = "{user.validation.password.notmatch}") })
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
@UniqueEmail(name = "email", message = "{user.validation.email.exist}")
+@FieldMatch(first = "password", second = "confirmation", message = "{user.validation.password.notmatch}")
public class UserModel extends BaseModel {
+
private Integer id;
- @NotEmpty(message = "{user.validation.name.required}")
- @Size(max = 64, message = "{user.validation.name.max}")
- private String name;
- @NotEmpty(message = "{user.validation.email.required}")
- @Email(message = "{pattern.email}")
+ @NotNull
+ @NotEmpty
+ private String fullName;
+ @NotNull
+ @NotEmpty
private String email;
- @NullOrNotBlank(message = "{user.validation.password.required}")
- @Size(max = 64, min = 6, message = "{user.validation.password.length}")
- private String password = null;
- @NullOrNotBlank(message = "{user.validation.confirmation.required}")
- private String confirmation = null;
-
- private int role;
- private String activationDigest;
- private Integer activated;
- private Date activatedAt;
- private String resetDigest;
- private Date resetSentAt;
- private AuthProvider provider;
- private String providerId;
-
- private int totalMicropost = 0;
- private boolean followedByCurrentUser = false;
- private int totalFollowing = 0;
- private int totalFollowers = 0;
- private Integer currentUserId = null;
-
- public UserModel() {
-
- }
-
- public UserModel(Integer id) {
- this.id = id;
- }
-
- public UserModel(String name, String email) {
- super();
- this.name = name;
- this.email = email;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getConfirmation() {
- return confirmation;
- }
-
- public void setConfirmation(String confirmation) {
- this.confirmation = confirmation;
- }
-
- public int getRole() {
- return role;
- }
-
- public void setRole(int role) {
- this.role = role;
- }
-
- public String getActivationDigest() {
- return activationDigest;
- }
-
- public void setActivationDigest(String activationDigest) {
- this.activationDigest = activationDigest;
- }
-
- public boolean activated() {
- return activated == Activation.ACTIVATED.value;
- }
-
- public Integer getActivated() {
- return activated;
- }
-
- public void setActivated(Integer activated) {
- this.activated = activated;
- }
-
- public Date getActivatedAt() {
- return activatedAt;
- }
-
- public void setActivatedAt(Date activatedAt) {
- this.activatedAt = activatedAt;
- }
-
- public String getResetDigest() {
- return resetDigest;
- }
-
- public void setResetDigest(String resetDigest) {
- this.resetDigest = resetDigest;
- }
-
- public Date getResetSentAt() {
- return resetSentAt;
- }
-
- public void setResetSentAt(Date resetSentAt) {
- this.resetSentAt = resetSentAt;
- }
-
- public AuthProvider getProvider() {
- return provider;
- }
-
- public void setProvider(AuthProvider provider) {
- this.provider = provider;
- }
-
- public String getProviderId() {
- return providerId;
- }
-
- public void setProviderId(String providerId) {
- this.providerId = providerId;
- }
-
- public int getTotalMicropost() {
- return totalMicropost;
- }
-
- public void setTotalMicropost(int totalMicropost) {
- this.totalMicropost = totalMicropost;
- }
-
- public boolean isCurrentUser(UserModel userModel) {
- return userModel != null && this.getId() == userModel.getId();
- }
-
- public void setFollowedByCurrentUser(boolean followedByCurrentUser) {
- this.followedByCurrentUser = followedByCurrentUser;
- }
-
- public boolean isFollowedByCurrentUser() {
- return followedByCurrentUser;
- }
-
- public int getTotalFollowing() {
- return totalFollowing;
- }
-
- public void setTotalFollowing(int totalFollowing) {
- this.totalFollowing = totalFollowing;
- }
-
- public int getTotalFollowers() {
- return totalFollowers;
- }
-
- public void setTotalFollowers(int totalFollowers) {
- this.totalFollowers = totalFollowers;
- }
-
- public Integer getCurrentUserId() {
- return currentUserId;
- }
-
- public void setCurrentUserId(Integer currentUserId) {
- this.currentUserId = currentUserId;
- }
-
- public boolean isPasswordResetExpired(Date resetSentAt) {
- final Calendar cal = Calendar.getInstance();
- if ((cal.getTime().getTime() - resetSentAt.getTime()) <= 0) {
- return false;
- }
- return true;
- }
+ @NotNull
+ @NotEmpty
+ private String password;
+ @NotNull
+ @NotEmpty
+ private String company;
+ @NotNull
+ @NotEmpty
+ private String occupationInterest;
+ @NotNull
+ @NotEmpty
+ private String country;
+
+ private String userName;
+ private String seftIntroduction;
+ private String ambition;
+ private String links;
+ private String goodAt;
+ private String resume;
+ private String interest;
+ private String gender;
+ private Date birthday;
+ private String relationshipStatus;
+ private boolean amAParent;
+ private String image;
+
+ private List applicationModels;
+ private List bookmarkModels;
+ private List favoriteModels;
+ private List votingModels;
+ private List followModels;
+ private List interestModels;
+ private List languageModels;
+ private List certificateModels;
+ private List educationModels;
+ private List projectModels;
+ private List profileInfoModels;
}
diff --git a/src/main/java/com/aa/awesomecareer/model/VotingModel.java b/src/main/java/com/aa/awesomecareer/model/VotingModel.java
new file mode 100644
index 0000000..07ba08c
--- /dev/null
+++ b/src/main/java/com/aa/awesomecareer/model/VotingModel.java
@@ -0,0 +1,9 @@
+package com.aa.awesomecareer.model;
+
+public class VotingModel {
+ private Integer id;
+ private Integer userId;
+ private Integer jobId;
+ private Integer score;
+
+}
diff --git a/src/main/java/com/aa/awesomecareer/service/UserService.java b/src/main/java/com/aa/awesomecareer/service/UserService.java
index f7d30a7..e3169fd 100644
--- a/src/main/java/com/aa/awesomecareer/service/UserService.java
+++ b/src/main/java/com/aa/awesomecareer/service/UserService.java
@@ -2,10 +2,12 @@
import java.util.List;
+import com.aa.awesomecareer.entity.User;
import com.aa.awesomecareer.model.UserModel;
public interface UserService {
public List findAll();
-
public UserModel findByEmail(String email);
+ UserModel addUser(UserModel userModel);
+
}
diff --git a/src/main/java/com/aa/awesomecareer/service/impl/UserServiceImp.java b/src/main/java/com/aa/awesomecareer/service/impl/UserServiceImp.java
index 3bd3363..4dd9946 100644
--- a/src/main/java/com/aa/awesomecareer/service/impl/UserServiceImp.java
+++ b/src/main/java/com/aa/awesomecareer/service/impl/UserServiceImp.java
@@ -3,6 +3,8 @@
import java.util.List;
import java.util.stream.Collectors;
+import javax.transaction.Transactional;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
@@ -55,4 +57,27 @@ public UserModel findByEmail(String email) {
return null;
}
+ @Transactional
+ @Override
+ public UserModel addUser(UserModel userModel) {
+ if(emailExists(userModel.getEmail())) {
+ logger.info("There is an account with that email address" +userModel.getEmail());
+ }
+ User condition = new User();
+ condition.setFullName(userModel.getFullName());
+ condition.setEmail(userModel.getEmail());
+ condition.setPassword(userModel.getPassword());
+ condition.setCompany(userModel.getCompany());
+ condition.setOccupationInterest(userModel.getOccupationInterest());
+ condition.setCountry(userModel.getCountry());
+ User user= userRepository.save(condition);
+ userModel = new UserModel();
+ BeanUtils.copyProperties(user, userModel);
+
+ return userModel;
+ }
+ private boolean emailExists(String email) {
+ return userRepository.findByEmail(email) !=null;
+ }
+
}