throws SQLException
{
if (list == null) throw new NullPointerException(MSG_UNSPECIFIED);
if (list.getID() != -1) throw new IllegalStateException(MSG_ALREADY_IN_DB);
StandardGuide guide = list.getParentGuide();
if (guide == null) throw new IllegalStateException(MSG_NO_GUIDE_ASSIGNED);
if (guide.getID() == -1) throw new IllegalStateException(MSG_GUIDE_TRANSIENT);
PreparedStatement stmt = context.getPreparedStatement(
"INSERT INTO READINGLISTS (GUIDEID, TITLE, URL, LASTPOLLTIME, LASTUPDATESERVERTIME," +
"LASTSYNCTIME)" +
" VALUES (?, ?, ?, ?, ?, ?)");
try
{
stmt.setLong(1, guide.getID());
stmt.setString(2, list.getTitle());
stmt.setString(3, list.getURL().toString());
stmt.setLong(4, list.getLastPollTime());
stmt.setLong(5, list.getLastUpdateServerTime());
stmt.setLong(6, list.getLastSyncTime());