public class CreateItemCommand extends ExecutableCommandWrapper implements ExecutableCommand
Creates a new Item
in the Integrity database.
Constraints:
Item
must be owned by its Type
.Notes:
SetFieldValueCommand
is automatically executed for each field value of this Item
.id
of the Item is updated to match the one in the database, so that other commands
can be executed on this created Item
.
Item
has a Contained By
relation to its parent, you can control the insertion location using an instance of
InsertLocation
.Usage:
new CreateItemCommand(myItem).execute(); new CreateItemCommand(myItem, InsertLocation.Factory.createFirst()).execute();
SetFieldValueCommand
,
InsertLocation
Constructor and Description |
---|
CreateItemCommand(Item item)
Instantiates a command to create an item in the database.
|
CreateItemCommand(Item item,
InsertLocation insertLocation)
Instantiates a command to create an item in the database.
|
execute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
public CreateItemCommand(Item item)
item
- the item to create in the database.public CreateItemCommand(Item item, InsertLocation insertLocation)
item
- the item to create in the database.insertLocation
- the location in the document where to insert the item.