com.ibm.able.platform
Class AbleISeriesJob

java.lang.Object
  |
  +--com.ibm.able.platform.AbleISeriesJob
All Implemented Interfaces:
AbleEServerJobIfc, java.io.Serializable

public class AbleISeriesJob
extends java.lang.Object
implements AbleEServerJobIfc, java.io.Serializable

Capture the entire context of eServer's iSeries Job.

See Also:
Serialized Form

Fields inherited from interface com.ibm.able.platform.AbleEServerJobIfc
INVALID_REPRESENTATION
 
Constructor Summary
AbleISeriesJob()
          Creates an AbleISeriesJob.
AbleISeriesJob(AbleISeriesJob iSeriesJob)
          Creates an AbleISeriesJob.
AbleISeriesJob(java.lang.String theJobKey, java.lang.String theNumber, java.lang.String theUser, java.lang.String theName)
          Creates an AbleISeriesJob.
 
Method Summary
 void clear()
          Method used to clear all info of this job.
static java.lang.String Copyright()
          Gets the copyright of this class.
 java.lang.String debugString()
          Returns a translated String representation of this AbleISeriesJob.
 boolean equals(java.lang.Object o)
          Compares this AbleISeriesJob with another to determine if the reports are equal.
 java.lang.String getJobKey()
          Method getJobKey.
 java.lang.String getName()
          Method getName.
 java.lang.String getNumber()
          Method getNumber.
 java.lang.String getStringRepresentation(java.lang.String typeExpected)
          When getting job info from the Job Service, there are times when it will be expected in a certain format.
 java.lang.String getUser()
          Method getUser.
 int hashCode()
          Return the hashCode for an AbleISeriesJob
 boolean isJobObjectValid(java.lang.String typeExpected)
          Determines if this object contains enough information for the iSeries to be able to identify this job, and if this job is of the type we are expecting.
 void load(java.lang.Object[] jobArray)
          How an iSeries Job will load itself from an Object array.
 java.lang.String toString()
          Returns a brief description of this AbleISeriesJob.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbleISeriesJob

public AbleISeriesJob()
Creates an AbleISeriesJob.

Capture the entire context of eServer's iSeries Job.


AbleISeriesJob

public AbleISeriesJob(AbleISeriesJob iSeriesJob)
Creates an AbleISeriesJob.

Capture the entire context of eServer's iSeries Job. This constructor is a copy constructor and will create a new AbleISeriesJob based off of the AbleISeriesJob passed in on the constructor.

Parameters:
iSeriesJob - The AbleISeriesJob to create a new one based on.

AbleISeriesJob

public AbleISeriesJob(java.lang.String theJobKey,
                      java.lang.String theNumber,
                      java.lang.String theUser,
                      java.lang.String theName)
Creates an AbleISeriesJob.

Parameters:
theJobKey - The key that would identify this job.

theNumber - The number of this job.

theUser - The number of this job.

theName - The number of this job.
Method Detail

load

public void load(java.lang.Object[] jobArray)
How an iSeries Job will load itself from an Object array.

Each element in jobArray is expected to be these Strings:

Specified by:
load in interface AbleEServerJobIfc
Following copied from interface: com.ibm.able.platform.AbleEServerJobIfc
Parameters:
jobInfoArray - String array containing the info to represent an eServer job.

isJobObjectValid

public boolean isJobObjectValid(java.lang.String typeExpected)
Determines if this object contains enough information for the iSeries to be able to identify this job, and if this job is of the type we are expecting.

In the iSeries case, the user, number, and name must all not be null the job key is also checked because it must be present to be registered.

Specified by:
isJobObjectValid in interface AbleEServerJobIfc
Parameters:
typeExpected - The type of Object we expect to be dealing with. Set to null if this should not be checked.

Returns:
boolean true when valid, otherwise false.

getStringRepresentation

public java.lang.String getStringRepresentation(java.lang.String typeExpected)
When getting job info from the Job Service, there are times when it will be expected in a certain format. This method will return a string in the format that is expected.

If there is not enough information to be able to identify this eServer job, or the job doesn't not match typeExcpeted then the INVALID_REPRESENTATION String will be returned.

To make the JNI calls easier, we pass the job info back in this String and it is expected to be in the iSeries format: "number user name" where the number would be padded to 6, user to 10, name to 10.

Specified by:
getStringRepresentation in interface AbleEServerJobIfc
Parameters:
typeExpected - The type of Object we expect to be dealing with. Set to null if this should not be checked.

Returns:
A String representation of this iSeries job.

clear

public void clear()
Method used to clear all info of this job.
Specified by:
clear in interface AbleEServerJobIfc

getNumber

public java.lang.String getNumber()
Method getNumber.
Returns:
The Number for this AbleISeriesJob.

getUser

public java.lang.String getUser()
Method getUser.
Returns:
The User for this AbleISeriesJob.

getName

public java.lang.String getName()
Method getName.
Returns:
The Name for this AbleISeriesJob.

getJobKey

public java.lang.String getJobKey()
Method getJobKey.
Specified by:
getJobKey in interface AbleEServerJobIfc
Returns:
The unique key for this job that will be used to register this iSeries job to the Job Service.

debugString

public java.lang.String debugString()
Returns a translated String representation of this AbleISeriesJob.

Returns:
String The translated String representation of this AbleISeriesJob

Copyright

public static java.lang.String Copyright()
Gets the copyright of this class.

Returns:
A string containing this class's copyright statement.

equals

public boolean equals(java.lang.Object o)
Compares this AbleISeriesJob with another to determine if the reports are equal.

AbleISeriesJob are equal if their internal, private, immutable handles are equal.

Overrides:
equals in class java.lang.Object
Parameters:
o - An instance of an AbleISeriesJob that is to be compared to this AbleISeriesJob.

Returns:
true, if this AbleISeriesJob is equal to the specified AbleISeriesJob; false, otherwise.

AbleISeriesJob are equal if their internal, private, immutable handles are equal.


hashCode

public int hashCode()
Return the hashCode for an AbleISeriesJob

The hashCode of an AbleISeriesJob is the sum of the hashCodes of all of the the internal, private, immutable handles of this Object.

Overrides:
hashCode in class java.lang.Object
Returns:
The sum of the hashCodes of all of the internal, private, immutable data members are equal.

toString

public java.lang.String toString()
Returns a brief description of this AbleISeriesJob.

Overrides:
toString in class java.lang.Object
Returns:
A brief description of this AbleISeriesJob.