com.im.df.api 5.9

com.im.df.api.ddl
Interface DFContainer<E extends DFItem>

All Known Subinterfaces:
DFContainer.Extra<E>

public interface DFContainer<E extends DFItem>

Generic container for any DFItems list. Events should be fired as property changes on the owner DFItem. (e.g. DFEntity.PROP_FIELDS property change event in DFEntity when new field is added or some field is removed)


Nested Class Summary
static interface DFContainer.Extra<E extends DFItem>
          Extension of standard DFContainer interface.
 
Method Summary
 E findItemById(String id)
          Find item by its id (see DFItem.getId()).
 List<String> getAllItemIds()
          Get list of ids of all items contained by this DFContainer (see DFItem.getId()).
 List<E> getItems()
          Get list of all child items.
 List<DFNewType<E>> getNewTypes()
          Get the list of all available DFNewType.
 boolean isDeleteAllowed(E itemToRemove)
          Test if the given item is allowed.
 void remove(E itemToRemove, boolean destroyArtefacts, DFEnvironmentRW env)
          Removes the child item from the container (clear metadata) and destroy underlying artefacts if requested.
 

Method Detail

getNewTypes

List<DFNewType<E>> getNewTypes()
Get the list of all available DFNewType. New types are used for creating new items in this container. If you want to filter the returned new types, use convenience methods in DIFUtilities


isDeleteAllowed

boolean isDeleteAllowed(E itemToRemove)
Test if the given item is allowed.


remove

void remove(E itemToRemove,
            boolean destroyArtefacts,
            DFEnvironmentRW env)
Removes the child item from the container (clear metadata) and destroy underlying artefacts if requested. Underlying artefacts are usually relational database elements like tables, columns, foreign keys, etc.

Parameters:
itemToRemove - The item to be removed
destroyArtefacts - If true, underlying (e.g. database) objects are destroyed. Some DFItems are metadata only (virtual) and do not have any underlying artefacts so then this argument has no meaning in this case (e.g. DFDataTree has no peer in the database world; the same for the views).

getAllItemIds

List<String> getAllItemIds()
Get list of ids of all items contained by this DFContainer (see DFItem.getId()).


findItemById

E findItemById(String id)
Find item by its id (see DFItem.getId()).

Parameters:
id - The ID of the item to find
Returns:
The item, or null if not present

getItems

List<E> getItems()
Get list of all child items.


com.im.df.api 5.9