class StructureDB extends CompositeDB implements Structure {

	@Override
	public void deleteAll() {
		lock.acquire();
		try {
			checkDeleted();

			if (flexibleArrayComponent != null) {
				flexibleArrayComponent.getDataType().removeParent(this);
				componentAdapter.removeRecord(flexibleArrayComponent.getKey());
				flexibleArrayComponent = null;
			}

			for (int i = 0; i < components.size(); i++) {
				DataTypeComponentDB dtc = components.get(i);
				dtc.getDataType().removeParent(this);
				try {
					componentAdapter.removeRecord(dtc.getKey());
				}
				catch (IOException e) {
					dataMgr.dbError(e);
				}
			}
			components.clear();
			structLength = 0;
			numComponents = 0;
			record.setIntValue(CompositeDBAdapter.COMPOSITE_LENGTH_COL, 0);
			record.setIntValue(CompositeDBAdapter.COMPOSITE_NUM_COMPONENTS_COL, 0);
			compositeAdapter.updateRecord(record, true);
			adjustInternalAlignment(true);
			notifySizeChanged();
		}
		catch (IOException e) {
			dataMgr.dbError(e);
		}
		finally {
			lock.release();
		}
	}

	public  StructureDB(DataTypeManagerDB dataMgr, DBObjectCache<DataTypeDB> cache,
			CompositeDBAdapter compositeAdapter, ComponentDBAdapter componentAdapter,
			Record record);

}