2 * Copyright (C) 2015 Roland Haeder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.addressbook.database.backend.mysql;
19 import java.io.IOException;
20 import java.util.Iterator;
21 import org.mxchange.addressbook.contact.Contact;
22 import org.mxchange.addressbook.database.backend.BaseDatabaseBackend;
23 import org.mxchange.addressbook.database.backend.DatabaseBackend;
24 import org.mxchange.addressbook.database.storage.Storeable;
25 import org.mxchange.addressbook.exceptions.BadTokenException;
26 import org.mxchange.addressbook.exceptions.UnsupportedDatabaseDriverException;
29 * A backend class for MySQL connections
31 * @author Roland Haeder
33 public class MySqlDatabaseBackend extends BaseDatabaseBackend implements DatabaseBackend {
35 * Constructor with table name
37 * @param tableName Table to access
38 * @throws org.mxchange.addressbook.exceptions.UnsupportedDatabaseDriverException
40 public MySqlDatabaseBackend (final String tableName) throws UnsupportedDatabaseDriverException {
42 this.validateDriver("mysql"); //NOI18N
44 // Now that the driver is there ...
48 public void connectToDatabase () {
49 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
53 public Iterator<Contact> contactIterator () throws BadTokenException {
54 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
58 public void doShutdown () {
59 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
63 public long length () {
64 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
68 public void rewind () {
69 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
73 public void store (final Storeable object) throws IOException {
74 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.