package org.jboss.windup.rules.apps.javaee.model;

import java.util.Map;

import org.jboss.windup.graph.MapInAdjacentProperties;
import org.jboss.windup.graph.model.WindupVertexFrame;

import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.frames.Adjacency;
import com.tinkerpop.frames.modules.typedgraph.TypeValue;

/**
 * Contains metadata related to Hibernate Session Factories.
 *
 * @author <a href="mailto:jesse.sightler@gmail.com">Jesse Sightler</a>
 *
 */
@TypeValue(HibernateSessionFactoryModel.TYPE)
public interface HibernateSessionFactoryModel extends WindupVertexFrame
{
    String TYPE = "HibernateSessionFactory";

    String DATASOURCE = "datasource";

    /**
     * Contains a link back to the {@link HibernateConfigurationFileModel} containing these properties
     */
    @Adjacency(label = HibernateConfigurationFileModel.HIBERNATE_SESSION_FACTORY, direction = Direction.IN)
    HibernateConfigurationFileModel getHibernateConfigurationFileModel();

    /**
     * Contains a link back to the {@link DataSourceModel}
     */
    @Adjacency(label = DATASOURCE, direction = Direction.OUT)
    public Iterable<DataSourceModel> getDataSources();

    /**
     * Contains a link back to the {@link DataSourceModel}
     */
    @Adjacency(label = DATASOURCE, direction = Direction.OUT)
    void addDataSource(DataSourceModel datasource);

    /**
     * Contains the hibernate session factories properties
     */
    @MapInAdjacentProperties(label = "sessionFactoryProperties")
    Map<String, String> getSessionFactoryProperties();

    /**
     * Contains the hibernate session factories properties
     */
    @MapInAdjacentProperties(label = "sessionFactoryProperties")
    void setSessionFactoryProperties(Map<String, String> map);
}

@@ -78,54 +78,327 @@
 ort 
-org.jboss.windup.graph.MapInAdjacentProperties
+com.tinkerpop.blueprints.Vertex;%0Aimport com.tinkerpop.frames.modules.javahandler.JavaHandler;%0Aimport com.tinkerpop.frames.modules.javahandler.JavaHandlerContext;%0Aimport org.jboss.windup.graph.MapInAdjacentProperties;%0Aimport org.jboss.windup.graph.model.BelongsToProject;%0Aimport org.jboss.windup.graph.model.ProjectModel
 ;%0Aim
@@ -856,16 +856,34 @@
 texFrame
+, BelongsToProject
 %0A%7B%0A    S
@@ -1979,24 +1979,24 @@
 roperties%22)%0A
-
     void set
@@ -2045,11 +2045,689 @@
 g%3E map);
+%0A%0A    @Override%0A    @JavaHandler%0A    boolean belongsToProject(ProjectModel projectModel);%0A%0A    @Override%0A    @JavaHandler%0A    Iterable%3CProjectModel%3E getRootProjectModels();%0A%0A    abstract class Impl implements HibernateSessionFactoryModel, BelongsToProject, JavaHandlerContext%3CVertex%3E%0A    %7B%0A        @Override%0A        public boolean belongsToProject(ProjectModel projectModel)%0A        %7B%0A            return this.getHibernateConfigurationFileModel().belongsToProject(projectModel);%0A        %7D%0A%0A        @Override%0A        public Iterable%3CProjectModel%3E getRootProjectModels()%0A        %7B%0A            return this.getHibernateConfigurationFileModel().getRootProjectModels();%0A        %7D%0A    %7D
 %0A%7D%0A

Add BelongsToProject to HibernateSessionFactoryModel