Holger's Java API

## com.antelmann.db
Class DBEntrySelection

    java.lang.Object
      com.antelmann.util.DefaultTransferable
          com.antelmann.db.DBEntrySelection

All Implemented Interfaces:
  ClipboardOwner, Transferable

    public class DBEntrySelection

extends DefaultTransferable

implements a special Transferable for DBReference and/or DBEntry objects. the additionally supported flavors in this implementation are: `DBEntry.ENTRY_LIST_FLAVOR`, `DBEntry.ENTRY_FLAVOR`, `DBReference.REFERENCE_LIST_FLAVOR` and `DBReference.REFERENCE_FLAVOR`

Since:
  24.10.2008, 13:12:45
Author:
  Holger Antelmann
See Also:
  `DBReference`, `DBEntry`

Field Summary

Fields inherited from class com.antelmann.util.DefaultTransferable
`HTML_FLAVOR`

Constructor Summary
`DBEntrySelection(DBEntry... entries)`
`DBEntrySelection(DBReference... references)`

Method Summary
`static ArrayList<DBEntry>` `extractEntries(Transferable t, Database<?> db)`
`protected String` `extractStringFlavor(DBEntry entry)` allows to customize the String used for the `DataFlavor.stringFlavor`; here, `Object.toString()` is used - unless `DetailedString` is implemented
`protected String` `extractStringFlavor(DBReference ref)` allows to customize the String used for the `DataFlavor.stringFlavor`; here, `DBReference.getReferenceString()` is used
`Object` `getTransferData(DataFlavor flavor)`
`static DBEntry` `resolve(DBReference ref, Database<?> db)`

Methods inherited from class com.antelmann.util.DefaultTransferable
`addSupportedFlavor, getFlavor, getObject, getTransferDataFlavors, isDataFlavorSupported, lostOwnership`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DBEntrySelection

    public DBEntrySelection(DBReference... references)

### DBEntrySelection

    public DBEntrySelection(DBEntry... entries)

Method Detail

### getTransferData

    public Object getTransferData(DataFlavor flavor)
                           throws UnsupportedFlavorException,
                                  IOException

  Specified by:
    `getTransferData` in interface `Transferable`
  Overrides:
    `getTransferData` in class `DefaultTransferable`
  Throws:
    `UnsupportedFlavorException`
    `IOException`

### extractStringFlavor

    protected String extractStringFlavor(DBEntry entry)

  allows to customize the String used for the `DataFlavor.stringFlavor`; here, `Object.toString()` is used - unless `DetailedString` is implemented

  See Also:
    `DetailedString`

### extractStringFlavor

    protected String extractStringFlavor(DBReference ref)

  allows to customize the String used for the `DataFlavor.stringFlavor`; here, `DBReference.getReferenceString()` is used

### extractEntries

    public static ArrayList<DBEntry> extractEntries(Transferable t,
                                                    Database<?> db)
                                             throws IOException,
                                                    UnsupportedFlavorException

  Throws:
    `IOException`
    `UnsupportedFlavorException`

### resolve

    public static DBEntry resolve(DBReference ref,
                                  Database<?> db)
                           throws DatabaseException

  Throws:
    `DatabaseException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads