Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Creative commons Attribution-NonCommercial license. http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
 
 package base.jee.api.sql;
 
import base.Query;
import static base.jee.api.sql.util.HasPersonRecord.hasPersonRecord;
public class HasPersonRecord extends Query<IntegerQueryResult> {
	private DataSource ds;
	public HasPersonRecord(DataSource ds) {
		this. = ds;
	}
	public HasPersonRecord() {
	}
		throw new IllegalArgumentException("HasPersonRecord may not be instantiated with parameter map");
	}
	public List<IntegerQueryResultexecute() throws IOException {
		List<IntegerQueryResultresults = new LinkedList<>();
		Connection c = null;
		try {
			c.setAutoCommit(false);
			int total = hasPersonRecord(c);
			results.add(new IntegerQueryResult(total));
			c.commit();
			c.close();
			c = null;
catch(SQLException e) {
			throw new IOException(e);
finally {
			if(c != null) {
				try { c.rollback(); } catch (SQLException e) { }
				try { c.close(); } catch (SQLException e) { }
			}
		}
		return results;
	}
		return "{" +
				"}";
	}
New to GrepCode? Check out our FAQ X