railo.runtime.orm.hibernate
Class HibernateORMEngine

java.lang.Object
  extended by railo.runtime.orm.hibernate.HibernateORMEngine
All Implemented Interfaces:
ORMEngine

public class HibernateORMEngine
extends Object
implements ORMEngine


Field Summary
 
Fields inherited from interface railo.runtime.orm.ORMEngine
MODE_LAZY, MODE_STRICT
 
Constructor Summary
HibernateORMEngine()
           
 
Method Summary
 String convertColumnName(String columnName)
           
 String convertTableName(String tableName)
           
 Component create(PageContext pc, HibernateORMSession session, String entityName, boolean unique)
           
 void createMapping(PageContext pc, Component cfc, DatasourceConnection dc, ORMConfiguration ormConf)
           
 ORMSession createSession(PageContext pc)
           
 ORMConfiguration getConfiguration(PageContext pc)
           
 DataSource getDataSource()
           
 Component getEntityByCFCName(String cfcName, boolean unique)
           
 Component getEntityByEntityName(String entityName, boolean unique)
           
 String[] getEntityNames()
           
 String getLabel()
           
 int getMode()
           
 org.hibernate.SessionFactory getSessionFactory(PageContext pc)
           
 Struct getTableInfo(DatasourceConnection dc, String tableName, ORMEngine engine)
           
static String id(String id)
           
 void init(PageContext pc)
           
 boolean reload(PageContext pc, boolean force)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateORMEngine

public HibernateORMEngine()
Method Detail

init

public void init(PageContext pc)
          throws PageException
Specified by:
init in interface ORMEngine
Throws:
PageException
See Also:
ORMEngine.init(railo.runtime.PageContext)

createSession

public ORMSession createSession(PageContext pc)
                         throws PageException
Specified by:
createSession in interface ORMEngine
Throws:
PageException
See Also:
railo.runtime.orm.ORMEngine#getSession(railo.runtime.PageContext)

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory(PageContext pc)
                                               throws PageException
Specified by:
getSessionFactory in interface ORMEngine
Throws:
PageException
See Also:
ORMEngine.getSessionFactory(railo.runtime.PageContext)

reload

public boolean reload(PageContext pc,
                      boolean force)
               throws PageException
Specified by:
reload in interface ORMEngine
Throws:
PageException

createMapping

public void createMapping(PageContext pc,
                          Component cfc,
                          DatasourceConnection dc,
                          ORMConfiguration ormConf)
                   throws PageException
Throws:
PageException

getMode

public int getMode()
Specified by:
getMode in interface ORMEngine
See Also:
ORMEngine.getMode()

getDataSource

public DataSource getDataSource()
Specified by:
getDataSource in interface ORMEngine

getLabel

public String getLabel()
Specified by:
getLabel in interface ORMEngine
Returns:
returns the label of the Engine, like "Hibernate" or "Transfer"
See Also:
ORMEngine.getLabel()

getTableInfo

public Struct getTableInfo(DatasourceConnection dc,
                           String tableName,
                           ORMEngine engine)
                    throws PageException
Throws:
PageException

getConfiguration

public ORMConfiguration getConfiguration(PageContext pc)
Specified by:
getConfiguration in interface ORMEngine
See Also:
ORMEngine.getConfiguration(railo.runtime.PageContext)

create

public Component create(PageContext pc,
                        HibernateORMSession session,
                        String entityName,
                        boolean unique)
                 throws PageException
Parameters:
pc -
session -
entityName - name of the entity to get
unique - create a unique version that can be manipulated
init - call the nit method of the cfc or not
Returns:
Throws:
PageException

id

public static String id(String id)

getEntityByCFCName

public Component getEntityByCFCName(String cfcName,
                                    boolean unique)
                             throws PageException
Throws:
PageException

getEntityByEntityName

public Component getEntityByEntityName(String entityName,
                                       boolean unique)
                                throws PageException
Throws:
PageException

getEntityNames

public String[] getEntityNames()
Specified by:
getEntityNames in interface ORMEngine

convertTableName

public String convertTableName(String tableName)

convertColumnName

public String convertColumnName(String columnName)


Copyright © 2012 Railo