|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ims.db.DLIConnection
A DLIConnection object represents a connection to a PSB. The DLIDatabaseView object that all connections require indicates all of the PCBs (in the PSB) and segments that an application can view, as well as their hierarchical positioning within a particular PCB. This class provides the interface to read, write, update, and delete segments in a DL/I database.
Constructor Summary | |
protected |
DLIConnection(DLIDatabaseView dbView)
Creates a connection with a DL/I database. |
protected |
DLIConnection(DLIDatabaseView dbView,
java.lang.String draName)
Creates a connection with a DL/I database. |
protected |
DLIConnection(DLIDatabaseView dbView,
java.lang.String psbName,
java.lang.String draName)
Creates a connection with a DL/I database. |
protected |
DLIConnection(java.lang.String url)
Creates a connection with a DL/I database. |
Method Summary | |
void |
close()
Closes the connection to the database. |
static DLIConnection |
createInstance(DLIDatabaseView dbView)
Creates a connection with a DL/I database. |
static DLIConnection |
createInstance(DLIDatabaseView dbView,
java.lang.String draName)
Creates a connection with a DL/I database. |
static DLIConnection |
createInstance(DLIDatabaseView dbView,
java.lang.String psbName,
java.lang.String draName)
Deprecated. Replaced by createInstance(DLIDatabaseView dbView, String draName) |
static DLIConnection |
createInstance(java.lang.String url)
Creates a connection with a DL/I database. |
void |
deleteSegments()
Deprecated. Replaced by deleteSegments(DLISegment) or deleteSegments(DLIRecord) |
void |
deleteSegments(DLIRecord record)
Removes a record and its dependents from the database. |
void |
deleteSegments(DLISegment segment)
Removes a segment and its dependents from the database. |
protected void |
finalize()
Closes the database connection if it has not already been done. |
AIB |
getAIB()
Returns the Application Interface Block (AIB) used by the connection. |
DLIDatabaseView |
getDBView()
Returns the database view used to create the connection. |
byte[] |
getHeldSegmentIOArea()
Returns the ioArea from the last call. |
boolean |
getNextRecord(DLIRecord record,
SSAList ssaList)
Retrieves segments in a path call sequentially from the database. |
boolean |
getNextSegment(DLISegment segment,
SSAList ssaList)
Retrieves a segment sequentially from the database. |
DLISegment |
getNextSegment(SSAList ssaList)
Retrieves a segment sequentially from the database. |
boolean |
getNextSegmentInParent(DLISegment segment,
SSAList ssaList)
Retrieves a dependent segment sequentially from the database. |
DLISegment |
getNextSegmentInParent(SSAList ssaList)
Retrieves a dependent segment sequentially from the database. |
boolean |
getUniqueRecord(DLIRecord record,
SSAList ssaList)
Directly retrieves the segments in a path from the database and establishes a starting position in the database for sequential processing. |
boolean |
getUniqueSegment(DLISegment segment,
SSAList ssaList)
Directly retrieves a segment from the database and establishes a starting position in the database for sequential processing. |
DLISegment |
getUniqueSegment(SSAList ssaList)
Directly retrieves a segment from the database and establishes a starting position in the database for sequential processing. |
void |
insertSegment(DLISegment segment,
SSAList ssaList)
Inserts a segment into the database. |
void |
replaceSegment(DLISegment segment)
Replaces a segment in the database. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected DLIConnection(DLIDatabaseView dbView)
DLIConnection connection = DLIConnection.createInstance(new IVPDatabaseView());
dbView
- a DLIDatabaseView objectDLIDatabaseView
protected DLIConnection(java.lang.String url)
DLIConnection connection = DLIConnection.createInstance("samples.ivp.IVPDatabaseView");
DLIConnection connection = DLIConnection.createInstance("samples.ivp.IVPDatabaseView/DRA1");
url
- the fully qualified path to a DLIDatabaseView class name, which may also include
the DRA name, depending on the environmentDLIDatabaseView
protected DLIConnection(DLIDatabaseView dbView, java.lang.String psbName, java.lang.String draName)
DLIConnection connection = DLIConnection.createInstance(new IVPDatabaseView(), "PSB1", "DRA1");
dbView
- a DLIDatabaseView objectpsbName
- the PSB namedraName
- the DRA nameDLIDatabaseView
protected DLIConnection(DLIDatabaseView dbView, java.lang.String draName)
DLIConnection connection = DLIConnection.createInstance(new IVPDatabaseView(), "DRA1");
dbView
- a DLIDatabaseView objectdraName
- the DRA nameDLIDatabaseView
Method Detail |
public static DLIConnection createInstance(DLIDatabaseView dbView)
DLIConnection connection = DLIConnection.createInstance(new IVPDatabaseView());
dbView
- a DLIDatabaseView objectDLIDatabaseView
public static DLIConnection createInstance(java.lang.String url)
DLIConnection connection = DLIConnection.createInstance("samples.ivp.IVPDatabaseView");
DLIConnection connection = DLIConnection.createInstance("samples.ivp.IVPDatabaseView/DRA1");
url
- the fully qualified path to a DLIDatabaseView class name, which may also include
the DRA name, depending on the environmentDLIDatabaseView
public static DLIConnection createInstance(DLIDatabaseView dbView, java.lang.String psbName, java.lang.String draName)
DLIConnection connection = DLIConnection.createInstance(new IVPDatabaseView(), "PSB1", "DRA1");
dbView
- a DLIDatabaseView objectpsbName
- the PSB namedraName
- the DRA nameDLIDatabaseView
public static DLIConnection createInstance(DLIDatabaseView dbView, java.lang.String draName)
DLIConnection connection = DLIConnection.createInstance(new IVPDatabaseView(), "DRA1");
dbView
- a DLIDatabaseView objectdraName
- the DRA nameDLIDatabaseView
public final AIB getAIB()
public byte[] getHeldSegmentIOArea()
public void close() throws IMSException
public boolean getNextRecord(DLIRecord record, SSAList ssaList) throws IMSException
record
- the DLIRecord that will be populated with the segments specified by the
SSAList parameterssaList
- the SSA list specifying the desired DL/I segments in the path.IMSException
- if an error occurs trying to retrieve the recordpublic boolean getNextSegment(DLISegment segment, SSAList ssaList) throws IMSException
segment
- the DL/I segment that will be populated with the segment specified by the
SSAList parameterssaList
- the SSA list specifying the desired DL/I segmentIMSException
- if an error occurs trying to retrieve the segmentpublic DLISegment getNextSegment(SSAList ssaList) throws IMSException
DLIDatabaseView
class containing the view of the segments in the database
contains only one DB PCB name, then null
may be passed in for an unqualified call.
To perform an unqualified call when there are multiple DB PCBs in the DLIDatabaseView
create an SSAList
by passing in the DB PCB name reference. The DB PCB name
reference is the database PCB name that was provided via the dbPCBNameReference
parameter to either the DLIDatabaseView(String, String, String, DLISegmentInfo[])
constructor
or DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[])
method.ssaList
- the SSA list specifying the desired DL/I segment, or null if performing
an unqualified call and the DLIDatabaseView
contains only one DB PCBnull
if one does not existIMSException
- if an error occurs trying to retrieve the segmentDLIException
- if a segment is returned from the call that is not in the
DLIDatabaseView
of the applicationSSAList.SSAList(String)
,
DLIDatabaseView.DLIDatabaseView(String, String, String, DLISegmentInfo[])
,
DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[])
public boolean getNextSegmentInParent(DLISegment segment, SSAList ssaList) throws IMSException
segment
- the DL/I segment that will be populated with the segment specified by the
SSAList parameterssaList
- the SSA list specifying the desired DL/I segmentIMSException
- if an error occurs trying to retrieve the segmentpublic DLISegment getNextSegmentInParent(SSAList ssaList) throws IMSException
DLIDatabaseView
class containing the view of the segments in the database
contains only one DB PCB name, then null
may be passed in for an unqualified call.
To perform an unqualified call when there are multiple DB PCBs in the DLIDatabaseView
create an SSAList
by passing in the DB PCB name reference. The DB PCB name
reference is the database PCB name that was provided via the dbPCBNameReference
parameter to either the DLIDatabaseView(String, String, String, DLISegmentInfo[])
constructor
or DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[])
method.ssaList
- the SSA list specifying the desired DL/I segment, or null if performing
an unqualified callnull
if one does not existIMSException
- if an error occurs trying to retrieve the segmentDLIException
- if a segment is returned from the call that is not in the
DLIDatabaseView
of the applicationSSAList.SSAList(String)
,
DLIDatabaseView.DLIDatabaseView(String, String, String, DLISegmentInfo[])
,
DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[])
public boolean getUniqueRecord(DLIRecord record, SSAList ssaList) throws IMSException
record
- the DLIRecord that will be populated with the segments specified by the
SSAList parameterssaList
- the SSA list specifying the desired DL/I leaf segment. The SSAs in
the SSAList should have the PATH_CALL command code set on each
segment to be retrieved. The P processing option must be specified
in the PCB to use this function.IMSException
- if an error occurs trying to retrieve the recordpublic boolean getUniqueSegment(DLISegment segment, SSAList ssaList) throws IMSException
segment
- the DL/I segment that will be populated with the segment specified by the
SSAList parameterssaList
- the SSA list specifying the desired DL/I segmentIMSException
- if an error occurs trying to retrieve the segmentpublic DLISegment getUniqueSegment(SSAList ssaList) throws IMSException
DLIDatabaseView
class containing the
view of the segments in the database contains only one DB PCB name, then null
may
be passed in for an unqualified call. To perform an unqualified call when there are multiple
DB PCBs in the DLIDatabaseView
create an SSAList
by passing in the
DB PCB name reference. The DB PCB name reference is the database PCB name that was
provided via the dbPCBNameReference
parameter to either the
DLIDatabaseView(String, String, String, DLISegmentInfo[])
constructor
or DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[])
method.ssaList
- the SSA list specifying the desired DL/I segment, or null if performing
an unqualified callnull
if one does not existIMSException
- if an error occurs trying to retrieve the segmentDLIException
- if a segment is returned from the call that is not in the
DLIDatabaseView
of the applicationSSAList.SSAList(String)
,
DLIDatabaseView.DLIDatabaseView(String, String, String, DLISegmentInfo[])
,
DLIDatabaseView.addDatabase(String, String, DLISegmentInfo[])
public void insertSegment(DLISegment segment, SSAList ssaList) throws IMSException
segment
- the segment to be inserted into the databasessaList
- the SSA list specifying where the segment will be addedIMSException
- if an error occurs trying to insert the segmentpublic void replaceSegment(DLISegment segment) throws IMSException
segment
- the segment that will replace the existing segment in the database that was
returned with one of the three hold callsIMSException
- if an error occurs trying to replace the segmentpublic void deleteSegments(DLISegment segment) throws IMSException
segment
- the segment to be deletedIMSException
- if an error occurs trying to delete the segment or recordpublic void deleteSegments(DLIRecord record) throws IMSException
record
- the record to be deletedIMSException
- if an error occurs trying to delete the segment or recordpublic void deleteSegments() throws IMSException
IMSException
- if an error occurs trying to delete the segment or recordpublic DLIDatabaseView getDBView()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |