|
Compiere 3.1 | |||||||||
| 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
Compiere Connection Descriptor
| Field Summary | |
|---|---|
static ValueNamePair[] |
appsTypeProfiles
|
static ValueNamePair[] |
CONNECTIONProfiles
Connection profiles |
static ValueNamePair[] |
CONNECTIONProfilesWas
|
static String |
PROFILE_LAN
Connection Profile LAN |
static String |
PROFILE_TERMINAL
Connection Profile Terminal Server |
static String |
PROFILE_VPN
Connection Profile VPM |
static String |
PROFILE_WAN
Connection Profile WAN |
| Method Summary | |
|---|---|
String |
convertStatement(String origStatement)
Convert Statement |
Connection |
createConnection(boolean autoCommit,
int transactionIsolation)
Create Connection - no not close. |
boolean |
equals(Object o)
Equals |
static CConnection |
get()
Get/Set default client/server Connection |
static CConnection |
get(String jdbcString,
String db_uid,
String db_pwd)
Get specific connection |
static CConnection |
get(String type,
String db_host,
String db_port,
String db_name)
Get specific connection |
static CConnection |
get(String type,
String db_host,
String 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 |
String |
getAppsType()
Get Application type |
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 |
CompiereDatabase |
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 |
getDBType()
Get Database Type |
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<String,String> env)
Get Initial Context |
static Hashtable<String,String> |
getInitialEnvironment(String AppsHost,
int AppsPort,
String appsType,
boolean RMIoverHTTP,
int webPort)
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 |
Status |
getStatusEjbStub()
|
static String |
getTransactionIsolationInfo(int transactionIsolation)
Get Transaction Isolation Info |
int |
getWebPort()
Get Web Port |
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 |
isDB2()
Is IBM DB/2 |
boolean |
isMSSQLServer()
Is Microsoft SQL Server |
boolean |
isOracle()
Is Oracle DB |
boolean |
isOracleXE()
Is Oracle XE DB |
boolean |
isPostgreSQL()
Is PostgrSQL |
boolean |
isRMIoverHTTP()
RMI over HTTP |
boolean |
isServerObjects()
Should objects be created on Server ? |
boolean |
isServerProcess()
Should processes be created on Server ? |
boolean |
isTerminalServer()
Is this a Terminal Server ? |
boolean |
isViaFirewall()
Is DB via Firewall |
static void |
main(String[] args)
Testing |
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 |
setAppsType(String appsType)
Set Application Type |
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 |
setDBType(String type)
Set Database Type and default settings. |
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 |
setViaFirewall(boolean viaFirewall)
Method setViaFirewall |
void |
setViaFirewall(String viaFirewallString)
Method setViaFirewall |
void |
setWebPort(int webPort)
Set Web Port |
void |
setWebPort(String webPort)
Set Web Port |
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 |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static ValueNamePair[] CONNECTIONProfiles
public static ValueNamePair[] CONNECTIONProfilesWas
public static final String PROFILE_LAN
public static final String PROFILE_TERMINAL
public static final String PROFILE_VPN
public static final String PROFILE_WAN
public static ValueNamePair[] appsTypeProfiles
| Method Detail |
|---|
public static CConnection get()
public static CConnection get(String type,
String db_host,
String 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 jdbcString,
String db_uid,
String db_pwd)
jdbcString - e.g. dbc:oracle:thin:@//ws-jj:1521/xedb_uid - db user iddb_pwd - db user password
public static CConnection get(String type,
String db_host,
String 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 String getAppsType()
public void setAppsType(String appsType)
appsType - application typepublic int getWebPort()
public void setWebPort(int webPort)
webPort - web portpublic void setWebPort(String webPort)
webPort - String web 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 getDBType()
public void setDBType(String type)
type - database Type, e.g. Environemnt.DBTYPE_ORACLEpublic boolean supportsBLOB()
public boolean isOracleXE()
public boolean isOracle()
public boolean isDB2()
public boolean isMSSQLServer()
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 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 CompiereDatabase getDatabase()
public String getConnectionURL()
public Connection getServerConnection(boolean autoCommit,
int trxLevel)
autoCommit - true if autocommit connectiontrxLevel - Connection transaction level
public Connection createConnection(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<String,String> getInitialEnvironment(String AppsHost,
int AppsPort,
String appsType,
boolean RMIoverHTTP,
int webPort)
AppsHost - hostAppsPort - portRMIoverHTTP - true if tunnel through HTTP
public static InitialContext getInitialContext(Hashtable<String,String> 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 Status getStatusEjbStub()
public static void main(String[] args)
args - ignored
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||