Class JdbcPropertyAdapter
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.common.JdbcPropertyAdapter
-
- Direct Known Subclasses:
DerbyPropertyAdapter
,PostgresPropertyAdapter
public class JdbcPropertyAdapter extends java.lang.Object
Base adapter for common JDBC connection properties
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DATABASE_KEY
static java.lang.String
DEFAULT_SCHEMA_KEY
static java.lang.String
HOST_KEY
static java.lang.String
PASSWORD_KEY
static java.lang.String
PORT_KEY
protected java.util.Properties
properties
static java.lang.String
USER_KEY
-
Constructor Summary
Constructors Constructor Description JdbcPropertyAdapter(java.util.Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDatabase()
java.lang.String
getDefaultSchema()
void
getExtraProperties(java.util.Properties props)
Get all the extra properties into the given props argumentjava.lang.String
getHost()
java.lang.String
getPassword()
int
getPort()
protected java.util.Properties
getProperties()
java.lang.String
getUser()
boolean
isValid()
void
setDatabase(java.lang.String db)
void
setDefaultSchema(java.lang.String schema)
void
setHost(java.lang.String host)
void
setPassword(java.lang.String pw)
void
setPort(int port)
void
setUser(java.lang.String user)
-
-
-
Field Detail
-
properties
protected final java.util.Properties properties
-
DATABASE_KEY
public static final java.lang.String DATABASE_KEY
- See Also:
- Constant Field Values
-
USER_KEY
public static final java.lang.String USER_KEY
- See Also:
- Constant Field Values
-
PASSWORD_KEY
public static final java.lang.String PASSWORD_KEY
- See Also:
- Constant Field Values
-
HOST_KEY
public static final java.lang.String HOST_KEY
- See Also:
- Constant Field Values
-
PORT_KEY
public static final java.lang.String PORT_KEY
- See Also:
- Constant Field Values
-
DEFAULT_SCHEMA_KEY
public static final java.lang.String DEFAULT_SCHEMA_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDatabase
public java.lang.String getDatabase()
-
setDatabase
public void setDatabase(java.lang.String db)
-
setHost
public void setHost(java.lang.String host)
-
getHost
public java.lang.String getHost()
-
setPort
public void setPort(int port)
-
getPort
public int getPort()
-
getUser
public java.lang.String getUser()
-
setUser
public void setUser(java.lang.String user)
-
getPassword
public java.lang.String getPassword()
-
setPassword
public void setPassword(java.lang.String pw)
-
setDefaultSchema
public void setDefaultSchema(java.lang.String schema)
-
getDefaultSchema
public java.lang.String getDefaultSchema()
-
getProperties
protected java.util.Properties getProperties()
-
isValid
public boolean isValid()
-
getExtraProperties
public void getExtraProperties(java.util.Properties props)
Get all the extra properties into the given props argument- Parameters:
props
-
-
-