com.reuters.rc.db.adb
Class AdbOpcode

java.lang.Object
  |
  +--com.reuters.rc.db.adb.AdbOpcode
All Implemented Interfaces:
DbOpcode

public class AdbOpcode
extends java.lang.Object
implements DbOpcode

ADB operation codes represented as type-safe enumerations.

Author:
Jawaid Hakim.

Field Summary
static AdbOpcode DELETE
          DELETE opcode object.
static AdbOpcode INSERT
          INSERT opcode object.
static AdbOpcode UNKNOWN
          UNKNOWN opcode object- Unknown opcode.
static AdbOpcode UPDATE
          UPDATE opcode object.
static AdbOpcode UPSERT
          UPSERT opcode object - UPDATE if row exists, otherwise INSERT.
 
Method Summary
static AdbOpcode getOpcode(int adbOpCode)
          Get AdbOpcode object corresponding to the opCode published by ADB.
static AdbOpcode getOpcode(java.lang.Integer adbOpCode)
          Get AdbOpcode object corresponding to the opCode published by ADB.
 int intValue()
          Get the opcode value as an int.
 boolean isDelete()
          Check if this opcode is an DELETE.
 boolean isInsert()
          Check if this opcode is an INSERT.
 boolean isUnknown()
          Check if this opcode is an UNKNOWN.
 boolean isUpdate()
          Check if this opcode is an UPDATE.
 boolean isUpsert()
          Check if this opcode is an UPSERT.
 java.lang.String toString()
          Override toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSERT

public static final AdbOpcode INSERT
INSERT opcode object.

UPDATE

public static final AdbOpcode UPDATE
UPDATE opcode object.

DELETE

public static final AdbOpcode DELETE
DELETE opcode object.

UPSERT

public static final AdbOpcode UPSERT
UPSERT opcode object - UPDATE if row exists, otherwise INSERT.

UNKNOWN

public static final AdbOpcode UNKNOWN
UNKNOWN opcode object- Unknown opcode.
Method Detail

toString

public java.lang.String toString()
Override toString().
Overrides:
toString in class java.lang.Object
Returns:
String representation of object.

intValue

public final int intValue()
Get the opcode value as an int.
Returns:
Opcode value as an int.

isInsert

public final boolean isInsert()
Check if this opcode is an INSERT.
Specified by:
isInsert in interface DbOpcode
Returns:
Returns true if this opcode is an INSERT.

isDelete

public final boolean isDelete()
Check if this opcode is an DELETE.
Specified by:
isDelete in interface DbOpcode
Returns:
Returns true if this opcode is an DELETE.

isUpdate

public final boolean isUpdate()
Check if this opcode is an UPDATE.
Specified by:
isUpdate in interface DbOpcode
Returns:
Returns true if this opcode is an UPDATE.

isUpsert

public final boolean isUpsert()
Check if this opcode is an UPSERT.
Specified by:
isUpsert in interface DbOpcode
Returns:
Returns true if this opcode is an UPSERT.

isUnknown

public final boolean isUnknown()
Check if this opcode is an UNKNOWN.
Specified by:
isUnknown in interface DbOpcode
Returns:
Returns true if this opcode is an UNKNOWN.

getOpcode

public static final AdbOpcode getOpcode(java.lang.Integer adbOpCode)
Get AdbOpcode object corresponding to the opCode published by ADB.
Parameters:
adbOpCode - OpCode published by ADB.
Returns:
AdbOpcode object corresponding to the opCode published by ADB. Returns UNKNOWN if the adbOpcode is invalid.

getOpcode

public static final AdbOpcode getOpcode(int adbOpCode)
Get AdbOpcode object corresponding to the opCode published by ADB.
Parameters:
adbOpCode - OpCode published by ADB.
Returns:
AdbOpcode object corresponding to the opCode published by ADB. Returns UNKNOWN if the adbOpcode is invalid.


Copyright © 2002-2003 Reuters. All Rights Reserved.