Package com.im.df.api.dml
Class DFInsertDescription.InsertRow
- java.lang.Object
-
- com.im.df.api.dml.DFInsertDescription.InsertRow
-
- Enclosing class:
- DFInsertDescription
public final class DFInsertDescription.InsertRow extends java.lang.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:
- existing row, using the row's ID
- a new data row (one or more), which will be inserted as a part of the whole Insert operation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, java.lang.Comparable<?> rowID)
Connects this row to an already existing row ID in another entity.java.util.Map<DFRelationship.Direction,java.lang.Comparable<?>>
getConnectedRows()
Returns connections to existing entity rowsDFInsertDescription
getInsertion()
java.util.Map<DFRelationship.Direction,java.util.Set<DFInsertDescription.InsertRow>>
getRelatedRows()
java.lang.Comparable<?>
getRowID()
The RowID is set after the insertion takes place.DFUpdateInfo
getUpdateInfo()
java.util.Map<java.lang.String,java.lang.Object>
getValues()
boolean
isInserted()
void
setRowID(java.lang.Comparable<?> rowID)
Sets this insertion's row ID.void
setUpdateInfo(DFUpdateInfo updateInfo)
Sets the UpdateInfo after the row is inserted.java.lang.String
toString()
-
-
-
Method Detail
-
getRowID
public java.lang.Comparable<?> getRowID()
The RowID is set after the insertion takes place. It is available after theDFSchemaDataProvider.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(java.lang.Comparable<?> 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 java.util.Map<java.lang.String,java.lang.Object> getValues()
-
getInsertion
public DFInsertDescription getInsertion()
- Returns:
- The owning Insert Description object.
-
connectRow
public void connectRow(DFRelationship.Direction dir, java.lang.Comparable<?> 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 FROMDFInsertDescription.getTargetEntity()
to the other entity/row.- Parameters:
dir
- The r elation going fromDFInsertDescription.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 FROMDFInsertDescription.getTargetEntity()
to the other entity/row.- Parameters:
dir
- The r elation going fromDFInsertDescription.getTargetEntity()
otherRow
- The other row
-
getConnectedRows
public java.util.Map<DFRelationship.Direction,java.lang.Comparable<?>> getConnectedRows()
Returns connections to existing entity rows
-
getRelatedRows
public java.util.Map<DFRelationship.Direction,java.util.Set<DFInsertDescription.InsertRow>> getRelatedRows()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isInserted
public boolean isInserted()
- Returns:
- True, if the row has been inserted into the database.
-
-