* Treiber, Host, User und Passwort, ueber den der Zugriff auf die
* Datenbank erfolgt.
*
- * @version $Id: Database.java,v 1.44.2.4 2003/06/23 15:24:06 zapata Exp $
+ * @version $Id: Database.java,v 1.44.2.5 2003/06/27 02:43:42 zapata Exp $
* @author rk
*
*/
private String database_driver;
private String database_url;
private int defaultLimit;
- protected DatabaseAdaptor theAdaptor;
+
TimeZone timezone;
SimpleDateFormat internalDateFormat;
SimpleDateFormat userInputDateFormat;
try {
theEntityClass = GENERIC_ENTITY_CLASS;
- theAdaptor = (DatabaseAdaptor) Class.forName(theAdaptorName).newInstance();
}
catch (Throwable e) {
logger.error("Error in Database() constructor with " + theAdaptorName + " -- " + e.getMessage());
selectSql.append(" order by ").append(anOrderByClause);
}
- if (theAdaptor.hasLimit()) {
- if ((limit > -1) && (offset > -1)) {
- selectSql.append(" LIMIT ").append(limit).append(" OFFSET ").append(offset);
- }
+ if ((limit > -1) && (offset > -1)) {
+ selectSql.append(" LIMIT ").append(limit).append(" OFFSET ").append(offset);
}
// execute sql
}
// making entitylist infos
- if (!(theAdaptor.hasLimit())) {
- count = offsetCount;
- }
+ count = offsetCount;
if (theReturnList != null) {
// now we decide if we have to know an overall count...
return null;
}
- pstmt = con.prepareStatement(theAdaptor.getLastInsertSQL(this));
+ pstmt = con.prepareStatement("select currval('" + getCoreTable() + "_id_seq')");
ResultSet rs = pstmt.executeQuery();
rs.next();