use of org.hibernate.cfg.reveng.ReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newReverseEngineeringStrategy.
@Override
public IReverseEngineeringStrategy newReverseEngineeringStrategy(String strategyName, IReverseEngineeringStrategy delegate) {
assert delegate instanceof IFacade;
ReverseEngineeringStrategy delegateTarget = (ReverseEngineeringStrategy) ((IFacade) delegate).getTarget();
Object target = newReverseEngineeringStrategy(strategyName, delegateTarget);
return facadeFactory.createReverseEngineeringStrategy(target);
}
use of org.hibernate.cfg.reveng.ReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newReverseEngineeringStrategy.
@Override
public IReverseEngineeringStrategy newReverseEngineeringStrategy(String strategyName, IReverseEngineeringStrategy delegate) {
assert delegate instanceof IFacade;
ReverseEngineeringStrategy delegateTarget = (ReverseEngineeringStrategy) ((IFacade) delegate).getTarget();
Object target = newReverseEngineeringStrategy(strategyName, delegateTarget);
return facadeFactory.createReverseEngineeringStrategy(target);
}
use of org.hibernate.cfg.reveng.ReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newReverseEngineeringStrategy.
@Override
public IReverseEngineeringStrategy newReverseEngineeringStrategy(String strategyName, IReverseEngineeringStrategy delegate) {
assert delegate instanceof IFacade;
ReverseEngineeringStrategy delegateTarget = (ReverseEngineeringStrategy) ((IFacade) delegate).getTarget();
Object target = newReverseEngineeringStrategy(strategyName, delegateTarget);
return facadeFactory.createReverseEngineeringStrategy(target);
}
use of org.hibernate.cfg.reveng.ReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newReverseEngineeringStrategy.
@SuppressWarnings("unchecked")
private ReverseEngineeringStrategy newReverseEngineeringStrategy(final String className, ReverseEngineeringStrategy delegate) {
try {
Class<ReverseEngineeringStrategy> clazz = (Class<ReverseEngineeringStrategy>) ReflectHelper.classForName(className);
Constructor<ReverseEngineeringStrategy> constructor = clazz.getConstructor(new Class[] { ReverseEngineeringStrategy.class });
return constructor.newInstance(new Object[] { delegate });
} catch (NoSuchMethodException e) {
try {
Class<?> clazz = ReflectHelper.classForName(className);
ReverseEngineeringStrategy rev = (ReverseEngineeringStrategy) clazz.newInstance();
return rev;
} catch (Exception eq) {
throw new HibernateConsoleRuntimeException(eq);
}
} catch (Exception e) {
throw new HibernateConsoleRuntimeException(e);
}
}
use of org.hibernate.cfg.reveng.ReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newReverseEngineeringStrategy.
@SuppressWarnings("unchecked")
private ReverseEngineeringStrategy newReverseEngineeringStrategy(final String className, ReverseEngineeringStrategy delegate) {
try {
Class<ReverseEngineeringStrategy> clazz = (Class<ReverseEngineeringStrategy>) ReflectHelper.classForName(className);
Constructor<ReverseEngineeringStrategy> constructor = clazz.getConstructor(new Class[] { ReverseEngineeringStrategy.class });
return constructor.newInstance(new Object[] { delegate });
} catch (NoSuchMethodException e) {
try {
Class<?> clazz = ReflectHelper.classForName(className);
ReverseEngineeringStrategy rev = (ReverseEngineeringStrategy) clazz.newInstance();
return rev;
} catch (Exception eq) {
throw new HibernateException(eq);
}
} catch (Exception e) {
throw new HibernateException(e);
}
}
Aggregations