public Element getElementByName(String elementName)
throws ValidationLayerException {
Connection conn = null;
Statement statement = null;
ResultSet rs = null;
Element element = null;
try {
conn = dataSource.getConnection();
statement = conn.createStatement();
String elementSql = "SELECT * from elements WHERE element_name = "
+ elementName;
LOG.log(Level.FINE, "getElementByName: Executing: " + elementSql);
rs = statement.executeQuery(elementSql);
while (rs.next()) {
element = DbStructFactory.getElement(rs);
LOG.log(Level.FINE, "getElementByName: adding element: "
+ element.getElementName());
}
} catch (Exception e) {
e.printStackTrace();
LOG.log(Level.WARNING, "Exception reading element. Message: "