|
com.im.df.api 5.12.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.df.api.dml.DFInsertDescription
public final class DFInsertDescription
This data structure describes a single row to be inserted into the
getTargetEntity(). You can record data to be inserted into
row's DFFields, as well as relations to other DFEntity's rows.
For complex data setups, which require relationship-bound fields to be set,
you can
DFRelationDataProviders.
| Nested Class Summary | |
|---|---|
class |
DFInsertDescription.InsertRow
Description of the row to be inserted. |
| Field Summary | |
|---|---|
static Map<String,Object> |
NO_VALUES
|
| Method Summary | |
|---|---|
void |
addRelatedData(DFRelationship.Direction rel,
DFInsertDescription data)
Adds related data to the insert operation. |
static DFInsertDescription |
create(DFEntity en)
Creates DFInsertDescription that inserts data into the given Entity. |
static DFInsertDescription |
create(DFEntity en,
Map<String,Object> values)
Creates DFInsertDescription that inserts data into the given Entity. |
DFInsertDescription |
createDescription(DFEntity target)
Creates an empty DFInsertDescription. |
DFInsertDescription.InsertRow |
getFirstRow()
A convenience method, which will return the first DFInsertDescription.InsertRow object
for this description. |
Set<DFInsertDescription.InsertRow> |
getInsertedRows()
|
Map<String,DFInsertDescription> |
getInsertionSet()
Returns all DFInsertDescriptions in this operation. |
Map<String,Object> |
getInsertOptions()
|
DFLock |
getLock()
|
DFField |
getLookupField()
|
Map<String,DFInsertDescription> |
getRelatedData()
Returns map of related data, which ought to be inserted as a part of the operation. |
Set<DFRelationship.Direction> |
getRequiredRelations()
Finds fields, which must be filled in order to insert the row. |
DFEntity |
getTargetEntity()
|
DFInsertDescription.InsertRow |
insertRow(Map<String,Object> values)
Registers a new Row of values for this insert description. |
void |
setInsertOptions(Map<String,Object> insertOptions)
|
void |
setLock(DFLock lock)
|
void |
setLookupField(DFField lookupField)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Map<String,Object> NO_VALUES
| Method Detail |
|---|
public DFEntity getTargetEntity()
public Map<String,DFInsertDescription> getInsertionSet()
DFInsertDescriptions in this operation. As DFInsertDescriotions
are connected using addRelatedData(com.im.df.api.ddl.DFRelationship.Direction, com.im.df.api.dml.DFInsertDescription), this method returns a complete
set of to-be-inserted data.
The resulting Map is keyed by entity ID, and values are DFInsertDescription
instance of that entity.
public Map<String,DFInsertDescription> getRelatedData()
public DFField getLookupField()
public void setLookupField(DFField lookupField)
public Map<String,Object> getInsertOptions()
public void setInsertOptions(Map<String,Object> insertOptions)
public void setLock(DFLock lock)
public DFLock getLock()
public void addRelatedData(DFRelationship.Direction rel,
DFInsertDescription data)
public Set<DFRelationship.Direction> getRequiredRelations()
DFField.Required.TRUE.
For One-to-Many or Many-to-One, the "many" endpoint field is checked, since
that field has to identify the "one" endpoint.
For One-to-One relations, both endpoints are checked.
public DFInsertDescription.InsertRow insertRow(Map<String,Object> values)
DFInsertDescription.InsertRow
object is returned. Do not pass null for values. Use NO_VALUES
instead
values - The v alues for this row
public DFInsertDescription createDescription(DFEntity target)
insertRow(java.util.Map) to add
individual rows to the description.
target -
public Set<DFInsertDescription.InsertRow> getInsertedRows()
public DFInsertDescription.InsertRow getFirstRow()
DFInsertDescription.InsertRow object
for this description. Returns null if there are no rows
in the InsertDescription.
null if there are no rows available.
public static DFInsertDescription create(DFEntity en,
Map<String,Object> values)
en - The target entity for the insertionvalues - The v alues for the row. Use null to insert no rows.
public static DFInsertDescription create(DFEntity en)
insertRow(java.util.Map) to populate the
DFInsertDescription instance with rows
en - The insertion's target entity.public String toString()
toString in class Object
|
com.im.df.api 5.12.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||