package org.mxchange.addressbook.facade.contact;
import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.text.MessageFormat;
import java.util.ArrayList;
}
@Override
- public void doChangeOwnData () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public void doChangeOwnData () {
// Trace message
this.getLogger().logTrace("CALLED!"); //NOI18N
}
@Override
- public void doEnterOwnData () throws ContactAlreadyAddedException, IOException {
+ public void doEnterOwnData () throws ContactAlreadyAddedException {
// Trace message
this.getLogger().logTrace("CALLED!"); //NOI18N
}
@Override
- public Object getValueFromRowColumn (final int rowIndex, final int columnIndex) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public Object getValueFromRowColumn (final int rowIndex, final int columnIndex) {
// Trace message
this.getLogger().logTrace(MessageFormat.format("rowIndex={0},columnIndex={1} CALLED!", rowIndex, columnIndex)); //NOI18N
- // Then get specific row from database which is a Contact instance
- Storable storable = this.getFrontend().getStorableAtRow(rowIndex);
-
- // Debug message
- this.getLogger().logDebug(MessageFormat.format("storable={0}", storable)); //NOI18N
-
- // It may return null
- if (null == storable) {
- // Nothing found
- this.getLogger().logWarning("contact is null - returning null ..."); //NOI18N
- return null;
- }
-
// Convert column index -> name
String columnName = this.getColumnName(columnIndex);
// Debug message
this.getLogger().logDebug(MessageFormat.format("columnName={0}", columnName)); //NOI18N
- // Now get that column
+ // Init value
Object value = null;
- try {
- value = storable.getValueFromColumn(columnName);
- } catch (final IllegalArgumentException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
- this.abortProgramWithException(ex);
- }
// Trace message
this.getLogger().logTrace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N
}
@Override
- public boolean isOwnContactAdded () throws IOException {
+ public boolean isOwnContactAdded () {
// Trace message
this.getLogger().logTrace("CALLED!"); //NOI18N
// Init variable
boolean isAdded = false;
- try {
- // Deligate this call to frontend
- isAdded = ((AddressbookContactFrontend) this.getFrontend()).isOwnContactFound();
- } catch (final SQLException | IOException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
- // Something bad happened
- this.abortProgramWithException(ex);
- }
-
// Trace message
this.getLogger().logTrace(MessageFormat.format("isAdded={0} : EXIT!", isAdded)); //NOI18N