|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ThreadSafe public interface DBLink
A DBLink
represents a database link or connection to a Sage Accpac
ERP company or system database.
An object of this class cannot be created directly by applications. Instead,
it should be obtained from the Program object's
openDBLink
method.
The caller must call the dispose
method when finished with
the object so that all its resources can be released. The caller must not
call any other method on the object after calling dispose.
Nested Class Summary | |
---|---|
static class |
DBLink.DatabaseType
This class defines all the database types used by Accpac |
static class |
DBLink.LinkFlags
The DBLink.LinkFlags enumeration lists the different ways a link can be
opened |
static class |
DBLink.LinkType
The DBLink.LinkType describes the different types of links available |
Method Summary | |
---|---|
DBLink.DatabaseType |
getDatabaseType()
Return the database type |
java.sql.ResultSet |
getDirectQuery(java.lang.String query)
gets a new ResultSet containing the result of running the query directly against the database. |
DBLink.LinkFlags |
getFlags()
gets the database flags used to open the link. |
Program |
getParent()
Deprecated. use getProgram() |
IProgram |
getProgram()
gets the Program object that is the parent of this object |
DBTableMetaData |
getTableMetaData(java.lang.String tableName)
Get table meta data by calling native A4WAPIs |
int |
getTransactionLevel()
Gets the current transaction level on the current database connection |
DBLink.LinkType |
getType()
gets the type of database that the link connects to |
boolean |
isPermitted(java.lang.String resource)
returns whether or not the user is permitted to access the given security resource. |
IView |
openIView(java.lang.String viewid)
open an Accpac view |
IView |
openIView(java.lang.String viewid,
int modes,
int prefetch,
int directives)
open an Accpac view. |
int |
transactionBegin()
Begins a transaction on the current database connection |
int |
transactionCommit()
Commits the most recent transaction on the current database connection |
int |
transactionRollback()
Rolls back the most recent transaction on the current database connection |
Methods inherited from interface com.sage.accpac.sm.currency.HasCurrency |
---|
getCurrency, getCurrencyRate, getCurrencyRateComposite, getCurrencyRateFloating, getCurrencyTable |
Methods inherited from interface com.sage.accpac.sm.HasDispose |
---|
dispose |
Method Detail |
---|
DBLink.DatabaseType getDatabaseType()
java.sql.ResultSet getDirectQuery(java.lang.String query)
query
- the query to run
ResultSet
containing the results@Deprecated Program getParent()
getProgram()
getProgram()
IProgram getProgram()
IProgram
to which this link belongsint getTransactionLevel()
DBLinkException
- If a database error occurs.DBLink.LinkFlags getFlags()
DBLink.LinkFlags
used to open the linkDBLink.LinkType getType()
DBLink.LinkType
of the linkboolean isPermitted(java.lang.String resource)
resource
- the name of the resource to be checked. This must consist of
only ASCII printable characters at may be at most 10 characters
long.
IView openIView(java.lang.String viewid, int modes, int prefetch, int directives)
viewid
- the rotoid (e.g. BK0001) of the view. This must be six
characters long once trimmed.modes
- an integer value containing a set of flags that control
behavior. See View.OpenModes
.prefetch
- the number of records to pre-fetch when the view is opened (0 to
63)directives
- specifies how the view should be used. See
View.OpenDirectives
. IView openIView(java.lang.String viewid)
viewid
- the rotoid of the view to open
int transactionBegin()
DBLinkException
- If a database error occurs.int transactionCommit()
java.lang.IllegalStateException
- If the connection is not currently in a transaction
DBLinkException
- If a database error occursint transactionRollback()
DBLinkException
- If a database error occurs.DBTableMetaData getTableMetaData(java.lang.String tableName)
tableName
- - the name of an ACCPAC database table
DBLinkException
- If a database error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |