jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.dbutil
Interface DataStoreDescriptor

All Known Implementing Classes:
AmazonDescriptor, Contexts, TableDescriptor

public interface DataStoreDescriptor

An object representation of an abstract data store. Handles synchronising of database data with application-layer data. Provided as an interface for TableDescriptor so as to allow an interface to object databases (or other non-relational databases) to be developed later.

Version:
$Revision: 1.11.4.1 $ This revision: $Author: simon $
Author:
Simon Brooke

Method Summary
 void drop(Context c, java.lang.Object key)
          Drop the information held in this store against this key value
 int fetch(Context c, java.lang.Object key)
          Fetch the contents of this context from the data store described by this descriptor, by applying the supplied key.
 Contexts match(Context c)
          Deprecated. use #match(Context,boolean)
 Contexts match(Context c, boolean exact)
          Fetch all the records from the data store described by this descriptor, which match the values contained in this context
 java.lang.Object store(Context c)
          Store the information held in this context into the data store described by this descriptor.
 

Method Detail

drop

public void drop(Context c,
                 java.lang.Object key)
          throws DataStoreException
Drop the information held in this store against this key value

Throws:
DataStoreException

fetch

public int fetch(Context c,
                 java.lang.Object key)
          throws DataStoreException
Fetch the contents of this context from the data store described by this descriptor, by applying the supplied key. If the key isn't matched, don't throw an error, just don't change the context. Returns 0 if no match, positive integer if a match was found.

Throws:
DataStoreException

match

public Contexts match(Context c)
               throws DataStoreException
Deprecated. use #match(Context,boolean)

Fetch all the records from the data store described by this descriptor, which match the values contained in this context

Throws:
DataStoreException

match

public Contexts match(Context c,
                      boolean exact)
               throws DataStoreException
Fetch all the records from the data store described by this descriptor, which match the values contained in this context

Parameters:
c - the context to match
exact - whether or not an exact match is required - i.e. whether or not to allow fuzzy matching of strings.
Throws:
DataStoreException

store

public java.lang.Object store(Context c)
                       throws DataStoreException
Store the information held in this context into the data store described by this descriptor. Return the key used.

Throws:
DataStoreException

jacquard 1.12.0 by The Web Engineering Factory and Toolworks