com.im.df.api 5.9

com.im.df.api.dml
Class DFInsertDescription.InsertRow

java.lang.Object
  extended by com.im.df.api.dml.DFInsertDescription.InsertRow
Enclosing class:
DFInsertDescription

public final class DFInsertDescription.InsertRow
extends Object

Description of the row to be inserted. Contains data of the row and connection(s) to other rows. The connections are established in both directions.

Other entity's data can be connected either as:


Method Summary
 void connectRow(DFRelationship.Direction dir, DFInsertDescription.InsertRow otherRow)
          Connects this row to an already existing row ID in another entity.
 void connectRow(DFRelationship.Direction dir, Object rowID)
          Connects this row to an already existing row ID in another entity.
 Map<DFRelationship.Direction,Object> getConnectedRows()
          Returns connections to existing entity rows
 DFInsertDescription getInsertion()
           
 Map<DFRelationship.Direction,Set<DFInsertDescription.InsertRow>> getRelatedRows()
           
 Object getRowID()
          The RowID is set after the insertion takes place.
 DFUpdateInfo getUpdateInfo()
           
 Map<String,Object> getValues()
           
 boolean isInserted()
           
 void setRowID(Object rowID)
          Sets this insertion's row ID.
 void setUpdateInfo(DFUpdateInfo updateInfo)
          Sets the UpdateInfo after the row is inserted.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getRowID

public Object getRowID()
The RowID is set after the insertion takes place. It is available after the DFSchemaDataProvider.insert(com.im.df.api.dml.DFInsertDescription, com.im.commons.progress.DFEnvironmentRO) completes as a result value.

Returns:
The rowID of the insertion

setRowID

public void setRowID(Object rowID)
Sets this insertion's row ID. The method should be called only from the database code, that creates the row in the DB.


getUpdateInfo

public DFUpdateInfo getUpdateInfo()
Returns:
UpdateInfo that gives information about this row's insertion

setUpdateInfo

public void setUpdateInfo(DFUpdateInfo updateInfo)
Sets the UpdateInfo after the row is inserted. Can be called only once. DO NOT CALL this method from DIF client code.

Parameters:
updateInfo - The update info.

getValues

public Map<String,Object> getValues()

getInsertion

public DFInsertDescription getInsertion()
Returns:
The owning Insert Description object.

connectRow

public void connectRow(DFRelationship.Direction dir,
                       Object rowID)
Connects this row to an already existing row ID in another entity. The row must be already committed to the database. The "dir" parameter represents a relation which goes FROM DFInsertDescription.getTargetEntity() to the other entity/row.

Parameters:
dir - The r elation going from DFInsertDescription.getTargetEntity()
rowID - ID of the related row

connectRow

public void connectRow(DFRelationship.Direction dir,
                       DFInsertDescription.InsertRow otherRow)
Connects this row to an already existing row ID in another entity. The row must be already committed to the database. The "dir" parameter represents a relation which goes FROM DFInsertDescription.getTargetEntity() to the other entity/row.

Parameters:
dir - The r elation going from DFInsertDescription.getTargetEntity()
otherRow - The other row

getConnectedRows

public Map<DFRelationship.Direction,Object> getConnectedRows()
Returns connections to existing entity rows


getRelatedRows

public Map<DFRelationship.Direction,Set<DFInsertDescription.InsertRow>> getRelatedRows()

toString

public String toString()
Overrides:
toString in class Object

isInserted

public boolean isInserted()
Returns:
True, if the row has been inserted into the database.

com.im.df.api 5.9