Download Developer Guide for BlackBerry

Transcript
Reference
Method
Name
Java Type
Description
component
string
Name of the MBO for the row for which this log record was
written.
entityKey
string
String representation of the primary key of the row for which
this log record was written.
code
int
One of several possible HTTP error codes:
•
•
•
•
•
•
200 indicates success.
401 indicates that the client request had invalid credentials, or that authentication failed for some other reason.
403 indicates that the client request had valid credentials,
but that the user does not have permission to access the
requested resource (package, MBO, or operation).
404 indicates that the client tried to access a nonexistent
package or MBO.
405 indicates that there is no valid license to check out for
the client.
500 to indicate an unexpected (unspecified) server failure.
message
String
Descriptive message from the server with the reason for the
log record.
operation
String
The operation (create, update, or delete) that caused the log
record to be written.
requestId
String
The id of the replay message sent by the client that caused this
log record to be written.
timestamp
Date
Date and time of the log record.
If a rejection is received, the application can use the entity method getLogRecords to
access the log records and get the reason:
com.sybase.collections.ObjectList logs = e.getLogRecords();
for(int i=0; i<logs.count(); i++)
{
com.sybase.persistence.LogRecord log =
(com.sybase.persistence.LogRecord)logs.getByIndex(i);
System.out.println("Entity has a log record:");
System.out.println("Code = " + log.getCode());
System.out.println("Component = " + log.getComponent());
System.out.println("EntityKey = " + log.getEntityKey());
System.out.println("Level = " + log.getLevel());
System.out.println("Message = " + log.getMessage());
System.out.println("Operation = " + log.getOperation());
48
Sybase Unwired Platform