6399 PR comments

This commit is contained in:
Ethan Roseman 2020-06-03 10:52:08 -04:00
parent a456905d2d
commit 26a7fb22fd
5 changed files with 12 additions and 15 deletions

View File

@ -284,7 +284,7 @@ public class Persona {
}
/**
* Removes the given account from this persona
* Removes the given PersonaAccount (persona/account association)
*
* @param account account to remove
*
@ -292,7 +292,7 @@ public class Persona {
* Personas table.
*/
public void removeAccount(PersonaAccount account) throws CentralRepoException {
PersonaAccount.removePersonaAccount(this, account.getId());
PersonaAccount.removePersonaAccount(account.getId());
}
/**
@ -400,7 +400,7 @@ public class Persona {
}
/**
* Removes the given alias from this persona
* Removes the given alias
*
* @param alias alias to remove
*
@ -408,7 +408,7 @@ public class Persona {
* Personas table.
*/
public void removeAlias(PersonaAlias alias) throws CentralRepoException {
PersonaAlias.removePersonaAlias(this, alias);
PersonaAlias.removePersonaAlias(alias);
}
/**
@ -446,7 +446,7 @@ public class Persona {
* Personas table.
*/
public void removeMetadata(PersonaMetadata metadata) throws CentralRepoException {
PersonaMetadata.removePersonaMetadata(this, metadata);
PersonaMetadata.removePersonaMetadata(metadata);
}
/**

View File

@ -291,15 +291,14 @@ public class PersonaAccount {
}
/**
* Removes an account from the specified Persona.
* Removes the PersonaAccount row by the given id
*
* @param persona Persona for which the account is being removed.
* @param id row id for the account to be removed
*
* @throws CentralRepoException If there is an error in removing the
* account.
*/
static void removePersonaAccount(Persona persona, long id) throws CentralRepoException {
static void removePersonaAccount(long id) throws CentralRepoException {
String deleteClause = " DELETE FROM persona_accounts WHERE id = " + id;
CentralRepository.getInstance().executeDeleteSQL(deleteClause);
}

View File

@ -133,14 +133,13 @@ public class PersonaAlias {
}
/**
* Removes an alias from the specified Persona.
* Removes a PersonaAlias.
*
* @param persona Persona for which the alias is being removed.
* @param alias Alias to remove.
*
* @throws CentralRepoException If there is an error in removing the alias.
*/
static void removePersonaAlias(Persona persona, PersonaAlias alias) throws CentralRepoException {
static void removePersonaAlias(PersonaAlias alias) throws CentralRepoException {
String deleteClause = " DELETE FROM persona_alias WHERE id = " + alias.getId();
CentralRepository.getInstance().executeDeleteSQL(deleteClause);
}

View File

@ -144,14 +144,13 @@ public class PersonaMetadata {
}
/**
* Removes a metadata from the specified Persona.
* Removes the given PersonaMetadata
*
* @param persona Persona for which the metadata is being removed.
* @param metadata Metadata to remove.
*
* @throws CentralRepoException If there is an error in removing the metadata.
*/
static void removePersonaMetadata(Persona persona, PersonaMetadata metadata) throws CentralRepoException {
static void removePersonaMetadata(PersonaMetadata metadata) throws CentralRepoException {
String deleteClause = " DELETE FROM persona_metadata WHERE id = " + metadata.getId();
CentralRepository.getInstance().executeDeleteSQL(deleteClause);
}

View File

@ -721,7 +721,7 @@ public final class PersonaDetailsPanel extends javax.swing.JPanel {
"PersonaDetailsPanel_EmptyName_msg=Persona name cannot be empty",
"PersonaDetailsPanel_EmptyName_Title=Empty persona name",})
Persona okHandler() {
if (accountsToAdd.size() + currentAccounts.size() < 2) {
if (accountsToAdd.size() + currentAccounts.size() < 1) {
JOptionPane.showMessageDialog(this,
Bundle.PersonaDetailsPanel_NotEnoughAccounts_msg(),
Bundle.PersonaDetailsPanel_NotEnoughAccounts_Title(),