|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.db.CConnection
public class CConnection
Adempiere Connection Descriptor
| Field Summary | |
|---|---|
static ValueNamePair[] |
CONNECTIONProfiles
Connection profiles |
static String |
PROFILE_LAN
Connection Profile LAN |
static String |
PROFILE_TERMINAL
Deprecated. |
static String |
PROFILE_VPN
Connection Profile VPM |
static String |
PROFILE_WAN
Connection Profile WAN |
| Method Summary | |
|---|---|
Object |
clone()
|
String |
convertStatement(String origStatement)
Convert Statement |
boolean |
equals(Object o)
Equals |
static CConnection |
get()
Get/Set default client/server Connection |
static CConnection |
get(String apps_host)
Get/Set default client/server Connection |
static CConnection |
get(String type,
String db_host,
int db_port,
String db_name)
Get specific connection |
static CConnection |
get(String type,
String db_host,
int db_port,
String db_name,
String db_uid,
String db_pwd)
Get specific client connection |
String |
getAppsHost()
Get Application Host |
int |
getAppsPort()
Get Apps Port |
Exception |
getAppsServerException()
Get Last Exception of Apps Server Connection attempt |
Connection |
getConnection(boolean autoCommit,
int transactionIsolation)
Create Connection - no not close. |
String |
getConnectionProfile()
Get Connection Profile |
ValueNamePair |
getConnectionProfilePair()
Get Connection Profile |
String |
getConnectionProfileText()
Get Connection Profile Text |
String |
getConnectionProfileText(String connectionProfile)
Get Connection Profile Text |
String |
getConnectionURL()
Get Connection String |
AdempiereDatabase |
getDatabase()
Get Database |
Exception |
getDatabaseException()
Get Database Exception of last connection attempt |
DataSource |
getDataSource()
Get Server Connection |
String |
getDbHost()
Get Database Host name |
String |
getDBInfo()
Get DB Version Info |
String |
getDbName()
Get Database Name (Service Name) |
int |
getDbPort()
Get DB Port |
String |
getDbPwd()
Get Database Password |
String |
getDbUid()
Get Database User |
String |
getFwHost()
Method getFwHost |
int |
getFwPort()
Get Firewall port |
String |
getInfo()
Get Info |
InitialContext |
getInitialContext(boolean useCache)
Get Application Server Initial Context |
static InitialContext |
getInitialContext(Hashtable env)
Get Initial Context |
static Hashtable |
getInitialEnvironment(String AppsHost,
int AppsPort,
boolean RMIoverHTTP)
|
static Hashtable |
getInitialEnvironment(String AppsHost,
int AppsPort,
boolean RMIoverHTTP,
String principal,
String credential)
Get Initial Environment |
String |
getName()
Get Name |
Server |
getServer()
Get Server |
Connection |
getServerConnection(boolean autoCommit,
int trxLevel)
Get Server Connection - do close |
String |
getServerVersion()
Get Apps Server Version |
String |
getStatus()
Get Status Info |
static String |
getTransactionIsolationInfo(int transactionIsolation)
Get Transaction Isolation Info |
String |
getType()
Get Database Type |
int |
hashCode()
Hashcode |
boolean |
isAppsServerOK(boolean tryContactAgain)
Is Application Server OK |
boolean |
isBequeath()
Is it a bequeath connection |
boolean |
isDatabaseOK()
Is Database Connection OK |
boolean |
isDataSource()
Has Server Connection |
boolean |
isOracle()
Is Oracle DB |
boolean |
isPostgreSQL()
Is PostgreSQL DB |
boolean |
isRMIoverHTTP()
RMI over HTTP |
boolean |
isServerObjects()
Should objects be created on Server ? |
boolean |
isServerProcess()
Should objects be created on Server ? |
boolean |
isTerminalServer()
Deprecated. |
boolean |
isViaFirewall()
Is DB via Firewall |
static void |
main(String[] args)
Testing |
void |
readInfo(Connection conn)
|
void |
setAppServerCredential(String principal,
String credential)
|
void |
setAppsHost(String apps_host)
Set Application Host |
void |
setAppsPort(int apps_port)
Set Apps Port |
void |
setAppsPort(String apps_portString)
Set Apps Port |
void |
setBequeath(boolean bequeath)
Set Bequeath |
void |
setBequeath(String bequeathString)
Set Bequeath |
void |
setConnectionProfile(String connectionProfile)
Set Connection Profile |
void |
setConnectionProfile(ValueNamePair connectionProfile)
Set Connection Profile |
boolean |
setDataSource()
Create DB Connection |
boolean |
setDataSource(DataSource ds)
Set Data Source |
void |
setDbHost(String db_host)
Set Database host name |
void |
setDbName(String db_name)
Set Database Name (Service Name) |
void |
setDbPort(int db_port)
Set DB Port |
void |
setDbPort(String db_portString)
Set DB Port |
void |
setDbPwd(String db_pwd)
Set DB password |
void |
setDbUid(String db_uid)
Set Database User |
void |
setFwHost(String fw_host)
Method setFwHost |
void |
setFwPort(int fw_port)
Set Firewall port |
void |
setFwPort(String fw_portString)
Set Firewall port |
protected void |
setName()
Set Name |
void |
setName(String name)
Set Name |
void |
setType(String type)
Set Database Type and default settings. |
void |
setViaFirewall(boolean viaFirewall)
Method setViaFirewall |
void |
setViaFirewall(String viaFirewallString)
Method setViaFirewall |
boolean |
supportsBLOB()
Supports BLOB |
Exception |
testAppsServer()
Test ApplicationServer |
Exception |
testDatabase(boolean retest)
Test Database Connection. -- Example -- Database: PostgreSQL - 7.1.3 Driver: PostgreSQL Native Driver - PostgreSQL 7.2 JDBC2 -- Example -- Database: Oracle - Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option JServer Release 8.1.7.0.0 - Production Driver: Oracle JDBC driver - 9.0.1.1.0 |
String |
toString()
Short String representation |
String |
toStringDetail()
Detail Info |
String |
toStringLong()
String representation. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static ValueNamePair[] CONNECTIONProfiles
public static final String PROFILE_LAN
public static final String PROFILE_TERMINAL
public static final String PROFILE_VPN
public static final String PROFILE_WAN
| Method Detail |
|---|
public static CConnection get()
public static CConnection get(String apps_host)
apps_host - optional apps host for new connections
public static CConnection get(String type,
String db_host,
int db_port,
String db_name)
type - database Type, e.g. Database.DB_ORACLEdb_host - db hostdb_port - db portdb_name - db name
public static CConnection get(String type,
String db_host,
int db_port,
String db_name,
String db_uid,
String db_pwd)
type - database Type, e.g. Database.DB_ORACLEdb_host - db hostdb_port - db portdb_name - db namedb_uid - db user iddb_pwd - db user password
public String getName()
public void setName(String name)
name - connection nameprotected void setName()
public String getAppsHost()
public void setAppsHost(String apps_host)
apps_host - apps hostpublic int getAppsPort()
public void setAppsPort(int apps_port)
apps_port - apps portpublic void setAppsPort(String apps_portString)
apps_portString - appd port as Stringpublic boolean isAppsServerOK(boolean tryContactAgain)
tryContactAgain - try to contact again
public Exception testAppsServer()
public Server getServer()
public String getServerVersion()
public String getDbHost()
public void setDbHost(String db_host)
db_host - db hostpublic String getDbName()
public void setDbName(String db_name)
db_name - db namepublic int getDbPort()
public void setDbPort(int db_port)
db_port - db portpublic void setDbPort(String db_portString)
db_portString - db port as Stringpublic String getDbPwd()
public void setDbPwd(String db_pwd)
db_pwd - db user passwordpublic String getDbUid()
public void setDbUid(String db_uid)
db_uid - db user idpublic boolean isRMIoverHTTP()
public void setConnectionProfile(ValueNamePair connectionProfile)
connectionProfile - connection profilepublic void setConnectionProfile(String connectionProfile)
connectionProfile - connection profilepublic String getConnectionProfile()
public String getConnectionProfileText(String connectionProfile)
connectionProfile -
public String getConnectionProfileText()
public ValueNamePair getConnectionProfilePair()
public boolean isServerObjects()
public boolean isServerProcess()
public boolean isTerminalServer()
public boolean isViaFirewall()
public void setViaFirewall(boolean viaFirewall)
viaFirewall - booleanpublic void setViaFirewall(String viaFirewallString)
viaFirewallString - Stringpublic String getFwHost()
public void setFwHost(String fw_host)
fw_host - Stringpublic int getFwPort()
public void setFwPort(int fw_port)
fw_port - firewall portpublic void setFwPort(String fw_portString)
fw_portString - firewall port as Stringpublic boolean isBequeath()
public void setBequeath(boolean bequeath)
bequeath - bequeath connectionpublic void setBequeath(String bequeathString)
bequeathString - bequeath connection as String (true/false)public String getType()
public void setType(String type)
type - database Type, e.g. Database.DB_ORACLEpublic boolean supportsBLOB()
public boolean isOracle()
public boolean isPostgreSQL()
public boolean isDatabaseOK()
public boolean setDataSource()
public boolean setDataSource(DataSource ds)
ds - data source
public DataSource getDataSource()
public boolean isDataSource()
public Exception testDatabase(boolean retest)
retest -
public void readInfo(Connection conn)
throws SQLException
SQLExceptionpublic String toString()
toString in class Objectpublic String toStringDetail()
public String getDBInfo()
public String toStringLong()
setAttributespublic boolean equals(Object o)
equals in class Objecto - object
public String getInfo()
public int hashCode()
hashCode in class Objectpublic AdempiereDatabase getDatabase()
public String getConnectionURL()
public Connection getServerConnection(boolean autoCommit,
int trxLevel)
autoCommit - true if autocommit connectiontrxLevel - Connection transaction level
public Connection getConnection(boolean autoCommit,
int transactionIsolation)
autoCommit - true if autocommit connectiontransactionIsolation - Connection transaction level
public Exception getDatabaseException()
public InitialContext getInitialContext(boolean useCache)
useCache - if true, use existing cache
public static Hashtable getInitialEnvironment(String AppsHost,
int AppsPort,
boolean RMIoverHTTP)
public static Hashtable getInitialEnvironment(String AppsHost,
int AppsPort,
boolean RMIoverHTTP,
String principal,
String credential)
AppsHost - hostAppsPort - portRMIoverHTTP - true if tunnel through HTTPprincipal - credential -
public static InitialContext getInitialContext(Hashtable env)
env - environment
public Exception getAppsServerException()
public String convertStatement(String origStatement)
throws Exception
origStatement - original statement (Oracle notation)
Exceptionpublic String getStatus()
public static String getTransactionIsolationInfo(int transactionIsolation)
transactionIsolation - trx iso
public void setAppServerCredential(String principal,
String credential)
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic static void main(String[] args)
args - ignored
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||