package com.ibm.emb.meb.wrapper;

import javax.ejb.CreateException;
import javax.ejb.FinderException;
import javax.ejb.RemoveException;
import javax.emb.MediaException;
import javax.emb.MediaFormat;
import javax.naming.NamingException;

/**
 * Remote interface for Enterprise Bean: MetaDataEntityWrapper
 */
public interface MetaDataEntityWrapper extends javax.ejb.EJBObject {

    public static int NULLPOINTER = 1;

    public static int MEDIAFORMAT = 2;

    public static int MALFORMEDURL = 3;

    public static int CONTENTACCESS = 4;

    public static int MALFORMEDQUERY = 5;

    public static int UNSUPPORTEDQUERY = 6;

    public static int ILLEGALOPTION = 7;

    public static int XMLVALIDATION = 8;

    /*
     * MetaDataEntityLocal Wrapped Methods
     */

    /**
     * Invokes addMediaEntity(MediaEntityLocal) on the MetaDataEntityLocal The
     * primary key passed will first be resolved to a MetaDataEntityBean on
     * which the operation should be invoked on. If the media primary key is not
     * null, it will be resolved to a MediaEntityBean before it is passed in to
     * the method. If the child is null, null is passed in.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param childpk - String representing the primary key of the media
     *        MediaEntityLocal
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if either primary key can not be found
     *            in the datastore
     */
    public void addMetaDataMedia(String pk, String mediapk) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;

    /**
     * Invokes getMediaEntities(MediaFormat, boolean) on the MetaDataEntityLocal
     * The primary key passed will first be resolved to a MetaDataEntityBean on
     * which the operation should be invoked on.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param format - MediaFormat object to be passed
     * @param recursive - if true, children are searched too
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if either primary key can not be found
     *            in the datastore
     */
    public String[] getMetaDataEntityMediaEntities(String pk, MediaFormat format, boolean searchChildren)
            throws MediaException, NamingException, FinderException, java.rmi.RemoteException;

    /**
     * Invokes addChild(MetaDataEntityLocal) on the MetaDataEntityLocal The
     * primary key passed will first be resolved to a MetaDataEntityBean on
     * which the operation should be invoked on. If the child primary key is not
     * null, it will be resolved to a MetaDataEntityBean before it is passed in
     * to the method. If the child is null, null is passed in.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param childpk - String representing the primary key of the child
     *        MetaDataEntityLocal
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if either primary key can not be found
     *            in the datastore
     */
    public void addMetaDataChild(String pk, String childpk) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;

    /**
     * Invokes getMediaEntities(MediaFormat, boolean) on the MetaDataEntityLocal
     * The primary key passed will first be resolved to a MetaDataEntityBean on
     * which the operation should be invoked on.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param mimeType - String representing the mime type to be passed
     * @param recursive - if true, children are searched too
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if either primary key can not be found
     *            in the datastore
     */
    public String[] getMetaDataEntityMediaEntities(String pk, String mimeType, boolean searchChildren)
            throws MediaException, NamingException, FinderException, java.rmi.RemoteException;

