Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ensembl.driver
Interface TranslationAdaptor

All Superinterfaces:
  Adaptor, java.rmi.Remote

public interface TranslationAdaptor
extends Adaptor

Provides access to Translations in the datasource.

Field Summary
`static java.lang.String` | `TYPE` Name of the default TranslationAdaptor available from a driver.

Method Summary
`void` | `completeInterproIDs(Translation translation)` Retrieves the interproIDs for the translation and sets them on the translation.
`Translation` | `fetch(long internalID)` Fetches a translation with the specified id.
`Translation` | `fetch(long internalID, boolean loadChildren)` Fetches a translation with the specified id with or without start and end exons preloaded.
`Translation` | `fetch(java.lang.String accessionID)`
`void` | `fetchAccessionID(Translation translation)` Retrieves translation's accession from persistent store and sets translation.accession.
`java.util.List` | `fetchAll()` Fetch all the translations from the database.
`java.util.List` | `fetchByInterproID(java.lang.String interproID)`
`java.util.List` | `fetchBySynonym(java.lang.String synonym)`
`Translation` | `fetchByTranscript(long transcriptInternalID)` Fetch a translation by the internal ID of its associated translation.
`Translation` | `fetchByTranscript(long transcriptInternalID, boolean loadChildren)` Fetch a translation by the internal ID of its associated translation with or without including start and end exons.
`java.util.List` | `fetchByTranscripts(long[] transcriptInternalIDs, boolean loadChildren)` Fetch a translations by the internal IDs of their associated translation.
`void` | `fetchKnown(Translation translation)` Retrieves from persistent store whether translation is known and sets translation.known.
`void` | `fetchKnown(Translation[] translations)` Retrieves from persistent store whether translations are known and for each one sets translation.known.
`void` | `fetchVersion(Translation translation)` Retrieves translation's version from persistent store and sets translation.version.

Methods inherited from interface org.ensembl.driver.Adaptor
`clearCache, closeAllConnections, getType`

Field Detail

### TYPE

    public static final java.lang.String TYPE

  Name of the default TranslationAdaptor available from a driver.

  See Also:
    Constant Field Values

Method Detail

### fetch

    public Translation fetch(long internalID)
                      throws AdaptorException

  Fetches a translation with the specified id.

  Parameters:
    `internalID` - internalID of a translation in the datagabase.
  Returns:
    A translation matching the internalID, or null if non found.
  Throws:
    `AdaptorException`

### fetch

    public Translation fetch(long internalID,
                             boolean loadChildren)
                      throws AdaptorException

  Fetches a translation with the specified id with or without start and end exons preloaded.

  Parameters:
    `internalID` - internalID of a translation in the datagabase.
    `loadChildren` - whether to preload the child exons.
  Returns:
    A translation matching the internalID, or null if non found.
  Throws:
    `AdaptorException`

### fetchByTranscript

    public Translation fetchByTranscript(long transcriptInternalID)
                                  throws AdaptorException

  Fetch a translation by the internal ID of its associated translation.

  Parameters:
    `transcriptInternalID` - The internal ID of the transcript this translation belongs to.
  Returns:
    The translation associated with the transcript, or null if there is none (e.g. pseudogene).
  Throws:
    `AdaptorException`

### fetchByTranscript

    public Translation fetchByTranscript(long transcriptInternalID,
                                         boolean loadChildren)
                                  throws AdaptorException

  Fetch a translation by the internal ID of its associated translation with or without including start and end exons.

  Parameters:
    `transcriptInternalID` - The internal ID of the transcript this translation belongs to.
    `loadChildren` - whether to preload the child exons.
  Returns:
    The translation associated with the transcript, or null if there is none (e.g. pseudogene).
  Throws:
    `AdaptorException`

### fetchByTranscripts

    public java.util.List fetchByTranscripts(long[] transcriptInternalIDs,
                                             boolean loadChildren)
                                      throws AdaptorException

  Fetch a translations by the internal IDs of their associated translation.

  Parameters:
    `transcriptInternalIDs` - array of transcript internal IDs.
  Returns:
    The translations associated with the transcripts, or null if there is none (e.g. pseudogene.) return order is not specified.
  Throws:
    `AdaptorException`

### fetch

    public Translation fetch(java.lang.String accessionID)
                      throws AdaptorException

  Returns:
    A translation matching the accessionID, or null if non found.
  Throws:
    `AdaptorException`

### fetchBySynonym

    public java.util.List fetchBySynonym(java.lang.String synonym)
                                  throws AdaptorException

  Returns:
    Translations matching the synonym, empty list if non found.
  Throws:
    `AdaptorException`

### fetchByInterproID

    public java.util.List fetchByInterproID(java.lang.String interproID)
                                     throws AdaptorException

  Returns:
    Translations matching the interpro id, empty list if non found.
  Throws:
    `AdaptorException`

### fetchAccessionID

    public void fetchAccessionID(Translation translation)
                          throws AdaptorException

  Retrieves translation's accession from persistent store and sets translation.accession.

  Throws:
    `AdaptorException`

### fetchVersion

    public void fetchVersion(Translation translation)
                      throws AdaptorException

  Retrieves translation's version from persistent store and sets translation.version. Version is set to 0 if it is unavailable in persistent store.

  Parameters:
    `translation` - translation.internalID should be >0
  Throws:
    `AdaptorException`

### fetchKnown

    public void fetchKnown(Translation translation)
                    throws AdaptorException

  Retrieves from persistent store whether translation is known and sets translation.known.

  Throws:
    `AdaptorException`

### fetchKnown

    public void fetchKnown(Translation[] translations)
                    throws AdaptorException

  Retrieves from persistent store whether translations are known and for each one sets translation.known.

  Throws:
    `AdaptorException`

### completeInterproIDs

    public void completeInterproIDs(Translation translation)
                             throws AdaptorException

  Retrieves the interproIDs for the translation and sets them on the translation. Sets the interproIDs to be an empty array if non are found.

  Parameters:
    `translation` - translation that interproIDs should be retrieved for.
  Throws:
    `AdaptorException`

### fetchAll

    public java.util.List fetchAll()
                            throws AdaptorException

  Fetch all the translations from the database.

  Throws:
    `AdaptorException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD