use of org.jboss.tools.hibernate.runtime.spi.ICfg2HbmTool in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateCfg2HbmTool.
@Test
public void testCreateCfg2HbmTool() {
Cfg2HbmTool cfg2HbmTool = new Cfg2HbmTool();
ICfg2HbmTool facade = facadeFactory.createCfg2HbmTool(cfg2HbmTool);
Assert.assertSame(cfg2HbmTool, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ICfg2HbmTool in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateCfg2HbmTool.
@Test
public void testCreateCfg2HbmTool() {
Cfg2HbmTool cfg2HbmTool = new Cfg2HbmTool();
ICfg2HbmTool facade = facadeFactory.createCfg2HbmTool(cfg2HbmTool);
Assert.assertSame(cfg2HbmTool, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ICfg2HbmTool in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateCfg2HbmTool.
@Test
public void testCreateCfg2HbmTool() {
Cfg2HbmTool cfg2HbmTool = new Cfg2HbmTool();
ICfg2HbmTool facade = facadeFactory.createCfg2HbmTool(cfg2HbmTool);
Assert.assertSame(cfg2HbmTool, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ICfg2HbmTool in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateCfg2HbmTool.
@Test
public void testCreateCfg2HbmTool() {
Cfg2HbmTool cfg2HbmTool = new Cfg2HbmTool();
ICfg2HbmTool facade = facadeFactory.createCfg2HbmTool(cfg2HbmTool);
Assert.assertSame(cfg2HbmTool, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ICfg2HbmTool in project jbosstools-hibernate by jbosstools.
the class OpenMappingUtils method generatePersistentClassPatterns.
/**
* Generates a persistent class xml tag search patterns.
*
* @param persClass
* @return an arrays of search patterns
*/
public static String[] generatePersistentClassPatterns(IPersistentClass persClass, IService service) {
String fullClassName = null;
String shortClassName = null;
if (persClass.getEntityName() != null) {
fullClassName = persClass.getEntityName();
} else {
fullClassName = persClass.getClassName();
}
shortClassName = getShortClassName(fullClassName);
final ICfg2HbmTool tool = service.newCfg2HbmTool();
final String tagName = tool.getTag(persClass);
persistentClassPairs[0][0] = tagName;
persistentClassPairs[1][0] = tagName;
List<String> patterns = new ArrayList<String>();
for (int i = 0; i < persistentClassPairs.length; i++) {
patterns.add(createPattern(persistentClassPairs[i][0], persistentClassPairs[i][1], shortClassName));
patterns.add(createPattern(persistentClassPairs[i][0], persistentClassPairs[i][1], fullClassName));
}
return patterns.toArray(new String[0]);
}
Aggregations