at.spardat.xma.datasource.ITabularDataSource Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
// @(#) $Id: ITabularDataSource.java 2089 2007-11-28 13:56:13Z s3460 $
package at.spardat.xma.datasource;
import at.spardat.xma.session.XMASession;
/**
* Classes implementing this interface are able to provide tabular data. ITabularData
* is the interface specification for the XMA tabular data plugin. A XMA application provides
* a server and a client side implementation. There are default implementations available.
*
* Usage of this interface: The implementor is able to provide a {@link ITabularData} for
* a provided table specification. The specification is a String that must abide to the
* following syntax (example):
*
* type=sddom,name=BETRART
*
* I.e., a comma separated list of attributes as key/value pairs. The attribute type is reserved
* and should be used to discrimitate different data sources. Depending on the type,
* more attributes might be required. The following types are
* reserved:
*
* type meaning
* -------------------------------------------------------------------------------------------
* rsc the table is loaded from a resource bundle, see {@link RessourceBundleProviderServer}.
* The syntax is type=rsc,bundle=at.spardat. ... .BundleName
* sddom see at.spardat.enterprise.atom.ADomain
* ress see at.spardat.enterprise.atom.ADomain
* res see at.spardat.enterprise.atom.ADomain
*
*
* @author YSD, 17.04.2003 23:05:59
*/
public interface ITabularDataSource {
/**
* Constant for a timestamp that is unknown. May be used to specify unknown
* last modified timestamps.
*/
public static final long UNKNOWN_TIMESTAMP = Long.MIN_VALUE;
/**
* Retrieves a table from this data source.
*
* @param spec identifies a table as defined above.
* @param session XMASession
* @return the table data. The returned table is never null.
* @exception RuntimeException note that this method may throw a set
* of RuntimeExceptions.
*/
public ITabularData getTable (String spec, XMASession session);
/**
* Convenience method to retrieve a table that contains domain values.
* Not that this method may only be called if the underlying tabular data is indeed
* a domain table. It is the {@link ITableProvider}-implementor that decides
* on this.
*
* @param spec identifies a table as defined above.
* @param session XMASession
* @return the table data. The returned table is never null.
* @exception RuntimeException note that this method may throw a set
* of RuntimeExceptions.
*/
public ITabularDomData getDomTable (String spec, XMASession session);
}