    /**
     * Invokes getChildren() on the MetaDataEntityLocal The primary key passed
     * will first be resolved to a MetaDataEntityBean on which the operation
     * should be invoked on. The array of MetaDataEntityBean children will first
     * be converted into an array of primary keys representing the children
     * before being returned.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @return String array of primary keys representing the children on the
     *         MetaDataEntityBean
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public String[] getMetaDataEntityChildren(String pk) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes getLastModified() on the MetaDataEntityLocal The primary key
     * passed will first be resolved to a MetaDataEntityBean on which the
     * operation should be invoked on.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @return long representing the timestamp of when MetaDataEntityBean was
     *         last modified
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public long getMetaDataEntityLastModified(String pk) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes getMediaEntities() on the MetaDataEntityLocal The primary key
     * passed will first be resolved to a MetaDataEntityBean on which the
     * operation should be invoked on. The array of MediaEntity children is
     * converted into an array of primary keys representing the children before
     * being returned.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @return String array of primary keys representing the associated
     *         MediaEntityBeans
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public String[] getMetaDataEntityMediaEntities(String pk) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes getName() on the MetaDataEntityLocal The primary key passed will
     * first be resolved to a MetaDataEntityBean on which the operation should
     * be invoked on.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @return String representing the name of the MetaDataEntityBean
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public String getMetaDataEntityName(String pk) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes getNextVersion() on the MetaDataEntityLocal The primary key
     * passed will first be resolved to a MetaDataEntityBean on which the
     * operation should be invoked on. The primary key of the
     * MetaDataEntityBean's next version MetaDataEntityBean will be returned or
     * null if the next version is null.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @return String representing the primary key of the MetaDataEntityBean's
     *         next version or null
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public String getMetaDataEntityNextVersion(String pk) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes getParents() on the MetaDataEntityLocal The primary key passed
     * will first be resolved to a MetaDataEntityBean on which the operation
     * should be invoked on. The array of MetaDataEntityBean parents will first
     * be converted into an array of primary keys representing the parents
     * before being returned.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @return String array of primary keys representing the parents on the
     *         MetaDataEntityBean
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public String[] getMetaDataEntityParents(String pk) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes getPreviousVersion() on the MetaDataEntityLocal The primary key
     * passed will first be resolved to a MetaDataEntityBean on which the
     * operation should be invoked on. The primary key of the
     * MetaDataEntityBean's previous version MetaDataEntityBean will be returned
     * or null if the next version is null.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @return String representing the primary key of the MetaDataEntityBean's
     *         previous version or null
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public String getMetaDataEntityPreviousVersion(String pk) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes getXML(String) on the MetaDataEntityLocal The primary key passed
     * will first be resolved to a MetaDataEntityBean on which the operation
     * should be invoked on.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @throws MediaException thrown if the exception was thrown by the
     *         MetaDataEntityLocal operation
     * @throws NamingException thrown if there are problems looking up the
     *         MetaDataEntityLocalHome
     * @throws FinderException thrown if either primary key can not be found in
     *         the datastore
     */
    public String getMetaDataEntityXML(String pk) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;

    /**
     * Invokes removeChild(MetaDataEntityLocal) on the MetaDataEntityLocal The
     * primary key passed will first be resolved to a MetaDataEntityBean on
     * which the operation should be invoked on. If the child primary key is not
     * null, it will be resolved to a MetaDataEntityBean before it is passed in
     * to the method. If the child is null, null is passed in.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param childpk - String representing the primary key of the child
     *        MetaDataEntityLocal
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if either primary key can not be found
     *            in the datastore
     */
    public void removeMetaDataChild(String pk, String childpk) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;

    /**
     * Invokes removeMediaEntity(MediaEntityLocal) on the MetaDataEntityLocal
     * The primary key passed will first be resolved to a MetaDataEntityBean on
     * which the operation should be invoked on. If the media primary key is not
     * null, it will be resolved to a MediaEntityBean before it is passed in to
     * the method. If the child is null, null is passed in.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param childpk - String representing the primary key of the media
     *        MediaEntityLocal
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if either primary key can not be found
     *            in the datastore
     */
    public void removeMetaDataMedia(String pk, String mediapk) throws MediaException, NamingException, FinderException,
            java.rmi.RemoteException;

    /**
     * Invokes setName() on the MetaDataEntityLocal The primary key passed will
     * first be resolved to a MetaDataEntityBean on which the operation should
     * be invoked on.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param name - String representing the name of the MetaDataEntityBean
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public void setMetaDataEntityName(String pk, String name) throws NamingException, FinderException, MediaException,
            java.rmi.RemoteException;

    /**
     * Invokes setPreviousVersion(MetaDataEntityLocal) on the
     * MetaDataEntityLocal The primary key passed will first be resolved to a
     * MetaDataEntityBean on which the operation should be invoked on. The
     * primary key passed representing the MetaDataEntityBean's previous version
     * MetaDataEntityBean will be located in the datastore and resolved to a
     * MetaDataEntityLocal before it is passed into the setter. If the primary
     * key representing the previous version is null then null will be passed
     * in.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param pvpk - String representing the primary key of the
     *        MetaDataEntityBean's previous version or null
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocal operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public void setMetaDataEntityPreviousVersion(String pk, String pvpk) throws NamingException, FinderException,
            MediaException, java.rmi.RemoteException;

    /**
     * Invokes setXML(String, String, boolean) on the MetaDataEntityLocal The
     * primary key passed will first be resolved to a MetaDataEntityBean on
     * which the operation should be invoked on.
     * @param pk - String representing the primary key of the MetaDataEntityBean
     *        to invoke the operation on
     * @param xmlContent - String containing the xml metadata to set on the
     *        MetaDataEntityBean
     * @param validate - boolean flag for enabling validation of the xml
     * @exception NullPointerException - thrown if the primary key passed in is
     *            null
     * @throws MediaException thrown if the exception was thrown by the
     *         MetaDataEntityLocal operation
     * @throws NamingException thrown if there are problems looking up the
     *         MetaDataEntityLocalHome
     * @throws FinderException thrown if either primary key can not be found in
     *         the datastore
     */
    public void setMetaDataEntityXML(String pk, String xmlContent, boolean validate) throws MediaException,
            NamingException, FinderException, java.rmi.RemoteException;

    /*
     * MetaDataEntityLocalHome Wrapped Methods
     */

    /**
     * Invokes create() on MetaDataEntityLocalHome. Returns the Primary Key of
     * the created MetaDataEntityLocal Throws any exceptions originating from
     * the call to MetaDataEntityLocalHome
     * @return String - primary key coresponding to the created
     *         MetaDataEntityBean
     * @exception MediaException thrown if the exception was thrown by the
     *            MetaDataEntityLocalHome import operation
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception CreateException thrown if the exception was thrown by the
     *            MetaDataEntityLocalHome import operation
     */
    public String createMetaDataEntityBean() throws MediaException, CreateException, NamingException,
            java.rmi.RemoteException;

    /**
     * Invokes findByPrimaryKey(String) on MetaDataEntityLocalHome The primary
     * key passed in and the primary key returned should be the same (or the
     * operation has failed) however no validation checking is done by this
     * method.
     * @param pk - String representing primary key to find in the datastore
     * @return String - primary key of the located MetaDataEntityBean
     * @exception NamingException thrown if there are problems looking up the
     *            MetaDataEntityLocalHome
     * @exception FinderException thrown if the primary key can not be found in
     *            the datastore
     */
    public String findMDEBByPrimaryKey(String pk) throws NamingException, FinderException, java.rmi.RemoteException;

    /**
     * Invokes the query(String, String, String) on MetaDataEntityLocalHome An
     * array of primary keys is built from the collection of located
     * MetaDataEntityBeans and returned.
     * @param query - String representing the partial description to search for
     * @param queryLang - String representing the query language to use
     * @param options - String representing the options for the query language
     * @return String[] - array of primary keys of located MediaEntityBeans
     *         matching the partial description
     * @throws MediaException thrown if the exception was thrown by the
     *         MetaDataEntityLocalHome operation
     * @throws NamingException thrown if there are problems looking up the
     *         MediaEntityLocalHome
     * @throws FinderException thrown if no MediaEntityBeans can be found by the
     *         partial description
     */
    public String[] queryMetaDataEntity(String query, String queryLang, java.util.Map options) throws MediaException,
            NamingException, FinderException, java.rmi.RemoteException;

    /**
     * Invokes the retrieveSupportedQueryLanguages on MetaDataEntityLocalHome
     * @throws MediaException thrown if the exception was thrown by the
     *         MetaDataEntityLocalHome operation
     * @throws NamingException thrown if there are problems looking up the
     *         MediaEntityLocalHome
     */
    public String[] retrieveMetaDataEntitySupportedQueryLanguages() throws MediaException, NamingException,
            java.rmi.RemoteException;

    /**
     * Invokes the retrieveSupportedOptions on MetaDataEntityLocalHome
     * @throws MediaException thrown if the exception was thrown by the
     *         MetaDataEntityLocalHome operation
     * @throws NamingException thrown if there are problems looking up the
     *         MediaEntityLocalHome
     */
    public String[] retrieveMetaDataEntitySupportedOptions(String queryLang) throws MediaException, NamingException,
            java.rmi.RemoteException;

    /**
     * Invokes create() on MediaEntityLocalHome. Returns the Primary Key of the
     * created MediaEntityLocal Throws any exceptions originating from the call
     * to MediaEntityLocalHome
     * @return String - primary key coresponding to the created MediaEntityBean
     * @exception MediaException thrown if the exception was thrown by the
     *            MediaEntityLocalHome import operation
     * @exception NamingException thrown if there are problems looking up the
     *            MediaEntityLocalHome
     * @exception CreateException thrown if the exception was thrown by the
     *            MediaEntityLocalHome import operation
     */
    public String createMediaEntityBean() throws MediaException, CreateException, NamingException,
            java.rmi.RemoteException;

    /*
     * Invokes remove() for the entity indicated by the key
     */
    public void removeMetaDataEntity(String key) throws RemoveException, NamingException, java.rmi.RemoteException;
}