Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.shared

public Class DBMSConnectionProperties

extends Object
implements DatabaseConnectionProperties
Class Inheritance
All Implemented Interfaces
org.jabref.logic.shared.DatabaseConnectionProperties
Imports
java.util.Objects, .Optional, .Properties, org.jabref.logic.shared.prefs.SharedDatabasePreferences

Keeps all essential data for establishing a new connection to a DBMS using DBMSConnection.

Field Summary

Modifier and TypeField and Description
private boolean
private String
private boolean
private String
private String
private String
private int
private DBMSType
private String
private boolean

Constructor Summary

AccessConstructor and Description
public
DBMSConnectionProperties(SharedDatabasePreferences prefs)

Gets all required data from SharedDatabasePreferences and sets them if present.

pack-priv
DBMSConnectionProperties(DBMSType type, String host, int port, String database, String user, String password, boolean useSSL, boolean allowPublicKeyRetrieval, String jdbcUrl, boolean expertMode)

Method Summary

Modifier and TypeMethod and Description
public Properties

Returns:

Properties with values for user, password and ssl
asProperties
()

Returns username, password and ssl as Properties Object

public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Compares all properties except the password.

public String
public String
public String
public String
public int
public DBMSType
public String
public String
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

allowPublicKeyRetrievalback to summary
private boolean allowPublicKeyRetrieval
databaseback to summary
private String database
expertModeback to summary
private boolean expertMode
hostback to summary
private String host
jdbcUrlback to summary
private String jdbcUrl
passwordback to summary
private String password
portback to summary
private int port
typeback to summary
private DBMSType type
userback to summary
private String user
useSSLback to summary
private boolean useSSL

Constructor Detail

DBMSConnectionPropertiesback to summary
public DBMSConnectionProperties(SharedDatabasePreferences prefs)

Gets all required data from SharedDatabasePreferences and sets them if present.

DBMSConnectionPropertiesback to summary
pack-priv DBMSConnectionProperties(DBMSType type, String host, int port, String database, String user, String password, boolean useSSL, boolean allowPublicKeyRetrieval, String jdbcUrl, boolean expertMode)

Method Detail

asPropertiesback to summary
public Properties asProperties()

Returns username, password and ssl as Properties Object

Returns:Properties

Properties with values for user, password and ssl

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Compares all properties except the password.

Annotations
@Override
getDatabaseback to summary
public String getDatabase()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.getDatabase.

Annotations
@Override
getHostback to summary
public String getHost()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.getHost.

Annotations
@Override
getJdbcUrlback to summary
public String getJdbcUrl()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.getJdbcUrl.

Annotations
@Override
getPasswordback to summary
public String getPassword()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.getPassword.

Annotations
@Override
getPortback to summary
public int getPort()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.getPort.

Annotations
@Override
getTypeback to summary
public DBMSType getType()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.getType.

Annotations
@Override
getUrlback to summary
public String getUrl()
getUserback to summary
public String getUser()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.getUser.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
isAllowPublicKeyRetrievalback to summary
public boolean isAllowPublicKeyRetrieval()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.isAllowPublicKeyRetrieval.

Annotations
@Override
isUseExpertModeback to summary
public boolean isUseExpertMode()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.isUseExpertMode.

Annotations
@Override
isUseSSLback to summary
public boolean isUseSSL()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.isUseSSL.

Annotations
@Override
isValidback to summary
public boolean isValid()

Implements org.jabref.logic.shared.DatabaseConnectionProperties.isValid.

Annotations
@Override