|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.as400.access.DataArea com.ibm.as400.access.LogicalDataArea
public class LogicalDataArea extends DataArea implements Serializable
The LogicalDataArea class represents a logical data area on the system.
The following example demonstrates the use of LogicalDataArea:
// Prepare to work with the system named "My400". AS400 system = new AS400("My400"); // Create a LogicalDataArea object. QSYSObjectPathName path = new QSYSObjectPathName("MYLIB", "MYDATA", "DTAARA"); LogicalDataArea dataArea = new LogicalDataArea(system, path.getPath()); // Create the logical data area on the system using default values. dataArea.create(); // Clear the data area. dataArea.clear(); // Write to the data area. dataArea.write(true); // Read from the data area. boolean data = dataArea.read(); // Delete the data area from the system. dataArea.delete();
Constructor and Description |
---|
LogicalDataArea()
Constructs a LogicalDataArea object. |
LogicalDataArea(AS400 system,
String path)
Constructs a LogicalDataArea object. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the data area. |
void |
create()
Creates a logical data area on the system. |
void |
create(boolean initialValue,
String textDescription,
String authority)
Creates a logical data area with the specified attributes. |
void |
delete()
Removes the data area from the system. |
String |
getPath()
Returns the integrated file system path name of the object represented by the data area. |
boolean |
read()
Returns the value in the data area. |
void |
setPath(String path)
Sets the fully qualified data area name. |
void |
write(boolean data)
Writes the value in data to the data area. |
Methods inherited from class com.ibm.as400.access.DataArea |
---|
addDataAreaListener, addPropertyChangeListener, addVetoableChangeListener, getLength, getName, getSystem, refreshAttributes, removeDataAreaListener, removePropertyChangeListener, removeVetoableChangeListener, setSystem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogicalDataArea()
public LogicalDataArea(AS400 system, String path)
system
- The system that contains the data area.path
- The fully qualified integrated file system path name. The
integrated file system file extension for a data area is DTAARA. An example of a
fully qualified integrated file system path to a data area "MYDATA" in library
"MYLIB" is: /QSYS.LIB/MYLIB.LIB/MYDATA.DTAARAMethod Detail |
---|
public void clear() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.public void create() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectAlreadyExistsException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectAlreadyExistsException
- If the system object already exists.ObjectDoesNotExistException
- If the system object does not exist.public void create(boolean initialValue, String textDescription, String authority) throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectAlreadyExistsException, ObjectDoesNotExistException
initialValue
- The initial value for the data area.textDescription
- The text description for the data area. The maximum length is 50 characters.authority
- The public authority level for the data area. Valid
values are *ALL, *CHANGE, *EXCLUDE, *LIBCRTAUT, *USE, or the
name of an authorization list. The maximum length is 10 characters.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectAlreadyExistsException
- If the system object already exists.ObjectDoesNotExistException
- If the system object does not exist.public void delete() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist.public String getPath()
public boolean read() throws AS400SecurityException, ErrorCompletingRequestException, IllegalObjectTypeException, InterruptedException, IOException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.IllegalObjectTypeException
- If the system object is not the required type.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.public void setPath(String path) throws PropertyVetoException
// Create a LogicalDataArea object. LogicalDataArea dataArea = new LogicalDataArea(); // Set its path to be the data area "MYDATA" in the library "MYLIB". dataArea.setPath("/QSYS.LIB/MYLIB.LIB/MYDATA.DTAARA");
path
- The fully qualified integrated file system path name of the data area.PropertyVetoException
- If the change is vetoed.public void write(boolean data) throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
data
- The data to be written.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |