use of org.hibernate.eclipse.console.model.ITableFilter in project jbosstools-hibernate by jbosstools.
the class DOMReverseEngineeringDefinition method removeAllTableFilters.
public void removeAllTableFilters() {
List list = getTableFiltersList();
for (java.util.Iterator it = list.iterator(); it.hasNext(); ) {
ITableFilter filter = (ITableFilter) it.next();
removeTableFilter(filter);
}
}
use of org.hibernate.eclipse.console.model.ITableFilter in project jbosstools-hibernate by jbosstools.
the class NewReverseEngineeringFileWizard method openContentStream.
private InputStream openContentStream() {
StringWriter sw = new StringWriter();
sw.write(// $NON-NLS-1$
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + // $NON-NLS-1$
"<!DOCTYPE hibernate-reverse-engineering PUBLIC \"-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN\" \"http://hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd\" >\r\n" + // $NON-NLS-1$
"\r\n" + // $NON-NLS-1$
"<hibernate-reverse-engineering>\r\n");
ITableFilter[] filters = tableFilterWizardPage.getTableFilters();
for (int i = 0; i < filters.length; i++) {
ITableFilter filter = filters[i];
// $NON-NLS-1$
sw.write(" <table-filter");
if (!".*".equals(filter.getMatchCatalog())) {
// $NON-NLS-1$
// $NON-NLS-1$//$NON-NLS-2$
sw.write(" match-catalog=\"" + filter.getMatchCatalog() + "\"");
}
if (!".*".equals(filter.getMatchSchema())) {
// $NON-NLS-1$
// $NON-NLS-1$ //$NON-NLS-2$
sw.write(" match-schema=\"" + filter.getMatchSchema() + "\"");
}
// $NON-NLS-1$//$NON-NLS-2$
sw.write(" match-name=\"" + filter.getMatchName() + "\"");
if (filter.getExclude().booleanValue()) {
// $NON-NLS-1$ //$NON-NLS-2$
sw.write(" exclude=\"" + filter.getExclude().booleanValue() + "\"");
}
// $NON-NLS-1$
sw.write("/>\r\n");
}
// $NON-NLS-1$
sw.write("</hibernate-reverse-engineering>");
try {
// $NON-NLS-1$
return new ByteArrayInputStream(sw.toString().getBytes("UTF-8"));
} catch (UnsupportedEncodingException uec) {
HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.NewReverseEngineeringFileWizard_problems_converting_to_utf8, uec);
return new ByteArrayInputStream(sw.toString().getBytes());
}
}
use of org.hibernate.eclipse.console.model.ITableFilter in project jbosstools-hibernate by jbosstools.
the class TableFilterLabelProvider method getColumnText.
public String getColumnText(Object element, int columnIndex) {
ITableFilter tf = (ITableFilter) element;
// $NON-NLS-1$
String result = "";
switch(columnIndex) {
case 0:
return result;
case 1:
return tf.getMatchCatalog();
case 2:
return tf.getMatchSchema();
case 3:
return tf.getMatchName();
default:
return result;
}
}
Aggregations