apollo.dataadapter.chado
Class ChadoTransaction

java.lang.Object
  extended by apollo.dataadapter.chado.ChadoTransaction
Direct Known Subclasses:
ChadoUpdateTransaction

public class ChadoTransaction
extends java.lang.Object

Class that represents the chado XML counterpart of an Apollo transaction. Each chado transaction can be mapped to an SQL call.

Author:
wgm

Nested Class Summary
static class ChadoTransaction.Operation
          INNER CLASS Operation
 
Field Summary
static ChadoTransaction.Operation DELETE
           
static ChadoTransaction.Operation FORCE
           
static ChadoTransaction.Operation INSERT
           
static ChadoTransaction.Operation LOOKUP
           
static java.lang.String MAP_POSITION_ID
           
static ChadoTransaction.Operation UPDATE
           
 
Constructor Summary
ChadoTransaction()
           
 
Method Summary
 void addProperty(java.lang.String propName, java.lang.String value)
           
 java.lang.String getID()
           
 ChadoTransaction.Operation getOperation()
           
 java.util.Map getProperties()
           
 java.lang.String getTableName()
           
 java.util.Map getUniqueKeyProps()
          Return the properties that are part of the unique key, needed for LOOKUP as you only want to lookup on the unique key.
 boolean isExon()
           
 void setID(java.lang.String id)
          Set the id name for this Transaction.
 void setIsExon(boolean isExon)
          needed to distinguish exons different unique key - name instead of uniquename
 void setOperation(ChadoTransaction.Operation op)
           
 void setProperties(java.util.Map properties)
           
 void setTableName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELETE

public static final ChadoTransaction.Operation DELETE

UPDATE

public static final ChadoTransaction.Operation UPDATE

INSERT

public static final ChadoTransaction.Operation INSERT

LOOKUP

public static final ChadoTransaction.Operation LOOKUP

FORCE

public static final ChadoTransaction.Operation FORCE

MAP_POSITION_ID

public static final java.lang.String MAP_POSITION_ID
See Also:
Constant Field Values
Constructor Detail

ChadoTransaction

public ChadoTransaction()
Method Detail

setTableName

public void setTableName(java.lang.String name)

getTableName

public java.lang.String getTableName()

setProperties

public void setProperties(java.util.Map properties)

getProperties

public java.util.Map getProperties()

addProperty

public void addProperty(java.lang.String propName,
                        java.lang.String value)

setID

public void setID(java.lang.String id)
Set the id name for this Transaction. This is the id used in Chado transaction xml.

Parameters:
id -

getID

public java.lang.String getID()

setIsExon

public void setIsExon(boolean isExon)
needed to distinguish exons different unique key - name instead of uniquename


isExon

public boolean isExon()

getUniqueKeyProps

public java.util.Map getUniqueKeyProps()
Return the properties that are part of the unique key, needed for LOOKUP as you only want to lookup on the unique key. returns all props if no unique key defined currently only synonym has unique key defined


getOperation

public ChadoTransaction.Operation getOperation()

setOperation

public void setOperation(ChadoTransaction.Operation op)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object